From bb8033c7459afaaa9771e614de067b1b2bc60e7b Mon Sep 17 00:00:00 2001 From: Alfred Fuller Date: Tue, 4 Oct 2022 14:15:39 -0700 Subject: [PATCH] Declare FieldPatch strictly after needed patch types are added. Summary: As the ~decl order is the default gen order. Differential Revision: D40050932 fbshipit-source-id: 15441aed50b61a0e87994b0716dcfe4e8556ebe2 --- .../src/thrift/compiler/sema/patch_mutator.cc | 11 +- .../test/fixtures/patch/MyStructFieldPatch.java | 1064 ++--- .../test/fixtures/patch/gen-cpp2/module_data.cpp | 174 +- .../patch/gen-cpp2/module_for_each_field.h | 60 +- .../fixtures/patch/gen-cpp2/module_metadata.cpp | 58 +- .../test/fixtures/patch/gen-cpp2/module_types.cpp | 698 +-- .../test/fixtures/patch/gen-cpp2/module_types.h | 4394 ++++++++--------- .../test/fixtures/patch/gen-cpp2/module_types.tcc | 1064 ++--- .../module_visit_by_thrift_field_metadata.h | 118 +- .../test/fixtures/patch/gen-go/module/ttypes.go | 5030 ++++++++++---------- .../test/fixtures/patch/gen-hack/module_types.php | 4416 ++++++++--------- .../test/fixtures/patch/MyStructFieldPatch.java | 1614 +++---- ...c1a9.java => __fbthrift_TypeList_c6fa3293.java} | 4 +- .../test/fixtures/patch/MyStructFieldPatch.java | 2266 ++++----- .../test/fixtures/patch/gen-json/module.json | 460 +- .../patch/gen-json_experimental/module.json | 724 +-- .../test/fixtures/patch/gen-py/module/constants.py | 2 +- .../test/fixtures/patch/gen-py/module/ttypes.py | 1930 ++++---- .../test/fixtures/patch/module/thrift_metadata.py | 226 +- .../test/fixtures/patch/module/thrift_types.py | 652 +-- .../test/fixtures/patch/module/thrift_types.pyi | 208 +- .../compiler/test/fixtures/patch/gen-rust/types.rs | 792 +-- 22 files changed, 12986 insertions(+), 12979 deletions(-) rename third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/{__fbthrift_TypeList_1644c1a9.java => __fbthrift_TypeList_c6fa3293.java} (97%) diff --git a/third-party/thrift/src/thrift/compiler/sema/patch_mutator.cc b/third-party/thrift/src/thrift/compiler/sema/patch_mutator.cc index 6474be9a8f9..c72656d0419 100644 --- a/third-party/thrift/src/thrift/compiler/sema/patch_mutator.cc +++ b/third-party/thrift/src/thrift/compiler/sema/patch_mutator.cc @@ -313,14 +313,21 @@ patch_generator& patch_generator::get_for( t_struct& patch_generator::add_field_patch( const t_const& annot, t_structured& orig) { - StructGen gen{annot, gen_suffix_struct(annot, orig, "FieldPatch")}; + // Resolve (and maybe create) all the field patch types, strictly before + // creating FieldPatch. + std::map types; // Ordered by field id. for (const auto& field : orig.fields()) { if (t_type_ref patch_type = find_patch_type(annot, orig, field)) { - gen.field(field.id(), patch_type, field.name()); + types[field.id()] = patch_type; } else { ctx_.warning(field, "Could not resolve patch type for field."); } } + StructGen gen{annot, gen_suffix_struct(annot, orig, "FieldPatch")}; + for (const auto& entry : types) { + gen.field( + entry.first, entry.second, orig.get_field_by_id(entry.first)->name()); + } gen.set_adapter("FieldPatchAdapter", program_); return gen; } diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-android/test/fixtures/patch/MyStructFieldPatch.java b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-android/test/fixtures/patch/MyStructFieldPatch.java index 8f7cf7d658a..494ea6a0703 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-android/test/fixtures/patch/MyStructFieldPatch.java +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-android/test/fixtures/patch/MyStructFieldPatch.java @@ -26,314 +26,314 @@ import com.facebook.thrift.protocol.*; @SuppressWarnings({ "unused", "serial" }) public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("MyStructFieldPatch"); - private static final TField BOOL_VAL_FIELD_DESC = new TField("boolVal", TType.STRUCT, (short)-1); - private static final TField BYTE_VAL_FIELD_DESC = new TField("byteVal", TType.STRUCT, (short)-2); - private static final TField I16_VAL_FIELD_DESC = new TField("i16Val", TType.STRUCT, (short)-3); - private static final TField I32_VAL_FIELD_DESC = new TField("i32Val", TType.STRUCT, (short)-4); - private static final TField I64_VAL_FIELD_DESC = new TField("i64Val", TType.STRUCT, (short)-5); - private static final TField FLOAT_VAL_FIELD_DESC = new TField("floatVal", TType.STRUCT, (short)-6); - private static final TField DOUBLE_VAL_FIELD_DESC = new TField("doubleVal", TType.STRUCT, (short)-7); - private static final TField STRING_VAL_FIELD_DESC = new TField("stringVal", TType.STRUCT, (short)-8); - private static final TField BINARY_VAL_FIELD_DESC = new TField("binaryVal", TType.STRUCT, (short)-9); - private static final TField ENUM_VAL_FIELD_DESC = new TField("enumVal", TType.STRUCT, (short)-10); - private static final TField STRUCT_VAL_FIELD_DESC = new TField("structVal", TType.STRUCT, (short)-11); - private static final TField UNION_VAL_FIELD_DESC = new TField("unionVal", TType.STRUCT, (short)-12); - private static final TField LATE_STRUCT_VAL_FIELD_DESC = new TField("lateStructVal", TType.STRUCT, (short)-13); - private static final TField DURATION_VAL_FIELD_DESC = new TField("durationVal", TType.STRUCT, (short)-14); - private static final TField TIME_VAL_FIELD_DESC = new TField("timeVal", TType.STRUCT, (short)-15); - private static final TField OPT_BOOL_VAL_FIELD_DESC = new TField("optBoolVal", TType.STRUCT, (short)-16); - private static final TField OPT_BYTE_VAL_FIELD_DESC = new TField("optByteVal", TType.STRUCT, (short)-17); - private static final TField OPT_I16_VAL_FIELD_DESC = new TField("optI16Val", TType.STRUCT, (short)-18); - private static final TField OPT_I32_VAL_FIELD_DESC = new TField("optI32Val", TType.STRUCT, (short)-19); - private static final TField OPT_I64_VAL_FIELD_DESC = new TField("optI64Val", TType.STRUCT, (short)-20); - private static final TField OPT_FLOAT_VAL_FIELD_DESC = new TField("optFloatVal", TType.STRUCT, (short)-21); - private static final TField OPT_DOUBLE_VAL_FIELD_DESC = new TField("optDoubleVal", TType.STRUCT, (short)-22); - private static final TField OPT_STRING_VAL_FIELD_DESC = new TField("optStringVal", TType.STRUCT, (short)-23); - private static final TField OPT_BINARY_VAL_FIELD_DESC = new TField("optBinaryVal", TType.STRUCT, (short)-24); - private static final TField OPT_ENUM_VAL_FIELD_DESC = new TField("optEnumVal", TType.STRUCT, (short)-25); - private static final TField OPT_STRUCT_VAL_FIELD_DESC = new TField("optStructVal", TType.STRUCT, (short)-26); - private static final TField OPT_LATE_STRUCT_VAL_FIELD_DESC = new TField("optLateStructVal", TType.STRUCT, (short)-27); - private static final TField OPT_LIST_VAL_FIELD_DESC = new TField("optListVal", TType.STRUCT, (short)-28); - private static final TField OPT_SET_VAL_FIELD_DESC = new TField("optSetVal", TType.STRUCT, (short)-29); private static final TField OPT_MAP_VAL_FIELD_DESC = new TField("optMapVal", TType.STRUCT, (short)-30); + private static final TField OPT_SET_VAL_FIELD_DESC = new TField("optSetVal", TType.STRUCT, (short)-29); + private static final TField OPT_LIST_VAL_FIELD_DESC = new TField("optListVal", TType.STRUCT, (short)-28); + private static final TField OPT_LATE_STRUCT_VAL_FIELD_DESC = new TField("optLateStructVal", TType.STRUCT, (short)-27); + private static final TField OPT_STRUCT_VAL_FIELD_DESC = new TField("optStructVal", TType.STRUCT, (short)-26); + private static final TField OPT_ENUM_VAL_FIELD_DESC = new TField("optEnumVal", TType.STRUCT, (short)-25); + private static final TField OPT_BINARY_VAL_FIELD_DESC = new TField("optBinaryVal", TType.STRUCT, (short)-24); + private static final TField OPT_STRING_VAL_FIELD_DESC = new TField("optStringVal", TType.STRUCT, (short)-23); + private static final TField OPT_DOUBLE_VAL_FIELD_DESC = new TField("optDoubleVal", TType.STRUCT, (short)-22); + private static final TField OPT_FLOAT_VAL_FIELD_DESC = new TField("optFloatVal", TType.STRUCT, (short)-21); + private static final TField OPT_I64_VAL_FIELD_DESC = new TField("optI64Val", TType.STRUCT, (short)-20); + private static final TField OPT_I32_VAL_FIELD_DESC = new TField("optI32Val", TType.STRUCT, (short)-19); + private static final TField OPT_I16_VAL_FIELD_DESC = new TField("optI16Val", TType.STRUCT, (short)-18); + private static final TField OPT_BYTE_VAL_FIELD_DESC = new TField("optByteVal", TType.STRUCT, (short)-17); + private static final TField OPT_BOOL_VAL_FIELD_DESC = new TField("optBoolVal", TType.STRUCT, (short)-16); + private static final TField TIME_VAL_FIELD_DESC = new TField("timeVal", TType.STRUCT, (short)-15); + private static final TField DURATION_VAL_FIELD_DESC = new TField("durationVal", TType.STRUCT, (short)-14); + private static final TField LATE_STRUCT_VAL_FIELD_DESC = new TField("lateStructVal", TType.STRUCT, (short)-13); + private static final TField UNION_VAL_FIELD_DESC = new TField("unionVal", TType.STRUCT, (short)-12); + private static final TField STRUCT_VAL_FIELD_DESC = new TField("structVal", TType.STRUCT, (short)-11); + private static final TField ENUM_VAL_FIELD_DESC = new TField("enumVal", TType.STRUCT, (short)-10); + private static final TField BINARY_VAL_FIELD_DESC = new TField("binaryVal", TType.STRUCT, (short)-9); + private static final TField STRING_VAL_FIELD_DESC = new TField("stringVal", TType.STRUCT, (short)-8); + private static final TField DOUBLE_VAL_FIELD_DESC = new TField("doubleVal", TType.STRUCT, (short)-7); + private static final TField FLOAT_VAL_FIELD_DESC = new TField("floatVal", TType.STRUCT, (short)-6); + private static final TField I64_VAL_FIELD_DESC = new TField("i64Val", TType.STRUCT, (short)-5); + private static final TField I32_VAL_FIELD_DESC = new TField("i32Val", TType.STRUCT, (short)-4); + private static final TField I16_VAL_FIELD_DESC = new TField("i16Val", TType.STRUCT, (short)-3); + private static final TField BYTE_VAL_FIELD_DESC = new TField("byteVal", TType.STRUCT, (short)-2); + private static final TField BOOL_VAL_FIELD_DESC = new TField("boolVal", TType.STRUCT, (short)-1); - public final BoolPatch boolVal; - public final BytePatch byteVal; - public final I16Patch i16Val; - public final I32Patch i32Val; - public final I64Patch i64Val; - public final FloatPatch floatVal; - public final DoublePatch doubleVal; - public final StringPatch stringVal; - public final BinaryPatch binaryVal; - public final MyStructFieldN10Patch enumVal; - public final MyDataPatch structVal; - public final MyUnionPatch unionVal; - public final LateDefStructPatch lateStructVal; - public final DurationPatch durationVal; - public final TimePatch timeVal; - public final BoolPatch optBoolVal; - public final BytePatch optByteVal; - public final I16Patch optI16Val; - public final I32Patch optI32Val; - public final I64Patch optI64Val; - public final FloatPatch optFloatVal; - public final DoublePatch optDoubleVal; - public final StringPatch optStringVal; - public final BinaryPatch optBinaryVal; - public final MyStructFieldN25Patch optEnumVal; - public final MyDataPatch optStructVal; - public final LateDefStructPatch optLateStructVal; - public final MyStructFieldN28Patch optListVal; - public final MyStructFieldN29Patch optSetVal; public final MyStructFieldN30Patch optMapVal; - public static final int BOOLVAL = -1; - public static final int BYTEVAL = -2; - public static final int I16VAL = -3; - public static final int I32VAL = -4; - public static final int I64VAL = -5; - public static final int FLOATVAL = -6; - public static final int DOUBLEVAL = -7; - public static final int STRINGVAL = -8; - public static final int BINARYVAL = -9; - public static final int ENUMVAL = -10; - public static final int STRUCTVAL = -11; - public static final int UNIONVAL = -12; - public static final int LATESTRUCTVAL = -13; - public static final int DURATIONVAL = -14; - public static final int TIMEVAL = -15; - public static final int OPTBOOLVAL = -16; - public static final int OPTBYTEVAL = -17; - public static final int OPTI16VAL = -18; - public static final int OPTI32VAL = -19; - public static final int OPTI64VAL = -20; - public static final int OPTFLOATVAL = -21; - public static final int OPTDOUBLEVAL = -22; - public static final int OPTSTRINGVAL = -23; - public static final int OPTBINARYVAL = -24; - public static final int OPTENUMVAL = -25; - public static final int OPTSTRUCTVAL = -26; - public static final int OPTLATESTRUCTVAL = -27; - public static final int OPTLISTVAL = -28; - public static final int OPTSETVAL = -29; + public final MyStructFieldN29Patch optSetVal; + public final MyStructFieldN28Patch optListVal; + public final LateDefStructPatch optLateStructVal; + public final MyDataPatch optStructVal; + public final MyStructFieldN25Patch optEnumVal; + public final BinaryPatch optBinaryVal; + public final StringPatch optStringVal; + public final DoublePatch optDoubleVal; + public final FloatPatch optFloatVal; + public final I64Patch optI64Val; + public final I32Patch optI32Val; + public final I16Patch optI16Val; + public final BytePatch optByteVal; + public final BoolPatch optBoolVal; + public final TimePatch timeVal; + public final DurationPatch durationVal; + public final LateDefStructPatch lateStructVal; + public final MyUnionPatch unionVal; + public final MyDataPatch structVal; + public final MyStructFieldN10Patch enumVal; + public final BinaryPatch binaryVal; + public final StringPatch stringVal; + public final DoublePatch doubleVal; + public final FloatPatch floatVal; + public final I64Patch i64Val; + public final I32Patch i32Val; + public final I16Patch i16Val; + public final BytePatch byteVal; + public final BoolPatch boolVal; public static final int OPTMAPVAL = -30; + public static final int OPTSETVAL = -29; + public static final int OPTLISTVAL = -28; + public static final int OPTLATESTRUCTVAL = -27; + public static final int OPTSTRUCTVAL = -26; + public static final int OPTENUMVAL = -25; + public static final int OPTBINARYVAL = -24; + public static final int OPTSTRINGVAL = -23; + public static final int OPTDOUBLEVAL = -22; + public static final int OPTFLOATVAL = -21; + public static final int OPTI64VAL = -20; + public static final int OPTI32VAL = -19; + public static final int OPTI16VAL = -18; + public static final int OPTBYTEVAL = -17; + public static final int OPTBOOLVAL = -16; + public static final int TIMEVAL = -15; + public static final int DURATIONVAL = -14; + public static final int LATESTRUCTVAL = -13; + public static final int UNIONVAL = -12; + public static final int STRUCTVAL = -11; + public static final int ENUMVAL = -10; + public static final int BINARYVAL = -9; + public static final int STRINGVAL = -8; + public static final int DOUBLEVAL = -7; + public static final int FLOATVAL = -6; + public static final int I64VAL = -5; + public static final int I32VAL = -4; + public static final int I16VAL = -3; + public static final int BYTEVAL = -2; + public static final int BOOLVAL = -1; public MyStructFieldPatch( - BoolPatch boolVal, - BytePatch byteVal, - I16Patch i16Val, - I32Patch i32Val, - I64Patch i64Val, - FloatPatch floatVal, - DoublePatch doubleVal, - StringPatch stringVal, - BinaryPatch binaryVal, - MyStructFieldN10Patch enumVal, - MyDataPatch structVal, - MyUnionPatch unionVal, - LateDefStructPatch lateStructVal, - DurationPatch durationVal, - TimePatch timeVal, - BoolPatch optBoolVal, - BytePatch optByteVal, - I16Patch optI16Val, - I32Patch optI32Val, - I64Patch optI64Val, - FloatPatch optFloatVal, - DoublePatch optDoubleVal, - StringPatch optStringVal, - BinaryPatch optBinaryVal, - MyStructFieldN25Patch optEnumVal, - MyDataPatch optStructVal, - LateDefStructPatch optLateStructVal, - MyStructFieldN28Patch optListVal, + MyStructFieldN30Patch optMapVal, MyStructFieldN29Patch optSetVal, - MyStructFieldN30Patch optMapVal) { - this.boolVal = boolVal; - this.byteVal = byteVal; - this.i16Val = i16Val; - this.i32Val = i32Val; - this.i64Val = i64Val; - this.floatVal = floatVal; - this.doubleVal = doubleVal; - this.stringVal = stringVal; - this.binaryVal = binaryVal; - this.enumVal = enumVal; - this.structVal = structVal; - this.unionVal = unionVal; - this.lateStructVal = lateStructVal; - this.durationVal = durationVal; - this.timeVal = timeVal; - this.optBoolVal = optBoolVal; - this.optByteVal = optByteVal; - this.optI16Val = optI16Val; - this.optI32Val = optI32Val; - this.optI64Val = optI64Val; - this.optFloatVal = optFloatVal; - this.optDoubleVal = optDoubleVal; - this.optStringVal = optStringVal; - this.optBinaryVal = optBinaryVal; - this.optEnumVal = optEnumVal; - this.optStructVal = optStructVal; - this.optLateStructVal = optLateStructVal; - this.optListVal = optListVal; - this.optSetVal = optSetVal; + MyStructFieldN28Patch optListVal, + LateDefStructPatch optLateStructVal, + MyDataPatch optStructVal, + MyStructFieldN25Patch optEnumVal, + BinaryPatch optBinaryVal, + StringPatch optStringVal, + DoublePatch optDoubleVal, + FloatPatch optFloatVal, + I64Patch optI64Val, + I32Patch optI32Val, + I16Patch optI16Val, + BytePatch optByteVal, + BoolPatch optBoolVal, + TimePatch timeVal, + DurationPatch durationVal, + LateDefStructPatch lateStructVal, + MyUnionPatch unionVal, + MyDataPatch structVal, + MyStructFieldN10Patch enumVal, + BinaryPatch binaryVal, + StringPatch stringVal, + DoublePatch doubleVal, + FloatPatch floatVal, + I64Patch i64Val, + I32Patch i32Val, + I16Patch i16Val, + BytePatch byteVal, + BoolPatch boolVal) { this.optMapVal = optMapVal; + this.optSetVal = optSetVal; + this.optListVal = optListVal; + this.optLateStructVal = optLateStructVal; + this.optStructVal = optStructVal; + this.optEnumVal = optEnumVal; + this.optBinaryVal = optBinaryVal; + this.optStringVal = optStringVal; + this.optDoubleVal = optDoubleVal; + this.optFloatVal = optFloatVal; + this.optI64Val = optI64Val; + this.optI32Val = optI32Val; + this.optI16Val = optI16Val; + this.optByteVal = optByteVal; + this.optBoolVal = optBoolVal; + this.timeVal = timeVal; + this.durationVal = durationVal; + this.lateStructVal = lateStructVal; + this.unionVal = unionVal; + this.structVal = structVal; + this.enumVal = enumVal; + this.binaryVal = binaryVal; + this.stringVal = stringVal; + this.doubleVal = doubleVal; + this.floatVal = floatVal; + this.i64Val = i64Val; + this.i32Val = i32Val; + this.i16Val = i16Val; + this.byteVal = byteVal; + this.boolVal = boolVal; } /** * Performs a deep copy on other. */ public MyStructFieldPatch(MyStructFieldPatch other) { - if (other.isSetBoolVal()) { - this.boolVal = TBaseHelper.deepCopy(other.boolVal); - } else { - this.boolVal = null; - } - if (other.isSetByteVal()) { - this.byteVal = TBaseHelper.deepCopy(other.byteVal); + if (other.isSetOptMapVal()) { + this.optMapVal = TBaseHelper.deepCopy(other.optMapVal); } else { - this.byteVal = null; + this.optMapVal = null; } - if (other.isSetI16Val()) { - this.i16Val = TBaseHelper.deepCopy(other.i16Val); + if (other.isSetOptSetVal()) { + this.optSetVal = TBaseHelper.deepCopy(other.optSetVal); } else { - this.i16Val = null; + this.optSetVal = null; } - if (other.isSetI32Val()) { - this.i32Val = TBaseHelper.deepCopy(other.i32Val); + if (other.isSetOptListVal()) { + this.optListVal = TBaseHelper.deepCopy(other.optListVal); } else { - this.i32Val = null; + this.optListVal = null; } - if (other.isSetI64Val()) { - this.i64Val = TBaseHelper.deepCopy(other.i64Val); + if (other.isSetOptLateStructVal()) { + this.optLateStructVal = TBaseHelper.deepCopy(other.optLateStructVal); } else { - this.i64Val = null; + this.optLateStructVal = null; } - if (other.isSetFloatVal()) { - this.floatVal = TBaseHelper.deepCopy(other.floatVal); + if (other.isSetOptStructVal()) { + this.optStructVal = TBaseHelper.deepCopy(other.optStructVal); } else { - this.floatVal = null; + this.optStructVal = null; } - if (other.isSetDoubleVal()) { - this.doubleVal = TBaseHelper.deepCopy(other.doubleVal); + if (other.isSetOptEnumVal()) { + this.optEnumVal = TBaseHelper.deepCopy(other.optEnumVal); } else { - this.doubleVal = null; + this.optEnumVal = null; } - if (other.isSetStringVal()) { - this.stringVal = TBaseHelper.deepCopy(other.stringVal); + if (other.isSetOptBinaryVal()) { + this.optBinaryVal = TBaseHelper.deepCopy(other.optBinaryVal); } else { - this.stringVal = null; + this.optBinaryVal = null; } - if (other.isSetBinaryVal()) { - this.binaryVal = TBaseHelper.deepCopy(other.binaryVal); + if (other.isSetOptStringVal()) { + this.optStringVal = TBaseHelper.deepCopy(other.optStringVal); } else { - this.binaryVal = null; + this.optStringVal = null; } - if (other.isSetEnumVal()) { - this.enumVal = TBaseHelper.deepCopy(other.enumVal); + if (other.isSetOptDoubleVal()) { + this.optDoubleVal = TBaseHelper.deepCopy(other.optDoubleVal); } else { - this.enumVal = null; + this.optDoubleVal = null; } - if (other.isSetStructVal()) { - this.structVal = TBaseHelper.deepCopy(other.structVal); + if (other.isSetOptFloatVal()) { + this.optFloatVal = TBaseHelper.deepCopy(other.optFloatVal); } else { - this.structVal = null; + this.optFloatVal = null; } - if (other.isSetUnionVal()) { - this.unionVal = TBaseHelper.deepCopy(other.unionVal); + if (other.isSetOptI64Val()) { + this.optI64Val = TBaseHelper.deepCopy(other.optI64Val); } else { - this.unionVal = null; + this.optI64Val = null; } - if (other.isSetLateStructVal()) { - this.lateStructVal = TBaseHelper.deepCopy(other.lateStructVal); + if (other.isSetOptI32Val()) { + this.optI32Val = TBaseHelper.deepCopy(other.optI32Val); } else { - this.lateStructVal = null; + this.optI32Val = null; } - if (other.isSetDurationVal()) { - this.durationVal = TBaseHelper.deepCopy(other.durationVal); + if (other.isSetOptI16Val()) { + this.optI16Val = TBaseHelper.deepCopy(other.optI16Val); } else { - this.durationVal = null; + this.optI16Val = null; } - if (other.isSetTimeVal()) { - this.timeVal = TBaseHelper.deepCopy(other.timeVal); + if (other.isSetOptByteVal()) { + this.optByteVal = TBaseHelper.deepCopy(other.optByteVal); } else { - this.timeVal = null; + this.optByteVal = null; } if (other.isSetOptBoolVal()) { this.optBoolVal = TBaseHelper.deepCopy(other.optBoolVal); } else { this.optBoolVal = null; } - if (other.isSetOptByteVal()) { - this.optByteVal = TBaseHelper.deepCopy(other.optByteVal); + if (other.isSetTimeVal()) { + this.timeVal = TBaseHelper.deepCopy(other.timeVal); } else { - this.optByteVal = null; + this.timeVal = null; } - if (other.isSetOptI16Val()) { - this.optI16Val = TBaseHelper.deepCopy(other.optI16Val); + if (other.isSetDurationVal()) { + this.durationVal = TBaseHelper.deepCopy(other.durationVal); } else { - this.optI16Val = null; + this.durationVal = null; } - if (other.isSetOptI32Val()) { - this.optI32Val = TBaseHelper.deepCopy(other.optI32Val); + if (other.isSetLateStructVal()) { + this.lateStructVal = TBaseHelper.deepCopy(other.lateStructVal); } else { - this.optI32Val = null; + this.lateStructVal = null; } - if (other.isSetOptI64Val()) { - this.optI64Val = TBaseHelper.deepCopy(other.optI64Val); + if (other.isSetUnionVal()) { + this.unionVal = TBaseHelper.deepCopy(other.unionVal); } else { - this.optI64Val = null; + this.unionVal = null; } - if (other.isSetOptFloatVal()) { - this.optFloatVal = TBaseHelper.deepCopy(other.optFloatVal); + if (other.isSetStructVal()) { + this.structVal = TBaseHelper.deepCopy(other.structVal); } else { - this.optFloatVal = null; + this.structVal = null; } - if (other.isSetOptDoubleVal()) { - this.optDoubleVal = TBaseHelper.deepCopy(other.optDoubleVal); + if (other.isSetEnumVal()) { + this.enumVal = TBaseHelper.deepCopy(other.enumVal); } else { - this.optDoubleVal = null; + this.enumVal = null; } - if (other.isSetOptStringVal()) { - this.optStringVal = TBaseHelper.deepCopy(other.optStringVal); + if (other.isSetBinaryVal()) { + this.binaryVal = TBaseHelper.deepCopy(other.binaryVal); } else { - this.optStringVal = null; + this.binaryVal = null; } - if (other.isSetOptBinaryVal()) { - this.optBinaryVal = TBaseHelper.deepCopy(other.optBinaryVal); + if (other.isSetStringVal()) { + this.stringVal = TBaseHelper.deepCopy(other.stringVal); } else { - this.optBinaryVal = null; + this.stringVal = null; } - if (other.isSetOptEnumVal()) { - this.optEnumVal = TBaseHelper.deepCopy(other.optEnumVal); + if (other.isSetDoubleVal()) { + this.doubleVal = TBaseHelper.deepCopy(other.doubleVal); } else { - this.optEnumVal = null; + this.doubleVal = null; } - if (other.isSetOptStructVal()) { - this.optStructVal = TBaseHelper.deepCopy(other.optStructVal); + if (other.isSetFloatVal()) { + this.floatVal = TBaseHelper.deepCopy(other.floatVal); } else { - this.optStructVal = null; + this.floatVal = null; } - if (other.isSetOptLateStructVal()) { - this.optLateStructVal = TBaseHelper.deepCopy(other.optLateStructVal); + if (other.isSetI64Val()) { + this.i64Val = TBaseHelper.deepCopy(other.i64Val); } else { - this.optLateStructVal = null; + this.i64Val = null; } - if (other.isSetOptListVal()) { - this.optListVal = TBaseHelper.deepCopy(other.optListVal); + if (other.isSetI32Val()) { + this.i32Val = TBaseHelper.deepCopy(other.i32Val); } else { - this.optListVal = null; + this.i32Val = null; } - if (other.isSetOptSetVal()) { - this.optSetVal = TBaseHelper.deepCopy(other.optSetVal); + if (other.isSetI16Val()) { + this.i16Val = TBaseHelper.deepCopy(other.i16Val); } else { - this.optSetVal = null; + this.i16Val = null; } - if (other.isSetOptMapVal()) { - this.optMapVal = TBaseHelper.deepCopy(other.optMapVal); + if (other.isSetByteVal()) { + this.byteVal = TBaseHelper.deepCopy(other.byteVal); } else { - this.optMapVal = null; + this.byteVal = null; + } + if (other.isSetBoolVal()) { + this.boolVal = TBaseHelper.deepCopy(other.boolVal); + } else { + this.boolVal = null; } } @@ -341,139 +341,130 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl return new MyStructFieldPatch(this); } - public BoolPatch getBoolVal() { - return this.boolVal; - } - - // Returns true if field boolVal is set (has been assigned a value) and false otherwise - public boolean isSetBoolVal() { - return this.boolVal != null; - } - - public BytePatch getByteVal() { - return this.byteVal; + public MyStructFieldN30Patch getOptMapVal() { + return this.optMapVal; } - // Returns true if field byteVal is set (has been assigned a value) and false otherwise - public boolean isSetByteVal() { - return this.byteVal != null; + // Returns true if field optMapVal is set (has been assigned a value) and false otherwise + public boolean isSetOptMapVal() { + return this.optMapVal != null; } - public I16Patch getI16Val() { - return this.i16Val; + public MyStructFieldN29Patch getOptSetVal() { + return this.optSetVal; } - // Returns true if field i16Val is set (has been assigned a value) and false otherwise - public boolean isSetI16Val() { - return this.i16Val != null; + // Returns true if field optSetVal is set (has been assigned a value) and false otherwise + public boolean isSetOptSetVal() { + return this.optSetVal != null; } - public I32Patch getI32Val() { - return this.i32Val; + public MyStructFieldN28Patch getOptListVal() { + return this.optListVal; } - // Returns true if field i32Val is set (has been assigned a value) and false otherwise - public boolean isSetI32Val() { - return this.i32Val != null; + // Returns true if field optListVal is set (has been assigned a value) and false otherwise + public boolean isSetOptListVal() { + return this.optListVal != null; } - public I64Patch getI64Val() { - return this.i64Val; + public LateDefStructPatch getOptLateStructVal() { + return this.optLateStructVal; } - // Returns true if field i64Val is set (has been assigned a value) and false otherwise - public boolean isSetI64Val() { - return this.i64Val != null; + // Returns true if field optLateStructVal is set (has been assigned a value) and false otherwise + public boolean isSetOptLateStructVal() { + return this.optLateStructVal != null; } - public FloatPatch getFloatVal() { - return this.floatVal; + public MyDataPatch getOptStructVal() { + return this.optStructVal; } - // Returns true if field floatVal is set (has been assigned a value) and false otherwise - public boolean isSetFloatVal() { - return this.floatVal != null; + // Returns true if field optStructVal is set (has been assigned a value) and false otherwise + public boolean isSetOptStructVal() { + return this.optStructVal != null; } - public DoublePatch getDoubleVal() { - return this.doubleVal; + public MyStructFieldN25Patch getOptEnumVal() { + return this.optEnumVal; } - // Returns true if field doubleVal is set (has been assigned a value) and false otherwise - public boolean isSetDoubleVal() { - return this.doubleVal != null; + // Returns true if field optEnumVal is set (has been assigned a value) and false otherwise + public boolean isSetOptEnumVal() { + return this.optEnumVal != null; } - public StringPatch getStringVal() { - return this.stringVal; + public BinaryPatch getOptBinaryVal() { + return this.optBinaryVal; } - // Returns true if field stringVal is set (has been assigned a value) and false otherwise - public boolean isSetStringVal() { - return this.stringVal != null; + // Returns true if field optBinaryVal is set (has been assigned a value) and false otherwise + public boolean isSetOptBinaryVal() { + return this.optBinaryVal != null; } - public BinaryPatch getBinaryVal() { - return this.binaryVal; + public StringPatch getOptStringVal() { + return this.optStringVal; } - // Returns true if field binaryVal is set (has been assigned a value) and false otherwise - public boolean isSetBinaryVal() { - return this.binaryVal != null; + // Returns true if field optStringVal is set (has been assigned a value) and false otherwise + public boolean isSetOptStringVal() { + return this.optStringVal != null; } - public MyStructFieldN10Patch getEnumVal() { - return this.enumVal; + public DoublePatch getOptDoubleVal() { + return this.optDoubleVal; } - // Returns true if field enumVal is set (has been assigned a value) and false otherwise - public boolean isSetEnumVal() { - return this.enumVal != null; + // Returns true if field optDoubleVal is set (has been assigned a value) and false otherwise + public boolean isSetOptDoubleVal() { + return this.optDoubleVal != null; } - public MyDataPatch getStructVal() { - return this.structVal; + public FloatPatch getOptFloatVal() { + return this.optFloatVal; } - // Returns true if field structVal is set (has been assigned a value) and false otherwise - public boolean isSetStructVal() { - return this.structVal != null; + // Returns true if field optFloatVal is set (has been assigned a value) and false otherwise + public boolean isSetOptFloatVal() { + return this.optFloatVal != null; } - public MyUnionPatch getUnionVal() { - return this.unionVal; + public I64Patch getOptI64Val() { + return this.optI64Val; } - // Returns true if field unionVal is set (has been assigned a value) and false otherwise - public boolean isSetUnionVal() { - return this.unionVal != null; + // Returns true if field optI64Val is set (has been assigned a value) and false otherwise + public boolean isSetOptI64Val() { + return this.optI64Val != null; } - public LateDefStructPatch getLateStructVal() { - return this.lateStructVal; + public I32Patch getOptI32Val() { + return this.optI32Val; } - // Returns true if field lateStructVal is set (has been assigned a value) and false otherwise - public boolean isSetLateStructVal() { - return this.lateStructVal != null; + // Returns true if field optI32Val is set (has been assigned a value) and false otherwise + public boolean isSetOptI32Val() { + return this.optI32Val != null; } - public DurationPatch getDurationVal() { - return this.durationVal; + public I16Patch getOptI16Val() { + return this.optI16Val; } - // Returns true if field durationVal is set (has been assigned a value) and false otherwise - public boolean isSetDurationVal() { - return this.durationVal != null; + // Returns true if field optI16Val is set (has been assigned a value) and false otherwise + public boolean isSetOptI16Val() { + return this.optI16Val != null; } - public TimePatch getTimeVal() { - return this.timeVal; + public BytePatch getOptByteVal() { + return this.optByteVal; } - // Returns true if field timeVal is set (has been assigned a value) and false otherwise - public boolean isSetTimeVal() { - return this.timeVal != null; + // Returns true if field optByteVal is set (has been assigned a value) and false otherwise + public boolean isSetOptByteVal() { + return this.optByteVal != null; } public BoolPatch getOptBoolVal() { @@ -485,130 +476,139 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl return this.optBoolVal != null; } - public BytePatch getOptByteVal() { - return this.optByteVal; + public TimePatch getTimeVal() { + return this.timeVal; } - // Returns true if field optByteVal is set (has been assigned a value) and false otherwise - public boolean isSetOptByteVal() { - return this.optByteVal != null; + // Returns true if field timeVal is set (has been assigned a value) and false otherwise + public boolean isSetTimeVal() { + return this.timeVal != null; } - public I16Patch getOptI16Val() { - return this.optI16Val; + public DurationPatch getDurationVal() { + return this.durationVal; } - // Returns true if field optI16Val is set (has been assigned a value) and false otherwise - public boolean isSetOptI16Val() { - return this.optI16Val != null; + // Returns true if field durationVal is set (has been assigned a value) and false otherwise + public boolean isSetDurationVal() { + return this.durationVal != null; } - public I32Patch getOptI32Val() { - return this.optI32Val; + public LateDefStructPatch getLateStructVal() { + return this.lateStructVal; } - // Returns true if field optI32Val is set (has been assigned a value) and false otherwise - public boolean isSetOptI32Val() { - return this.optI32Val != null; + // Returns true if field lateStructVal is set (has been assigned a value) and false otherwise + public boolean isSetLateStructVal() { + return this.lateStructVal != null; } - public I64Patch getOptI64Val() { - return this.optI64Val; + public MyUnionPatch getUnionVal() { + return this.unionVal; } - // Returns true if field optI64Val is set (has been assigned a value) and false otherwise - public boolean isSetOptI64Val() { - return this.optI64Val != null; + // Returns true if field unionVal is set (has been assigned a value) and false otherwise + public boolean isSetUnionVal() { + return this.unionVal != null; } - public FloatPatch getOptFloatVal() { - return this.optFloatVal; + public MyDataPatch getStructVal() { + return this.structVal; } - // Returns true if field optFloatVal is set (has been assigned a value) and false otherwise - public boolean isSetOptFloatVal() { - return this.optFloatVal != null; + // Returns true if field structVal is set (has been assigned a value) and false otherwise + public boolean isSetStructVal() { + return this.structVal != null; } - public DoublePatch getOptDoubleVal() { - return this.optDoubleVal; + public MyStructFieldN10Patch getEnumVal() { + return this.enumVal; } - // Returns true if field optDoubleVal is set (has been assigned a value) and false otherwise - public boolean isSetOptDoubleVal() { - return this.optDoubleVal != null; + // Returns true if field enumVal is set (has been assigned a value) and false otherwise + public boolean isSetEnumVal() { + return this.enumVal != null; } - public StringPatch getOptStringVal() { - return this.optStringVal; + public BinaryPatch getBinaryVal() { + return this.binaryVal; } - // Returns true if field optStringVal is set (has been assigned a value) and false otherwise - public boolean isSetOptStringVal() { - return this.optStringVal != null; + // Returns true if field binaryVal is set (has been assigned a value) and false otherwise + public boolean isSetBinaryVal() { + return this.binaryVal != null; } - public BinaryPatch getOptBinaryVal() { - return this.optBinaryVal; + public StringPatch getStringVal() { + return this.stringVal; } - // Returns true if field optBinaryVal is set (has been assigned a value) and false otherwise - public boolean isSetOptBinaryVal() { - return this.optBinaryVal != null; + // Returns true if field stringVal is set (has been assigned a value) and false otherwise + public boolean isSetStringVal() { + return this.stringVal != null; } - public MyStructFieldN25Patch getOptEnumVal() { - return this.optEnumVal; + public DoublePatch getDoubleVal() { + return this.doubleVal; } - // Returns true if field optEnumVal is set (has been assigned a value) and false otherwise - public boolean isSetOptEnumVal() { - return this.optEnumVal != null; + // Returns true if field doubleVal is set (has been assigned a value) and false otherwise + public boolean isSetDoubleVal() { + return this.doubleVal != null; } - public MyDataPatch getOptStructVal() { - return this.optStructVal; + public FloatPatch getFloatVal() { + return this.floatVal; } - // Returns true if field optStructVal is set (has been assigned a value) and false otherwise - public boolean isSetOptStructVal() { - return this.optStructVal != null; + // Returns true if field floatVal is set (has been assigned a value) and false otherwise + public boolean isSetFloatVal() { + return this.floatVal != null; } - public LateDefStructPatch getOptLateStructVal() { - return this.optLateStructVal; + public I64Patch getI64Val() { + return this.i64Val; } - // Returns true if field optLateStructVal is set (has been assigned a value) and false otherwise - public boolean isSetOptLateStructVal() { - return this.optLateStructVal != null; + // Returns true if field i64Val is set (has been assigned a value) and false otherwise + public boolean isSetI64Val() { + return this.i64Val != null; } - public MyStructFieldN28Patch getOptListVal() { - return this.optListVal; + public I32Patch getI32Val() { + return this.i32Val; } - // Returns true if field optListVal is set (has been assigned a value) and false otherwise - public boolean isSetOptListVal() { - return this.optListVal != null; + // Returns true if field i32Val is set (has been assigned a value) and false otherwise + public boolean isSetI32Val() { + return this.i32Val != null; } - public MyStructFieldN29Patch getOptSetVal() { - return this.optSetVal; + public I16Patch getI16Val() { + return this.i16Val; } - // Returns true if field optSetVal is set (has been assigned a value) and false otherwise - public boolean isSetOptSetVal() { - return this.optSetVal != null; + // Returns true if field i16Val is set (has been assigned a value) and false otherwise + public boolean isSetI16Val() { + return this.i16Val != null; } - public MyStructFieldN30Patch getOptMapVal() { - return this.optMapVal; + public BytePatch getByteVal() { + return this.byteVal; } - // Returns true if field optMapVal is set (has been assigned a value) and false otherwise - public boolean isSetOptMapVal() { - return this.optMapVal != null; + // Returns true if field byteVal is set (has been assigned a value) and false otherwise + public boolean isSetByteVal() { + return this.byteVal != null; + } + + public BoolPatch getBoolVal() { + return this.boolVal; + } + + // Returns true if field boolVal is set (has been assigned a value) and false otherwise + public boolean isSetBoolVal() { + return this.boolVal != null; } @Override @@ -621,72 +621,72 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl return false; MyStructFieldPatch that = (MyStructFieldPatch)_that; - if (!TBaseHelper.equalsNobinary(this.isSetBoolVal(), that.isSetBoolVal(), this.boolVal, that.boolVal)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.isSetByteVal(), that.isSetByteVal(), this.byteVal, that.byteVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptMapVal(), that.isSetOptMapVal(), this.optMapVal, that.optMapVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetI16Val(), that.isSetI16Val(), this.i16Val, that.i16Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptSetVal(), that.isSetOptSetVal(), this.optSetVal, that.optSetVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetI32Val(), that.isSetI32Val(), this.i32Val, that.i32Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptListVal(), that.isSetOptListVal(), this.optListVal, that.optListVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetI64Val(), that.isSetI64Val(), this.i64Val, that.i64Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptLateStructVal(), that.isSetOptLateStructVal(), this.optLateStructVal, that.optLateStructVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetFloatVal(), that.isSetFloatVal(), this.floatVal, that.floatVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptStructVal(), that.isSetOptStructVal(), this.optStructVal, that.optStructVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetDoubleVal(), that.isSetDoubleVal(), this.doubleVal, that.doubleVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptEnumVal(), that.isSetOptEnumVal(), this.optEnumVal, that.optEnumVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetStringVal(), that.isSetStringVal(), this.stringVal, that.stringVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptBinaryVal(), that.isSetOptBinaryVal(), this.optBinaryVal, that.optBinaryVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetBinaryVal(), that.isSetBinaryVal(), this.binaryVal, that.binaryVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptStringVal(), that.isSetOptStringVal(), this.optStringVal, that.optStringVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetEnumVal(), that.isSetEnumVal(), this.enumVal, that.enumVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptDoubleVal(), that.isSetOptDoubleVal(), this.optDoubleVal, that.optDoubleVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetStructVal(), that.isSetStructVal(), this.structVal, that.structVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptFloatVal(), that.isSetOptFloatVal(), this.optFloatVal, that.optFloatVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetUnionVal(), that.isSetUnionVal(), this.unionVal, that.unionVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptI64Val(), that.isSetOptI64Val(), this.optI64Val, that.optI64Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetLateStructVal(), that.isSetLateStructVal(), this.lateStructVal, that.lateStructVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptI32Val(), that.isSetOptI32Val(), this.optI32Val, that.optI32Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetDurationVal(), that.isSetDurationVal(), this.durationVal, that.durationVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptI16Val(), that.isSetOptI16Val(), this.optI16Val, that.optI16Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetTimeVal(), that.isSetTimeVal(), this.timeVal, that.timeVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptByteVal(), that.isSetOptByteVal(), this.optByteVal, that.optByteVal)) { return false; } if (!TBaseHelper.equalsNobinary(this.isSetOptBoolVal(), that.isSetOptBoolVal(), this.optBoolVal, that.optBoolVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptByteVal(), that.isSetOptByteVal(), this.optByteVal, that.optByteVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetTimeVal(), that.isSetTimeVal(), this.timeVal, that.timeVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptI16Val(), that.isSetOptI16Val(), this.optI16Val, that.optI16Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetDurationVal(), that.isSetDurationVal(), this.durationVal, that.durationVal)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.isSetLateStructVal(), that.isSetLateStructVal(), this.lateStructVal, that.lateStructVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptI32Val(), that.isSetOptI32Val(), this.optI32Val, that.optI32Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetUnionVal(), that.isSetUnionVal(), this.unionVal, that.unionVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptI64Val(), that.isSetOptI64Val(), this.optI64Val, that.optI64Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetStructVal(), that.isSetStructVal(), this.structVal, that.structVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptFloatVal(), that.isSetOptFloatVal(), this.optFloatVal, that.optFloatVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetEnumVal(), that.isSetEnumVal(), this.enumVal, that.enumVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptDoubleVal(), that.isSetOptDoubleVal(), this.optDoubleVal, that.optDoubleVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetBinaryVal(), that.isSetBinaryVal(), this.binaryVal, that.binaryVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptStringVal(), that.isSetOptStringVal(), this.optStringVal, that.optStringVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetStringVal(), that.isSetStringVal(), this.stringVal, that.stringVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptBinaryVal(), that.isSetOptBinaryVal(), this.optBinaryVal, that.optBinaryVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetDoubleVal(), that.isSetDoubleVal(), this.doubleVal, that.doubleVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptEnumVal(), that.isSetOptEnumVal(), this.optEnumVal, that.optEnumVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetFloatVal(), that.isSetFloatVal(), this.floatVal, that.floatVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptStructVal(), that.isSetOptStructVal(), this.optStructVal, that.optStructVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetI64Val(), that.isSetI64Val(), this.i64Val, that.i64Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptLateStructVal(), that.isSetOptLateStructVal(), this.optLateStructVal, that.optLateStructVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetI32Val(), that.isSetI32Val(), this.i32Val, that.i32Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptListVal(), that.isSetOptListVal(), this.optListVal, that.optListVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetI16Val(), that.isSetI16Val(), this.i16Val, that.i16Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptSetVal(), that.isSetOptSetVal(), this.optSetVal, that.optSetVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetByteVal(), that.isSetByteVal(), this.byteVal, that.byteVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptMapVal(), that.isSetOptMapVal(), this.optMapVal, that.optMapVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetBoolVal(), that.isSetBoolVal(), this.boolVal, that.boolVal)) { return false; } return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {boolVal, byteVal, i16Val, i32Val, i64Val, floatVal, doubleVal, stringVal, binaryVal, enumVal, structVal, unionVal, lateStructVal, durationVal, timeVal, optBoolVal, optByteVal, optI16Val, optI32Val, optI64Val, optFloatVal, optDoubleVal, optStringVal, optBinaryVal, optEnumVal, optStructVal, optLateStructVal, optListVal, optSetVal, optMapVal}); + return Arrays.deepHashCode(new Object[] {optMapVal, optSetVal, optListVal, optLateStructVal, optStructVal, optEnumVal, optBinaryVal, optStringVal, optDoubleVal, optFloatVal, optI64Val, optI32Val, optI16Val, optByteVal, optBoolVal, timeVal, durationVal, lateStructVal, unionVal, structVal, enumVal, binaryVal, stringVal, doubleVal, floatVal, i64Val, i32Val, i16Val, byteVal, boolVal}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. @@ -695,36 +695,36 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl } public static MyStructFieldPatch deserialize(TProtocol iprot) throws TException { - BoolPatch tmp_boolVal = null; - BytePatch tmp_byteVal = null; - I16Patch tmp_i16Val = null; - I32Patch tmp_i32Val = null; - I64Patch tmp_i64Val = null; - FloatPatch tmp_floatVal = null; - DoublePatch tmp_doubleVal = null; - StringPatch tmp_stringVal = null; - BinaryPatch tmp_binaryVal = null; - MyStructFieldN10Patch tmp_enumVal = null; - MyDataPatch tmp_structVal = null; - MyUnionPatch tmp_unionVal = null; - LateDefStructPatch tmp_lateStructVal = null; - DurationPatch tmp_durationVal = null; - TimePatch tmp_timeVal = null; - BoolPatch tmp_optBoolVal = null; - BytePatch tmp_optByteVal = null; - I16Patch tmp_optI16Val = null; - I32Patch tmp_optI32Val = null; - I64Patch tmp_optI64Val = null; - FloatPatch tmp_optFloatVal = null; - DoublePatch tmp_optDoubleVal = null; - StringPatch tmp_optStringVal = null; - BinaryPatch tmp_optBinaryVal = null; - MyStructFieldN25Patch tmp_optEnumVal = null; - MyDataPatch tmp_optStructVal = null; - LateDefStructPatch tmp_optLateStructVal = null; - MyStructFieldN28Patch tmp_optListVal = null; - MyStructFieldN29Patch tmp_optSetVal = null; MyStructFieldN30Patch tmp_optMapVal = null; + MyStructFieldN29Patch tmp_optSetVal = null; + MyStructFieldN28Patch tmp_optListVal = null; + LateDefStructPatch tmp_optLateStructVal = null; + MyDataPatch tmp_optStructVal = null; + MyStructFieldN25Patch tmp_optEnumVal = null; + BinaryPatch tmp_optBinaryVal = null; + StringPatch tmp_optStringVal = null; + DoublePatch tmp_optDoubleVal = null; + FloatPatch tmp_optFloatVal = null; + I64Patch tmp_optI64Val = null; + I32Patch tmp_optI32Val = null; + I16Patch tmp_optI16Val = null; + BytePatch tmp_optByteVal = null; + BoolPatch tmp_optBoolVal = null; + TimePatch tmp_timeVal = null; + DurationPatch tmp_durationVal = null; + LateDefStructPatch tmp_lateStructVal = null; + MyUnionPatch tmp_unionVal = null; + MyDataPatch tmp_structVal = null; + MyStructFieldN10Patch tmp_enumVal = null; + BinaryPatch tmp_binaryVal = null; + StringPatch tmp_stringVal = null; + DoublePatch tmp_doubleVal = null; + FloatPatch tmp_floatVal = null; + I64Patch tmp_i64Val = null; + I32Patch tmp_i32Val = null; + I16Patch tmp_i16Val = null; + BytePatch tmp_byteVal = null; + BoolPatch tmp_boolVal = null; TField __field; iprot.readStructBegin(); while (true) @@ -735,212 +735,212 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl } switch (__field.id) { - case BOOLVAL: + case OPTMAPVAL: if (__field.type == TType.STRUCT) { - tmp_boolVal = BoolPatch.deserialize(iprot); + tmp_optMapVal = MyStructFieldN30Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case BYTEVAL: + case OPTSETVAL: if (__field.type == TType.STRUCT) { - tmp_byteVal = BytePatch.deserialize(iprot); + tmp_optSetVal = MyStructFieldN29Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case I16VAL: + case OPTLISTVAL: if (__field.type == TType.STRUCT) { - tmp_i16Val = I16Patch.deserialize(iprot); + tmp_optListVal = MyStructFieldN28Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case I32VAL: + case OPTLATESTRUCTVAL: if (__field.type == TType.STRUCT) { - tmp_i32Val = I32Patch.deserialize(iprot); + tmp_optLateStructVal = LateDefStructPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case I64VAL: + case OPTSTRUCTVAL: if (__field.type == TType.STRUCT) { - tmp_i64Val = I64Patch.deserialize(iprot); + tmp_optStructVal = MyDataPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case FLOATVAL: + case OPTENUMVAL: if (__field.type == TType.STRUCT) { - tmp_floatVal = FloatPatch.deserialize(iprot); + tmp_optEnumVal = MyStructFieldN25Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case DOUBLEVAL: + case OPTBINARYVAL: if (__field.type == TType.STRUCT) { - tmp_doubleVal = DoublePatch.deserialize(iprot); + tmp_optBinaryVal = BinaryPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case STRINGVAL: + case OPTSTRINGVAL: if (__field.type == TType.STRUCT) { - tmp_stringVal = StringPatch.deserialize(iprot); + tmp_optStringVal = StringPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case BINARYVAL: + case OPTDOUBLEVAL: if (__field.type == TType.STRUCT) { - tmp_binaryVal = BinaryPatch.deserialize(iprot); + tmp_optDoubleVal = DoublePatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case ENUMVAL: + case OPTFLOATVAL: if (__field.type == TType.STRUCT) { - tmp_enumVal = MyStructFieldN10Patch.deserialize(iprot); + tmp_optFloatVal = FloatPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case STRUCTVAL: + case OPTI64VAL: if (__field.type == TType.STRUCT) { - tmp_structVal = MyDataPatch.deserialize(iprot); + tmp_optI64Val = I64Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case UNIONVAL: + case OPTI32VAL: if (__field.type == TType.STRUCT) { - tmp_unionVal = MyUnionPatch.deserialize(iprot); + tmp_optI32Val = I32Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case LATESTRUCTVAL: + case OPTI16VAL: if (__field.type == TType.STRUCT) { - tmp_lateStructVal = LateDefStructPatch.deserialize(iprot); + tmp_optI16Val = I16Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case DURATIONVAL: + case OPTBYTEVAL: if (__field.type == TType.STRUCT) { - tmp_durationVal = DurationPatch.deserialize(iprot); + tmp_optByteVal = BytePatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case TIMEVAL: + case OPTBOOLVAL: if (__field.type == TType.STRUCT) { - tmp_timeVal = TimePatch.deserialize(iprot); + tmp_optBoolVal = BoolPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTBOOLVAL: + case TIMEVAL: if (__field.type == TType.STRUCT) { - tmp_optBoolVal = BoolPatch.deserialize(iprot); + tmp_timeVal = TimePatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTBYTEVAL: + case DURATIONVAL: if (__field.type == TType.STRUCT) { - tmp_optByteVal = BytePatch.deserialize(iprot); + tmp_durationVal = DurationPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTI16VAL: + case LATESTRUCTVAL: if (__field.type == TType.STRUCT) { - tmp_optI16Val = I16Patch.deserialize(iprot); + tmp_lateStructVal = LateDefStructPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTI32VAL: + case UNIONVAL: if (__field.type == TType.STRUCT) { - tmp_optI32Val = I32Patch.deserialize(iprot); + tmp_unionVal = MyUnionPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTI64VAL: + case STRUCTVAL: if (__field.type == TType.STRUCT) { - tmp_optI64Val = I64Patch.deserialize(iprot); + tmp_structVal = MyDataPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTFLOATVAL: + case ENUMVAL: if (__field.type == TType.STRUCT) { - tmp_optFloatVal = FloatPatch.deserialize(iprot); + tmp_enumVal = MyStructFieldN10Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTDOUBLEVAL: + case BINARYVAL: if (__field.type == TType.STRUCT) { - tmp_optDoubleVal = DoublePatch.deserialize(iprot); + tmp_binaryVal = BinaryPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTSTRINGVAL: + case STRINGVAL: if (__field.type == TType.STRUCT) { - tmp_optStringVal = StringPatch.deserialize(iprot); + tmp_stringVal = StringPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTBINARYVAL: + case DOUBLEVAL: if (__field.type == TType.STRUCT) { - tmp_optBinaryVal = BinaryPatch.deserialize(iprot); + tmp_doubleVal = DoublePatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTENUMVAL: + case FLOATVAL: if (__field.type == TType.STRUCT) { - tmp_optEnumVal = MyStructFieldN25Patch.deserialize(iprot); + tmp_floatVal = FloatPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTSTRUCTVAL: + case I64VAL: if (__field.type == TType.STRUCT) { - tmp_optStructVal = MyDataPatch.deserialize(iprot); + tmp_i64Val = I64Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTLATESTRUCTVAL: + case I32VAL: if (__field.type == TType.STRUCT) { - tmp_optLateStructVal = LateDefStructPatch.deserialize(iprot); + tmp_i32Val = I32Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTLISTVAL: + case I16VAL: if (__field.type == TType.STRUCT) { - tmp_optListVal = MyStructFieldN28Patch.deserialize(iprot); + tmp_i16Val = I16Patch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTSETVAL: + case BYTEVAL: if (__field.type == TType.STRUCT) { - tmp_optSetVal = MyStructFieldN29Patch.deserialize(iprot); + tmp_byteVal = BytePatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTMAPVAL: + case BOOLVAL: if (__field.type == TType.STRUCT) { - tmp_optMapVal = MyStructFieldN30Patch.deserialize(iprot); + tmp_boolVal = BoolPatch.deserialize(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } @@ -955,36 +955,36 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl MyStructFieldPatch _that; _that = new MyStructFieldPatch( - tmp_boolVal - ,tmp_byteVal - ,tmp_i16Val - ,tmp_i32Val - ,tmp_i64Val - ,tmp_floatVal - ,tmp_doubleVal - ,tmp_stringVal - ,tmp_binaryVal - ,tmp_enumVal - ,tmp_structVal - ,tmp_unionVal - ,tmp_lateStructVal - ,tmp_durationVal - ,tmp_timeVal - ,tmp_optBoolVal - ,tmp_optByteVal - ,tmp_optI16Val - ,tmp_optI32Val - ,tmp_optI64Val - ,tmp_optFloatVal - ,tmp_optDoubleVal - ,tmp_optStringVal - ,tmp_optBinaryVal - ,tmp_optEnumVal - ,tmp_optStructVal - ,tmp_optLateStructVal - ,tmp_optListVal + tmp_optMapVal ,tmp_optSetVal - ,tmp_optMapVal + ,tmp_optListVal + ,tmp_optLateStructVal + ,tmp_optStructVal + ,tmp_optEnumVal + ,tmp_optBinaryVal + ,tmp_optStringVal + ,tmp_optDoubleVal + ,tmp_optFloatVal + ,tmp_optI64Val + ,tmp_optI32Val + ,tmp_optI16Val + ,tmp_optByteVal + ,tmp_optBoolVal + ,tmp_timeVal + ,tmp_durationVal + ,tmp_lateStructVal + ,tmp_unionVal + ,tmp_structVal + ,tmp_enumVal + ,tmp_binaryVal + ,tmp_stringVal + ,tmp_doubleVal + ,tmp_floatVal + ,tmp_i64Val + ,tmp_i32Val + ,tmp_i16Val + ,tmp_byteVal + ,tmp_boolVal ); _that.validate(); return _that; diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_data.cpp b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_data.cpp index 3bef9fe7a9a..f4e76ece5b5 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_data.cpp +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_data.cpp @@ -641,68 +641,68 @@ const std::array TStructDataStorage<::test::fixtures::patch::LateDefStru }}; const std::array TStructDataStorage<::test::fixtures::patch::MyStructFieldPatchStruct>::fields_names = {{ - "boolVal", - "byteVal", - "i16Val", - "i32Val", - "i64Val", - "floatVal", - "doubleVal", - "stringVal", - "binaryVal", - "enumVal", - "structVal", - "unionVal", - "lateStructVal", - "durationVal", - "timeVal", - "optBoolVal", - "optByteVal", - "optI16Val", - "optI32Val", - "optI64Val", - "optFloatVal", - "optDoubleVal", - "optStringVal", - "optBinaryVal", - "optEnumVal", - "optStructVal", - "optLateStructVal", - "optListVal", - "optSetVal", "optMapVal", + "optSetVal", + "optListVal", + "optLateStructVal", + "optStructVal", + "optEnumVal", + "optBinaryVal", + "optStringVal", + "optDoubleVal", + "optFloatVal", + "optI64Val", + "optI32Val", + "optI16Val", + "optByteVal", + "optBoolVal", + "timeVal", + "durationVal", + "lateStructVal", + "unionVal", + "structVal", + "enumVal", + "binaryVal", + "stringVal", + "doubleVal", + "floatVal", + "i64Val", + "i32Val", + "i16Val", + "byteVal", + "boolVal", }}; const std::array TStructDataStorage<::test::fixtures::patch::MyStructFieldPatchStruct>::fields_ids = {{ - -1, - -2, - -3, - -4, - -5, - -6, - -7, - -8, - -9, - -10, - -11, - -12, - -13, - -14, - -15, - -16, - -17, - -18, - -19, - -20, - -21, - -22, - -23, - -24, - -25, - -26, - -27, - -28, - -29, -30, + -29, + -28, + -27, + -26, + -25, + -24, + -23, + -22, + -21, + -20, + -19, + -18, + -17, + -16, + -15, + -14, + -13, + -12, + -11, + -10, + -9, + -8, + -7, + -6, + -5, + -4, + -3, + -2, + -1, }}; const std::array TStructDataStorage<::test::fixtures::patch::MyStructFieldPatchStruct>::fields_types = {{ TType::T_STRUCT, @@ -737,36 +737,36 @@ const std::array TStructDataStorage<::test::fixtures::patch TType::T_STRUCT, }}; const std::array TStructDataStorage<::test::fixtures::patch::MyStructFieldPatchStruct>::storage_names = {{ - "__fbthrift_field_boolVal", - "__fbthrift_field_byteVal", - "__fbthrift_field_i16Val", - "__fbthrift_field_i32Val", - "__fbthrift_field_i64Val", - "__fbthrift_field_floatVal", - "__fbthrift_field_doubleVal", - "__fbthrift_field_stringVal", - "__fbthrift_field_binaryVal", - "__fbthrift_field_enumVal", - "__fbthrift_field_structVal", - "__fbthrift_field_unionVal", - "__fbthrift_field_lateStructVal", - "__fbthrift_field_durationVal", - "__fbthrift_field_timeVal", - "__fbthrift_field_optBoolVal", - "__fbthrift_field_optByteVal", - "__fbthrift_field_optI16Val", - "__fbthrift_field_optI32Val", - "__fbthrift_field_optI64Val", - "__fbthrift_field_optFloatVal", - "__fbthrift_field_optDoubleVal", - "__fbthrift_field_optStringVal", - "__fbthrift_field_optBinaryVal", - "__fbthrift_field_optEnumVal", - "__fbthrift_field_optStructVal", - "__fbthrift_field_optLateStructVal", - "__fbthrift_field_optListVal", - "__fbthrift_field_optSetVal", "__fbthrift_field_optMapVal", + "__fbthrift_field_optSetVal", + "__fbthrift_field_optListVal", + "__fbthrift_field_optLateStructVal", + "__fbthrift_field_optStructVal", + "__fbthrift_field_optEnumVal", + "__fbthrift_field_optBinaryVal", + "__fbthrift_field_optStringVal", + "__fbthrift_field_optDoubleVal", + "__fbthrift_field_optFloatVal", + "__fbthrift_field_optI64Val", + "__fbthrift_field_optI32Val", + "__fbthrift_field_optI16Val", + "__fbthrift_field_optByteVal", + "__fbthrift_field_optBoolVal", + "__fbthrift_field_timeVal", + "__fbthrift_field_durationVal", + "__fbthrift_field_lateStructVal", + "__fbthrift_field_unionVal", + "__fbthrift_field_structVal", + "__fbthrift_field_enumVal", + "__fbthrift_field_binaryVal", + "__fbthrift_field_stringVal", + "__fbthrift_field_doubleVal", + "__fbthrift_field_floatVal", + "__fbthrift_field_i64Val", + "__fbthrift_field_i32Val", + "__fbthrift_field_i16Val", + "__fbthrift_field_byteVal", + "__fbthrift_field_boolVal", }}; const std::array TStructDataStorage<::test::fixtures::patch::MyStructFieldPatchStruct>::isset_indexes = {{ 0, diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_for_each_field.h b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_for_each_field.h index e2715d7517b..e25024f8a3b 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_for_each_field.h +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_for_each_field.h @@ -224,36 +224,36 @@ template <> struct ForEachField<::test::fixtures::patch::MyStructFieldPatchStruct> { template void operator()(FOLLY_MAYBE_UNUSED F&& f, FOLLY_MAYBE_UNUSED T&&... t) const { - f(0, static_cast(t).boolVal_ref()...); - f(1, static_cast(t).byteVal_ref()...); - f(2, static_cast(t).i16Val_ref()...); - f(3, static_cast(t).i32Val_ref()...); - f(4, static_cast(t).i64Val_ref()...); - f(5, static_cast(t).floatVal_ref()...); - f(6, static_cast(t).doubleVal_ref()...); - f(7, static_cast(t).stringVal_ref()...); - f(8, static_cast(t).binaryVal_ref()...); - f(9, static_cast(t).enumVal_ref()...); - f(10, static_cast(t).structVal_ref()...); - f(11, static_cast(t).unionVal_ref()...); - f(12, static_cast(t).lateStructVal_ref()...); - f(13, static_cast(t).durationVal_ref()...); - f(14, static_cast(t).timeVal_ref()...); - f(15, static_cast(t).optBoolVal_ref()...); - f(16, static_cast(t).optByteVal_ref()...); - f(17, static_cast(t).optI16Val_ref()...); - f(18, static_cast(t).optI32Val_ref()...); - f(19, static_cast(t).optI64Val_ref()...); - f(20, static_cast(t).optFloatVal_ref()...); - f(21, static_cast(t).optDoubleVal_ref()...); - f(22, static_cast(t).optStringVal_ref()...); - f(23, static_cast(t).optBinaryVal_ref()...); - f(24, static_cast(t).optEnumVal_ref()...); - f(25, static_cast(t).optStructVal_ref()...); - f(26, static_cast(t).optLateStructVal_ref()...); - f(27, static_cast(t).optListVal_ref()...); - f(28, static_cast(t).optSetVal_ref()...); - f(29, static_cast(t).optMapVal_ref()...); + f(0, static_cast(t).optMapVal_ref()...); + f(1, static_cast(t).optSetVal_ref()...); + f(2, static_cast(t).optListVal_ref()...); + f(3, static_cast(t).optLateStructVal_ref()...); + f(4, static_cast(t).optStructVal_ref()...); + f(5, static_cast(t).optEnumVal_ref()...); + f(6, static_cast(t).optBinaryVal_ref()...); + f(7, static_cast(t).optStringVal_ref()...); + f(8, static_cast(t).optDoubleVal_ref()...); + f(9, static_cast(t).optFloatVal_ref()...); + f(10, static_cast(t).optI64Val_ref()...); + f(11, static_cast(t).optI32Val_ref()...); + f(12, static_cast(t).optI16Val_ref()...); + f(13, static_cast(t).optByteVal_ref()...); + f(14, static_cast(t).optBoolVal_ref()...); + f(15, static_cast(t).timeVal_ref()...); + f(16, static_cast(t).durationVal_ref()...); + f(17, static_cast(t).lateStructVal_ref()...); + f(18, static_cast(t).unionVal_ref()...); + f(19, static_cast(t).structVal_ref()...); + f(20, static_cast(t).enumVal_ref()...); + f(21, static_cast(t).binaryVal_ref()...); + f(22, static_cast(t).stringVal_ref()...); + f(23, static_cast(t).doubleVal_ref()...); + f(24, static_cast(t).floatVal_ref()...); + f(25, static_cast(t).i64Val_ref()...); + f(26, static_cast(t).i32Val_ref()...); + f(27, static_cast(t).i16Val_ref()...); + f(28, static_cast(t).byteVal_ref()...); + f(29, static_cast(t).boolVal_ref()...); } }; diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_metadata.cpp b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_metadata.cpp index fb1188fc53f..f5327ed2f95 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_metadata.cpp +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_metadata.cpp @@ -534,36 +534,36 @@ StructMetadata<::test::fixtures::patch::MyStructFieldPatchStruct>::gen(ThriftMet module_MyStructFieldPatch.is_union() = false; static const auto* const module_MyStructFieldPatch_fields = new std::array{{ - {-1, "boolVal", false, std::make_unique>("patch.BoolPatch"), std::vector{}}, - {-2, "byteVal", false, std::make_unique>("patch.BytePatch"), std::vector{}}, - {-3, "i16Val", false, std::make_unique>("patch.I16Patch"), std::vector{}}, - {-4, "i32Val", false, std::make_unique>("patch.I32Patch"), std::vector{}}, - {-5, "i64Val", false, std::make_unique>("patch.I64Patch"), std::vector{}}, - {-6, "floatVal", false, std::make_unique>("patch.FloatPatch"), std::vector{}}, - {-7, "doubleVal", false, std::make_unique>("patch.DoublePatch"), std::vector{}}, - {-8, "stringVal", false, std::make_unique>("patch.StringPatch"), std::vector{}}, - {-9, "binaryVal", false, std::make_unique>("patch.BinaryPatch"), std::vector{}}, - {-10, "enumVal", false, std::make_unique>("module.MyStructFieldN10Patch"), std::vector{}}, - {-11, "structVal", false, std::make_unique>("module.MyDataPatch"), std::vector{}}, - {-12, "unionVal", false, std::make_unique>("module.MyUnionPatch"), std::vector{}}, - {-13, "lateStructVal", false, std::make_unique("module.LateDefStructPatch", std::make_unique>("module.LateDefStructPatch"), std::vector{}), std::vector{}}, - {-14, "durationVal", false, std::make_unique>("patch.DurationPatch"), std::vector{}}, - {-15, "timeVal", false, std::make_unique>("patch.TimePatch"), std::vector{}}, - {-16, "optBoolVal", false, std::make_unique>("patch.BoolPatch"), std::vector{}}, - {-17, "optByteVal", false, std::make_unique>("patch.BytePatch"), std::vector{}}, - {-18, "optI16Val", false, std::make_unique>("patch.I16Patch"), std::vector{}}, - {-19, "optI32Val", false, std::make_unique>("patch.I32Patch"), std::vector{}}, - {-20, "optI64Val", false, std::make_unique>("patch.I64Patch"), std::vector{}}, - {-21, "optFloatVal", false, std::make_unique>("patch.FloatPatch"), std::vector{}}, - {-22, "optDoubleVal", false, std::make_unique>("patch.DoublePatch"), std::vector{}}, - {-23, "optStringVal", false, std::make_unique>("patch.StringPatch"), std::vector{}}, - {-24, "optBinaryVal", false, std::make_unique>("patch.BinaryPatch"), std::vector{}}, - {-25, "optEnumVal", false, std::make_unique>("module.MyStructFieldN25Patch"), std::vector{}}, - {-26, "optStructVal", false, std::make_unique>("module.MyDataPatch"), std::vector{}}, - {-27, "optLateStructVal", false, std::make_unique("module.LateDefStructPatch", std::make_unique>("module.LateDefStructPatch"), std::vector{}), std::vector{}}, - {-28, "optListVal", false, std::make_unique>("module.MyStructFieldN28Patch"), std::vector{}}, - {-29, "optSetVal", false, std::make_unique>("module.MyStructFieldN29Patch"), std::vector{}}, {-30, "optMapVal", false, std::make_unique>("module.MyStructFieldN30Patch"), std::vector{}}, + {-29, "optSetVal", false, std::make_unique>("module.MyStructFieldN29Patch"), std::vector{}}, + {-28, "optListVal", false, std::make_unique>("module.MyStructFieldN28Patch"), std::vector{}}, + {-27, "optLateStructVal", false, std::make_unique("module.LateDefStructPatch", std::make_unique>("module.LateDefStructPatch"), std::vector{}), std::vector{}}, + {-26, "optStructVal", false, std::make_unique>("module.MyDataPatch"), std::vector{}}, + {-25, "optEnumVal", false, std::make_unique>("module.MyStructFieldN25Patch"), std::vector{}}, + {-24, "optBinaryVal", false, std::make_unique>("patch.BinaryPatch"), std::vector{}}, + {-23, "optStringVal", false, std::make_unique>("patch.StringPatch"), std::vector{}}, + {-22, "optDoubleVal", false, std::make_unique>("patch.DoublePatch"), std::vector{}}, + {-21, "optFloatVal", false, std::make_unique>("patch.FloatPatch"), std::vector{}}, + {-20, "optI64Val", false, std::make_unique>("patch.I64Patch"), std::vector{}}, + {-19, "optI32Val", false, std::make_unique>("patch.I32Patch"), std::vector{}}, + {-18, "optI16Val", false, std::make_unique>("patch.I16Patch"), std::vector{}}, + {-17, "optByteVal", false, std::make_unique>("patch.BytePatch"), std::vector{}}, + {-16, "optBoolVal", false, std::make_unique>("patch.BoolPatch"), std::vector{}}, + {-15, "timeVal", false, std::make_unique>("patch.TimePatch"), std::vector{}}, + {-14, "durationVal", false, std::make_unique>("patch.DurationPatch"), std::vector{}}, + {-13, "lateStructVal", false, std::make_unique("module.LateDefStructPatch", std::make_unique>("module.LateDefStructPatch"), std::vector{}), std::vector{}}, + {-12, "unionVal", false, std::make_unique>("module.MyUnionPatch"), std::vector{}}, + {-11, "structVal", false, std::make_unique>("module.MyDataPatch"), std::vector{}}, + {-10, "enumVal", false, std::make_unique>("module.MyStructFieldN10Patch"), std::vector{}}, + {-9, "binaryVal", false, std::make_unique>("patch.BinaryPatch"), std::vector{}}, + {-8, "stringVal", false, std::make_unique>("patch.StringPatch"), std::vector{}}, + {-7, "doubleVal", false, std::make_unique>("patch.DoublePatch"), std::vector{}}, + {-6, "floatVal", false, std::make_unique>("patch.FloatPatch"), std::vector{}}, + {-5, "i64Val", false, std::make_unique>("patch.I64Patch"), std::vector{}}, + {-4, "i32Val", false, std::make_unique>("patch.I32Patch"), std::vector{}}, + {-3, "i16Val", false, std::make_unique>("patch.I16Patch"), std::vector{}}, + {-2, "byteVal", false, std::make_unique>("patch.BytePatch"), std::vector{}}, + {-1, "boolVal", false, std::make_unique>("patch.BoolPatch"), std::vector{}}, }}; for (const auto& f : *module_MyStructFieldPatch_fields) { ::apache::thrift::metadata::ThriftField field; diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.cpp b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.cpp index c073f74b81b..b6dfde6fb56 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.cpp +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.cpp @@ -3134,67 +3134,67 @@ const folly::StringPiece MyStructFieldPatchStruct::__fbthrift_get_field_name(::a } MyStructFieldPatchStruct::MyStructFieldPatchStruct(const MyStructFieldPatchStruct& srcObj) : - __fbthrift_field_boolVal(srcObj.__fbthrift_field_boolVal), - __fbthrift_field_byteVal(srcObj.__fbthrift_field_byteVal), - __fbthrift_field_i16Val(srcObj.__fbthrift_field_i16Val), - __fbthrift_field_i32Val(srcObj.__fbthrift_field_i32Val), - __fbthrift_field_i64Val(srcObj.__fbthrift_field_i64Val), - __fbthrift_field_floatVal(srcObj.__fbthrift_field_floatVal), - __fbthrift_field_doubleVal(srcObj.__fbthrift_field_doubleVal), - __fbthrift_field_stringVal(srcObj.__fbthrift_field_stringVal), - __fbthrift_field_binaryVal(srcObj.__fbthrift_field_binaryVal), - __fbthrift_field_enumVal(srcObj.__fbthrift_field_enumVal), - __fbthrift_field_structVal(srcObj.__fbthrift_field_structVal), - __fbthrift_field_unionVal(srcObj.__fbthrift_field_unionVal), - __fbthrift_field_lateStructVal(srcObj.__fbthrift_field_lateStructVal), - __fbthrift_field_durationVal(srcObj.__fbthrift_field_durationVal), - __fbthrift_field_timeVal(srcObj.__fbthrift_field_timeVal), - __fbthrift_field_optBoolVal(srcObj.__fbthrift_field_optBoolVal), - __fbthrift_field_optByteVal(srcObj.__fbthrift_field_optByteVal), - __fbthrift_field_optI16Val(srcObj.__fbthrift_field_optI16Val), - __fbthrift_field_optI32Val(srcObj.__fbthrift_field_optI32Val), - __fbthrift_field_optI64Val(srcObj.__fbthrift_field_optI64Val), - __fbthrift_field_optFloatVal(srcObj.__fbthrift_field_optFloatVal), - __fbthrift_field_optDoubleVal(srcObj.__fbthrift_field_optDoubleVal), - __fbthrift_field_optStringVal(srcObj.__fbthrift_field_optStringVal), - __fbthrift_field_optBinaryVal(srcObj.__fbthrift_field_optBinaryVal), - __fbthrift_field_optEnumVal(srcObj.__fbthrift_field_optEnumVal), - __fbthrift_field_optStructVal(srcObj.__fbthrift_field_optStructVal), - __fbthrift_field_optLateStructVal(srcObj.__fbthrift_field_optLateStructVal), - __fbthrift_field_optListVal(srcObj.__fbthrift_field_optListVal), - __fbthrift_field_optSetVal(srcObj.__fbthrift_field_optSetVal), __fbthrift_field_optMapVal(srcObj.__fbthrift_field_optMapVal), + __fbthrift_field_optSetVal(srcObj.__fbthrift_field_optSetVal), + __fbthrift_field_optListVal(srcObj.__fbthrift_field_optListVal), + __fbthrift_field_optLateStructVal(srcObj.__fbthrift_field_optLateStructVal), + __fbthrift_field_optStructVal(srcObj.__fbthrift_field_optStructVal), + __fbthrift_field_optEnumVal(srcObj.__fbthrift_field_optEnumVal), + __fbthrift_field_optBinaryVal(srcObj.__fbthrift_field_optBinaryVal), + __fbthrift_field_optStringVal(srcObj.__fbthrift_field_optStringVal), + __fbthrift_field_optDoubleVal(srcObj.__fbthrift_field_optDoubleVal), + __fbthrift_field_optFloatVal(srcObj.__fbthrift_field_optFloatVal), + __fbthrift_field_optI64Val(srcObj.__fbthrift_field_optI64Val), + __fbthrift_field_optI32Val(srcObj.__fbthrift_field_optI32Val), + __fbthrift_field_optI16Val(srcObj.__fbthrift_field_optI16Val), + __fbthrift_field_optByteVal(srcObj.__fbthrift_field_optByteVal), + __fbthrift_field_optBoolVal(srcObj.__fbthrift_field_optBoolVal), + __fbthrift_field_timeVal(srcObj.__fbthrift_field_timeVal), + __fbthrift_field_durationVal(srcObj.__fbthrift_field_durationVal), + __fbthrift_field_lateStructVal(srcObj.__fbthrift_field_lateStructVal), + __fbthrift_field_unionVal(srcObj.__fbthrift_field_unionVal), + __fbthrift_field_structVal(srcObj.__fbthrift_field_structVal), + __fbthrift_field_enumVal(srcObj.__fbthrift_field_enumVal), + __fbthrift_field_binaryVal(srcObj.__fbthrift_field_binaryVal), + __fbthrift_field_stringVal(srcObj.__fbthrift_field_stringVal), + __fbthrift_field_doubleVal(srcObj.__fbthrift_field_doubleVal), + __fbthrift_field_floatVal(srcObj.__fbthrift_field_floatVal), + __fbthrift_field_i64Val(srcObj.__fbthrift_field_i64Val), + __fbthrift_field_i32Val(srcObj.__fbthrift_field_i32Val), + __fbthrift_field_i16Val(srcObj.__fbthrift_field_i16Val), + __fbthrift_field_byteVal(srcObj.__fbthrift_field_byteVal), + __fbthrift_field_boolVal(srcObj.__fbthrift_field_boolVal), __isset(srcObj.__isset) { - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::MapPatchAdapter, -30>(__fbthrift_field_optMapVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); } MyStructFieldPatchStruct& MyStructFieldPatchStruct::operator=(const MyStructFieldPatchStruct& other) { @@ -3204,166 +3204,166 @@ MyStructFieldPatchStruct& MyStructFieldPatchStruct::operator=(const MyStructFiel } MyStructFieldPatchStruct::MyStructFieldPatchStruct(FOLLY_MAYBE_UNUSED MyStructFieldPatchStruct&& other) noexcept : - __fbthrift_field_boolVal(std::move(other.__fbthrift_field_boolVal)), - __fbthrift_field_byteVal(std::move(other.__fbthrift_field_byteVal)), - __fbthrift_field_i16Val(std::move(other.__fbthrift_field_i16Val)), - __fbthrift_field_i32Val(std::move(other.__fbthrift_field_i32Val)), - __fbthrift_field_i64Val(std::move(other.__fbthrift_field_i64Val)), - __fbthrift_field_floatVal(std::move(other.__fbthrift_field_floatVal)), - __fbthrift_field_doubleVal(std::move(other.__fbthrift_field_doubleVal)), - __fbthrift_field_stringVal(std::move(other.__fbthrift_field_stringVal)), - __fbthrift_field_binaryVal(std::move(other.__fbthrift_field_binaryVal)), - __fbthrift_field_enumVal(std::move(other.__fbthrift_field_enumVal)), - __fbthrift_field_structVal(std::move(other.__fbthrift_field_structVal)), - __fbthrift_field_unionVal(std::move(other.__fbthrift_field_unionVal)), - __fbthrift_field_lateStructVal(std::move(other.__fbthrift_field_lateStructVal)), - __fbthrift_field_durationVal(std::move(other.__fbthrift_field_durationVal)), - __fbthrift_field_timeVal(std::move(other.__fbthrift_field_timeVal)), - __fbthrift_field_optBoolVal(std::move(other.__fbthrift_field_optBoolVal)), - __fbthrift_field_optByteVal(std::move(other.__fbthrift_field_optByteVal)), - __fbthrift_field_optI16Val(std::move(other.__fbthrift_field_optI16Val)), - __fbthrift_field_optI32Val(std::move(other.__fbthrift_field_optI32Val)), - __fbthrift_field_optI64Val(std::move(other.__fbthrift_field_optI64Val)), - __fbthrift_field_optFloatVal(std::move(other.__fbthrift_field_optFloatVal)), - __fbthrift_field_optDoubleVal(std::move(other.__fbthrift_field_optDoubleVal)), - __fbthrift_field_optStringVal(std::move(other.__fbthrift_field_optStringVal)), - __fbthrift_field_optBinaryVal(std::move(other.__fbthrift_field_optBinaryVal)), - __fbthrift_field_optEnumVal(std::move(other.__fbthrift_field_optEnumVal)), - __fbthrift_field_optStructVal(std::move(other.__fbthrift_field_optStructVal)), - __fbthrift_field_optLateStructVal(std::move(other.__fbthrift_field_optLateStructVal)), - __fbthrift_field_optListVal(std::move(other.__fbthrift_field_optListVal)), - __fbthrift_field_optSetVal(std::move(other.__fbthrift_field_optSetVal)), __fbthrift_field_optMapVal(std::move(other.__fbthrift_field_optMapVal)), + __fbthrift_field_optSetVal(std::move(other.__fbthrift_field_optSetVal)), + __fbthrift_field_optListVal(std::move(other.__fbthrift_field_optListVal)), + __fbthrift_field_optLateStructVal(std::move(other.__fbthrift_field_optLateStructVal)), + __fbthrift_field_optStructVal(std::move(other.__fbthrift_field_optStructVal)), + __fbthrift_field_optEnumVal(std::move(other.__fbthrift_field_optEnumVal)), + __fbthrift_field_optBinaryVal(std::move(other.__fbthrift_field_optBinaryVal)), + __fbthrift_field_optStringVal(std::move(other.__fbthrift_field_optStringVal)), + __fbthrift_field_optDoubleVal(std::move(other.__fbthrift_field_optDoubleVal)), + __fbthrift_field_optFloatVal(std::move(other.__fbthrift_field_optFloatVal)), + __fbthrift_field_optI64Val(std::move(other.__fbthrift_field_optI64Val)), + __fbthrift_field_optI32Val(std::move(other.__fbthrift_field_optI32Val)), + __fbthrift_field_optI16Val(std::move(other.__fbthrift_field_optI16Val)), + __fbthrift_field_optByteVal(std::move(other.__fbthrift_field_optByteVal)), + __fbthrift_field_optBoolVal(std::move(other.__fbthrift_field_optBoolVal)), + __fbthrift_field_timeVal(std::move(other.__fbthrift_field_timeVal)), + __fbthrift_field_durationVal(std::move(other.__fbthrift_field_durationVal)), + __fbthrift_field_lateStructVal(std::move(other.__fbthrift_field_lateStructVal)), + __fbthrift_field_unionVal(std::move(other.__fbthrift_field_unionVal)), + __fbthrift_field_structVal(std::move(other.__fbthrift_field_structVal)), + __fbthrift_field_enumVal(std::move(other.__fbthrift_field_enumVal)), + __fbthrift_field_binaryVal(std::move(other.__fbthrift_field_binaryVal)), + __fbthrift_field_stringVal(std::move(other.__fbthrift_field_stringVal)), + __fbthrift_field_doubleVal(std::move(other.__fbthrift_field_doubleVal)), + __fbthrift_field_floatVal(std::move(other.__fbthrift_field_floatVal)), + __fbthrift_field_i64Val(std::move(other.__fbthrift_field_i64Val)), + __fbthrift_field_i32Val(std::move(other.__fbthrift_field_i32Val)), + __fbthrift_field_i16Val(std::move(other.__fbthrift_field_i16Val)), + __fbthrift_field_byteVal(std::move(other.__fbthrift_field_byteVal)), + __fbthrift_field_boolVal(std::move(other.__fbthrift_field_boolVal)), __isset(other.__isset) { - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::MapPatchAdapter, -30>(__fbthrift_field_optMapVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); } MyStructFieldPatchStruct& MyStructFieldPatchStruct::operator=(FOLLY_MAYBE_UNUSED MyStructFieldPatchStruct&& other) noexcept { - this->__fbthrift_field_boolVal = std::move(other.__fbthrift_field_boolVal); - this->__fbthrift_field_byteVal = std::move(other.__fbthrift_field_byteVal); - this->__fbthrift_field_i16Val = std::move(other.__fbthrift_field_i16Val); - this->__fbthrift_field_i32Val = std::move(other.__fbthrift_field_i32Val); - this->__fbthrift_field_i64Val = std::move(other.__fbthrift_field_i64Val); - this->__fbthrift_field_floatVal = std::move(other.__fbthrift_field_floatVal); - this->__fbthrift_field_doubleVal = std::move(other.__fbthrift_field_doubleVal); - this->__fbthrift_field_stringVal = std::move(other.__fbthrift_field_stringVal); - this->__fbthrift_field_binaryVal = std::move(other.__fbthrift_field_binaryVal); - this->__fbthrift_field_enumVal = std::move(other.__fbthrift_field_enumVal); - this->__fbthrift_field_structVal = std::move(other.__fbthrift_field_structVal); - this->__fbthrift_field_unionVal = std::move(other.__fbthrift_field_unionVal); - this->__fbthrift_field_lateStructVal = std::move(other.__fbthrift_field_lateStructVal); - this->__fbthrift_field_durationVal = std::move(other.__fbthrift_field_durationVal); - this->__fbthrift_field_timeVal = std::move(other.__fbthrift_field_timeVal); - this->__fbthrift_field_optBoolVal = std::move(other.__fbthrift_field_optBoolVal); - this->__fbthrift_field_optByteVal = std::move(other.__fbthrift_field_optByteVal); - this->__fbthrift_field_optI16Val = std::move(other.__fbthrift_field_optI16Val); - this->__fbthrift_field_optI32Val = std::move(other.__fbthrift_field_optI32Val); - this->__fbthrift_field_optI64Val = std::move(other.__fbthrift_field_optI64Val); - this->__fbthrift_field_optFloatVal = std::move(other.__fbthrift_field_optFloatVal); - this->__fbthrift_field_optDoubleVal = std::move(other.__fbthrift_field_optDoubleVal); - this->__fbthrift_field_optStringVal = std::move(other.__fbthrift_field_optStringVal); - this->__fbthrift_field_optBinaryVal = std::move(other.__fbthrift_field_optBinaryVal); - this->__fbthrift_field_optEnumVal = std::move(other.__fbthrift_field_optEnumVal); - this->__fbthrift_field_optStructVal = std::move(other.__fbthrift_field_optStructVal); - this->__fbthrift_field_optLateStructVal = std::move(other.__fbthrift_field_optLateStructVal); - this->__fbthrift_field_optListVal = std::move(other.__fbthrift_field_optListVal); - this->__fbthrift_field_optSetVal = std::move(other.__fbthrift_field_optSetVal); this->__fbthrift_field_optMapVal = std::move(other.__fbthrift_field_optMapVal); + this->__fbthrift_field_optSetVal = std::move(other.__fbthrift_field_optSetVal); + this->__fbthrift_field_optListVal = std::move(other.__fbthrift_field_optListVal); + this->__fbthrift_field_optLateStructVal = std::move(other.__fbthrift_field_optLateStructVal); + this->__fbthrift_field_optStructVal = std::move(other.__fbthrift_field_optStructVal); + this->__fbthrift_field_optEnumVal = std::move(other.__fbthrift_field_optEnumVal); + this->__fbthrift_field_optBinaryVal = std::move(other.__fbthrift_field_optBinaryVal); + this->__fbthrift_field_optStringVal = std::move(other.__fbthrift_field_optStringVal); + this->__fbthrift_field_optDoubleVal = std::move(other.__fbthrift_field_optDoubleVal); + this->__fbthrift_field_optFloatVal = std::move(other.__fbthrift_field_optFloatVal); + this->__fbthrift_field_optI64Val = std::move(other.__fbthrift_field_optI64Val); + this->__fbthrift_field_optI32Val = std::move(other.__fbthrift_field_optI32Val); + this->__fbthrift_field_optI16Val = std::move(other.__fbthrift_field_optI16Val); + this->__fbthrift_field_optByteVal = std::move(other.__fbthrift_field_optByteVal); + this->__fbthrift_field_optBoolVal = std::move(other.__fbthrift_field_optBoolVal); + this->__fbthrift_field_timeVal = std::move(other.__fbthrift_field_timeVal); + this->__fbthrift_field_durationVal = std::move(other.__fbthrift_field_durationVal); + this->__fbthrift_field_lateStructVal = std::move(other.__fbthrift_field_lateStructVal); + this->__fbthrift_field_unionVal = std::move(other.__fbthrift_field_unionVal); + this->__fbthrift_field_structVal = std::move(other.__fbthrift_field_structVal); + this->__fbthrift_field_enumVal = std::move(other.__fbthrift_field_enumVal); + this->__fbthrift_field_binaryVal = std::move(other.__fbthrift_field_binaryVal); + this->__fbthrift_field_stringVal = std::move(other.__fbthrift_field_stringVal); + this->__fbthrift_field_doubleVal = std::move(other.__fbthrift_field_doubleVal); + this->__fbthrift_field_floatVal = std::move(other.__fbthrift_field_floatVal); + this->__fbthrift_field_i64Val = std::move(other.__fbthrift_field_i64Val); + this->__fbthrift_field_i32Val = std::move(other.__fbthrift_field_i32Val); + this->__fbthrift_field_i16Val = std::move(other.__fbthrift_field_i16Val); + this->__fbthrift_field_byteVal = std::move(other.__fbthrift_field_byteVal); + this->__fbthrift_field_boolVal = std::move(other.__fbthrift_field_boolVal); __isset = other.__isset; return *this; } -MyStructFieldPatchStruct::MyStructFieldPatchStruct(apache::thrift::FragileConstructor, ::apache::thrift::op::BoolPatch boolVal__arg, ::apache::thrift::op::BytePatch byteVal__arg, ::apache::thrift::op::I16Patch i16Val__arg, ::apache::thrift::op::I32Patch i32Val__arg, ::apache::thrift::op::I64Patch i64Val__arg, ::apache::thrift::op::FloatPatch floatVal__arg, ::apache::thrift::op::DoublePatch doubleVal__arg, ::apache::thrift::op::StringPatch stringVal__arg, ::apache::thrift::op::BinaryPatch binaryVal__arg, ::test::fixtures::patch::MyStructFieldN10Patch enumVal__arg, ::test::fixtures::patch::MyDataPatch structVal__arg, ::test::fixtures::patch::MyUnionPatch unionVal__arg, ::test::fixtures::patch::LateDefStructPatch lateStructVal__arg, ::apache::thrift::op::DurationPatch durationVal__arg, ::apache::thrift::op::TimePatch timeVal__arg, ::apache::thrift::op::BoolPatch optBoolVal__arg, ::apache::thrift::op::BytePatch optByteVal__arg, ::apache::thrift::op::I16Patch optI16Val__arg, ::apache::thrift::op::I32Patch optI32Val__arg, ::apache::thrift::op::I64Patch optI64Val__arg, ::apache::thrift::op::FloatPatch optFloatVal__arg, ::apache::thrift::op::DoublePatch optDoubleVal__arg, ::apache::thrift::op::StringPatch optStringVal__arg, ::apache::thrift::op::BinaryPatch optBinaryVal__arg, ::test::fixtures::patch::MyStructFieldN25Patch optEnumVal__arg, ::test::fixtures::patch::MyDataPatch optStructVal__arg, ::test::fixtures::patch::LateDefStructPatch optLateStructVal__arg, ::test::fixtures::patch::MyStructFieldN28Patch optListVal__arg, ::test::fixtures::patch::MyStructFieldN29Patch optSetVal__arg, ::test::fixtures::patch::MyStructFieldN30Patch optMapVal__arg) : - __fbthrift_field_boolVal(std::move(boolVal__arg)), - __fbthrift_field_byteVal(std::move(byteVal__arg)), - __fbthrift_field_i16Val(std::move(i16Val__arg)), - __fbthrift_field_i32Val(std::move(i32Val__arg)), - __fbthrift_field_i64Val(std::move(i64Val__arg)), - __fbthrift_field_floatVal(std::move(floatVal__arg)), - __fbthrift_field_doubleVal(std::move(doubleVal__arg)), - __fbthrift_field_stringVal(std::move(stringVal__arg)), - __fbthrift_field_binaryVal(std::move(binaryVal__arg)), - __fbthrift_field_enumVal(std::move(enumVal__arg)), - __fbthrift_field_structVal(std::move(structVal__arg)), - __fbthrift_field_unionVal(std::move(unionVal__arg)), - __fbthrift_field_lateStructVal(std::move(lateStructVal__arg)), - __fbthrift_field_durationVal(std::move(durationVal__arg)), - __fbthrift_field_timeVal(std::move(timeVal__arg)), - __fbthrift_field_optBoolVal(std::move(optBoolVal__arg)), - __fbthrift_field_optByteVal(std::move(optByteVal__arg)), - __fbthrift_field_optI16Val(std::move(optI16Val__arg)), - __fbthrift_field_optI32Val(std::move(optI32Val__arg)), - __fbthrift_field_optI64Val(std::move(optI64Val__arg)), - __fbthrift_field_optFloatVal(std::move(optFloatVal__arg)), - __fbthrift_field_optDoubleVal(std::move(optDoubleVal__arg)), - __fbthrift_field_optStringVal(std::move(optStringVal__arg)), - __fbthrift_field_optBinaryVal(std::move(optBinaryVal__arg)), - __fbthrift_field_optEnumVal(std::move(optEnumVal__arg)), - __fbthrift_field_optStructVal(std::move(optStructVal__arg)), - __fbthrift_field_optLateStructVal(std::move(optLateStructVal__arg)), - __fbthrift_field_optListVal(std::move(optListVal__arg)), +MyStructFieldPatchStruct::MyStructFieldPatchStruct(apache::thrift::FragileConstructor, ::test::fixtures::patch::MyStructFieldN30Patch optMapVal__arg, ::test::fixtures::patch::MyStructFieldN29Patch optSetVal__arg, ::test::fixtures::patch::MyStructFieldN28Patch optListVal__arg, ::test::fixtures::patch::LateDefStructPatch optLateStructVal__arg, ::test::fixtures::patch::MyDataPatch optStructVal__arg, ::test::fixtures::patch::MyStructFieldN25Patch optEnumVal__arg, ::apache::thrift::op::BinaryPatch optBinaryVal__arg, ::apache::thrift::op::StringPatch optStringVal__arg, ::apache::thrift::op::DoublePatch optDoubleVal__arg, ::apache::thrift::op::FloatPatch optFloatVal__arg, ::apache::thrift::op::I64Patch optI64Val__arg, ::apache::thrift::op::I32Patch optI32Val__arg, ::apache::thrift::op::I16Patch optI16Val__arg, ::apache::thrift::op::BytePatch optByteVal__arg, ::apache::thrift::op::BoolPatch optBoolVal__arg, ::apache::thrift::op::TimePatch timeVal__arg, ::apache::thrift::op::DurationPatch durationVal__arg, ::test::fixtures::patch::LateDefStructPatch lateStructVal__arg, ::test::fixtures::patch::MyUnionPatch unionVal__arg, ::test::fixtures::patch::MyDataPatch structVal__arg, ::test::fixtures::patch::MyStructFieldN10Patch enumVal__arg, ::apache::thrift::op::BinaryPatch binaryVal__arg, ::apache::thrift::op::StringPatch stringVal__arg, ::apache::thrift::op::DoublePatch doubleVal__arg, ::apache::thrift::op::FloatPatch floatVal__arg, ::apache::thrift::op::I64Patch i64Val__arg, ::apache::thrift::op::I32Patch i32Val__arg, ::apache::thrift::op::I16Patch i16Val__arg, ::apache::thrift::op::BytePatch byteVal__arg, ::apache::thrift::op::BoolPatch boolVal__arg) : + __fbthrift_field_optMapVal(std::move(optMapVal__arg)), __fbthrift_field_optSetVal(std::move(optSetVal__arg)), - __fbthrift_field_optMapVal(std::move(optMapVal__arg)) { - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); + __fbthrift_field_optListVal(std::move(optListVal__arg)), + __fbthrift_field_optLateStructVal(std::move(optLateStructVal__arg)), + __fbthrift_field_optStructVal(std::move(optStructVal__arg)), + __fbthrift_field_optEnumVal(std::move(optEnumVal__arg)), + __fbthrift_field_optBinaryVal(std::move(optBinaryVal__arg)), + __fbthrift_field_optStringVal(std::move(optStringVal__arg)), + __fbthrift_field_optDoubleVal(std::move(optDoubleVal__arg)), + __fbthrift_field_optFloatVal(std::move(optFloatVal__arg)), + __fbthrift_field_optI64Val(std::move(optI64Val__arg)), + __fbthrift_field_optI32Val(std::move(optI32Val__arg)), + __fbthrift_field_optI16Val(std::move(optI16Val__arg)), + __fbthrift_field_optByteVal(std::move(optByteVal__arg)), + __fbthrift_field_optBoolVal(std::move(optBoolVal__arg)), + __fbthrift_field_timeVal(std::move(timeVal__arg)), + __fbthrift_field_durationVal(std::move(durationVal__arg)), + __fbthrift_field_lateStructVal(std::move(lateStructVal__arg)), + __fbthrift_field_unionVal(std::move(unionVal__arg)), + __fbthrift_field_structVal(std::move(structVal__arg)), + __fbthrift_field_enumVal(std::move(enumVal__arg)), + __fbthrift_field_binaryVal(std::move(binaryVal__arg)), + __fbthrift_field_stringVal(std::move(stringVal__arg)), + __fbthrift_field_doubleVal(std::move(doubleVal__arg)), + __fbthrift_field_floatVal(std::move(floatVal__arg)), + __fbthrift_field_i64Val(std::move(i64Val__arg)), + __fbthrift_field_i32Val(std::move(i32Val__arg)), + __fbthrift_field_i16Val(std::move(i16Val__arg)), + __fbthrift_field_byteVal(std::move(byteVal__arg)), + __fbthrift_field_boolVal(std::move(boolVal__arg)) { ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::MapPatchAdapter, -30>(__fbthrift_field_optMapVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); __isset.set(folly::index_constant<0>(), true); __isset.set(folly::index_constant<1>(), true); __isset.set(folly::index_constant<2>(), true); @@ -3399,36 +3399,36 @@ MyStructFieldPatchStruct::MyStructFieldPatchStruct(apache::thrift::FragileConstr void MyStructFieldPatchStruct::__fbthrift_clear() { // clear all fields - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); - ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::MapPatchAdapter, -30>(__fbthrift_field_optMapVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); + ::apache::thrift::adapt_detail::clear<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); __isset = {}; } @@ -3441,94 +3441,94 @@ bool MyStructFieldPatchStruct::__fbthrift_is_empty() const { bool MyStructFieldPatchStruct::operator==(FOLLY_MAYBE_UNUSED const MyStructFieldPatchStruct& rhs) const { FOLLY_MAYBE_UNUSED auto& lhs = *this; - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::BoolPatchAdapter>(lhs.__fbthrift_field_boolVal, rhs.__fbthrift_field_boolVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::MapPatchAdapter>(lhs.__fbthrift_field_optMapVal, rhs.__fbthrift_field_optMapVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_byteVal, rhs.__fbthrift_field_byteVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::SetPatchAdapter>(lhs.__fbthrift_field_optSetVal, rhs.__fbthrift_field_optSetVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_i16Val, rhs.__fbthrift_field_i16Val)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::ListPatchAdapter>(lhs.__fbthrift_field_optListVal, rhs.__fbthrift_field_optListVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_i32Val, rhs.__fbthrift_field_i32Val)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StructPatchAdapter>(lhs.__fbthrift_field_optLateStructVal, rhs.__fbthrift_field_optLateStructVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_i64Val, rhs.__fbthrift_field_i64Val)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StructPatchAdapter>(lhs.__fbthrift_field_optStructVal, rhs.__fbthrift_field_optStructVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_floatVal, rhs.__fbthrift_field_floatVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::AssignPatchAdapter>(lhs.__fbthrift_field_optEnumVal, rhs.__fbthrift_field_optEnumVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_doubleVal, rhs.__fbthrift_field_doubleVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::BinaryPatchAdapter>(lhs.__fbthrift_field_optBinaryVal, rhs.__fbthrift_field_optBinaryVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StringPatchAdapter>(lhs.__fbthrift_field_stringVal, rhs.__fbthrift_field_stringVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StringPatchAdapter>(lhs.__fbthrift_field_optStringVal, rhs.__fbthrift_field_optStringVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::BinaryPatchAdapter>(lhs.__fbthrift_field_binaryVal, rhs.__fbthrift_field_binaryVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optDoubleVal, rhs.__fbthrift_field_optDoubleVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::AssignPatchAdapter>(lhs.__fbthrift_field_enumVal, rhs.__fbthrift_field_enumVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optFloatVal, rhs.__fbthrift_field_optFloatVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StructPatchAdapter>(lhs.__fbthrift_field_structVal, rhs.__fbthrift_field_structVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optI64Val, rhs.__fbthrift_field_optI64Val)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::UnionPatchAdapter>(lhs.__fbthrift_field_unionVal, rhs.__fbthrift_field_unionVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optI32Val, rhs.__fbthrift_field_optI32Val)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StructPatchAdapter>(lhs.__fbthrift_field_lateStructVal, rhs.__fbthrift_field_lateStructVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optI16Val, rhs.__fbthrift_field_optI16Val)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::AssignPatchAdapter>(lhs.__fbthrift_field_durationVal, rhs.__fbthrift_field_durationVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optByteVal, rhs.__fbthrift_field_optByteVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::AssignPatchAdapter>(lhs.__fbthrift_field_timeVal, rhs.__fbthrift_field_timeVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::BoolPatchAdapter>(lhs.__fbthrift_field_optBoolVal, rhs.__fbthrift_field_optBoolVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::BoolPatchAdapter>(lhs.__fbthrift_field_optBoolVal, rhs.__fbthrift_field_optBoolVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::AssignPatchAdapter>(lhs.__fbthrift_field_timeVal, rhs.__fbthrift_field_timeVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optByteVal, rhs.__fbthrift_field_optByteVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::AssignPatchAdapter>(lhs.__fbthrift_field_durationVal, rhs.__fbthrift_field_durationVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optI16Val, rhs.__fbthrift_field_optI16Val)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StructPatchAdapter>(lhs.__fbthrift_field_lateStructVal, rhs.__fbthrift_field_lateStructVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optI32Val, rhs.__fbthrift_field_optI32Val)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::UnionPatchAdapter>(lhs.__fbthrift_field_unionVal, rhs.__fbthrift_field_unionVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optI64Val, rhs.__fbthrift_field_optI64Val)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StructPatchAdapter>(lhs.__fbthrift_field_structVal, rhs.__fbthrift_field_structVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optFloatVal, rhs.__fbthrift_field_optFloatVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::AssignPatchAdapter>(lhs.__fbthrift_field_enumVal, rhs.__fbthrift_field_enumVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_optDoubleVal, rhs.__fbthrift_field_optDoubleVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::BinaryPatchAdapter>(lhs.__fbthrift_field_binaryVal, rhs.__fbthrift_field_binaryVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StringPatchAdapter>(lhs.__fbthrift_field_optStringVal, rhs.__fbthrift_field_optStringVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StringPatchAdapter>(lhs.__fbthrift_field_stringVal, rhs.__fbthrift_field_stringVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::BinaryPatchAdapter>(lhs.__fbthrift_field_optBinaryVal, rhs.__fbthrift_field_optBinaryVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_doubleVal, rhs.__fbthrift_field_doubleVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::AssignPatchAdapter>(lhs.__fbthrift_field_optEnumVal, rhs.__fbthrift_field_optEnumVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_floatVal, rhs.__fbthrift_field_floatVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StructPatchAdapter>(lhs.__fbthrift_field_optStructVal, rhs.__fbthrift_field_optStructVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_i64Val, rhs.__fbthrift_field_i64Val)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::StructPatchAdapter>(lhs.__fbthrift_field_optLateStructVal, rhs.__fbthrift_field_optLateStructVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_i32Val, rhs.__fbthrift_field_i32Val)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::ListPatchAdapter>(lhs.__fbthrift_field_optListVal, rhs.__fbthrift_field_optListVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_i16Val, rhs.__fbthrift_field_i16Val)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::SetPatchAdapter>(lhs.__fbthrift_field_optSetVal, rhs.__fbthrift_field_optSetVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::NumberPatchAdapter>(lhs.__fbthrift_field_byteVal, rhs.__fbthrift_field_byteVal)) { return false; } - if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::MapPatchAdapter>(lhs.__fbthrift_field_optMapVal, rhs.__fbthrift_field_optMapVal)) { + if (::apache::thrift::adapt_detail::not_equal<::apache::thrift::op::detail::BoolPatchAdapter>(lhs.__fbthrift_field_boolVal, rhs.__fbthrift_field_boolVal)) { return false; } return true; @@ -3537,36 +3537,36 @@ bool MyStructFieldPatchStruct::operator==(FOLLY_MAYBE_UNUSED const MyStructField void swap(FOLLY_MAYBE_UNUSED MyStructFieldPatchStruct& a, FOLLY_MAYBE_UNUSED MyStructFieldPatchStruct& b) { using ::std::swap; - swap(a.__fbthrift_field_boolVal, b.__fbthrift_field_boolVal); - swap(a.__fbthrift_field_byteVal, b.__fbthrift_field_byteVal); - swap(a.__fbthrift_field_i16Val, b.__fbthrift_field_i16Val); - swap(a.__fbthrift_field_i32Val, b.__fbthrift_field_i32Val); - swap(a.__fbthrift_field_i64Val, b.__fbthrift_field_i64Val); - swap(a.__fbthrift_field_floatVal, b.__fbthrift_field_floatVal); - swap(a.__fbthrift_field_doubleVal, b.__fbthrift_field_doubleVal); - swap(a.__fbthrift_field_stringVal, b.__fbthrift_field_stringVal); - swap(a.__fbthrift_field_binaryVal, b.__fbthrift_field_binaryVal); - swap(a.__fbthrift_field_enumVal, b.__fbthrift_field_enumVal); - swap(a.__fbthrift_field_structVal, b.__fbthrift_field_structVal); - swap(a.__fbthrift_field_unionVal, b.__fbthrift_field_unionVal); - swap(a.__fbthrift_field_lateStructVal, b.__fbthrift_field_lateStructVal); - swap(a.__fbthrift_field_durationVal, b.__fbthrift_field_durationVal); - swap(a.__fbthrift_field_timeVal, b.__fbthrift_field_timeVal); - swap(a.__fbthrift_field_optBoolVal, b.__fbthrift_field_optBoolVal); - swap(a.__fbthrift_field_optByteVal, b.__fbthrift_field_optByteVal); - swap(a.__fbthrift_field_optI16Val, b.__fbthrift_field_optI16Val); - swap(a.__fbthrift_field_optI32Val, b.__fbthrift_field_optI32Val); - swap(a.__fbthrift_field_optI64Val, b.__fbthrift_field_optI64Val); - swap(a.__fbthrift_field_optFloatVal, b.__fbthrift_field_optFloatVal); - swap(a.__fbthrift_field_optDoubleVal, b.__fbthrift_field_optDoubleVal); - swap(a.__fbthrift_field_optStringVal, b.__fbthrift_field_optStringVal); - swap(a.__fbthrift_field_optBinaryVal, b.__fbthrift_field_optBinaryVal); - swap(a.__fbthrift_field_optEnumVal, b.__fbthrift_field_optEnumVal); - swap(a.__fbthrift_field_optStructVal, b.__fbthrift_field_optStructVal); - swap(a.__fbthrift_field_optLateStructVal, b.__fbthrift_field_optLateStructVal); - swap(a.__fbthrift_field_optListVal, b.__fbthrift_field_optListVal); - swap(a.__fbthrift_field_optSetVal, b.__fbthrift_field_optSetVal); swap(a.__fbthrift_field_optMapVal, b.__fbthrift_field_optMapVal); + swap(a.__fbthrift_field_optSetVal, b.__fbthrift_field_optSetVal); + swap(a.__fbthrift_field_optListVal, b.__fbthrift_field_optListVal); + swap(a.__fbthrift_field_optLateStructVal, b.__fbthrift_field_optLateStructVal); + swap(a.__fbthrift_field_optStructVal, b.__fbthrift_field_optStructVal); + swap(a.__fbthrift_field_optEnumVal, b.__fbthrift_field_optEnumVal); + swap(a.__fbthrift_field_optBinaryVal, b.__fbthrift_field_optBinaryVal); + swap(a.__fbthrift_field_optStringVal, b.__fbthrift_field_optStringVal); + swap(a.__fbthrift_field_optDoubleVal, b.__fbthrift_field_optDoubleVal); + swap(a.__fbthrift_field_optFloatVal, b.__fbthrift_field_optFloatVal); + swap(a.__fbthrift_field_optI64Val, b.__fbthrift_field_optI64Val); + swap(a.__fbthrift_field_optI32Val, b.__fbthrift_field_optI32Val); + swap(a.__fbthrift_field_optI16Val, b.__fbthrift_field_optI16Val); + swap(a.__fbthrift_field_optByteVal, b.__fbthrift_field_optByteVal); + swap(a.__fbthrift_field_optBoolVal, b.__fbthrift_field_optBoolVal); + swap(a.__fbthrift_field_timeVal, b.__fbthrift_field_timeVal); + swap(a.__fbthrift_field_durationVal, b.__fbthrift_field_durationVal); + swap(a.__fbthrift_field_lateStructVal, b.__fbthrift_field_lateStructVal); + swap(a.__fbthrift_field_unionVal, b.__fbthrift_field_unionVal); + swap(a.__fbthrift_field_structVal, b.__fbthrift_field_structVal); + swap(a.__fbthrift_field_enumVal, b.__fbthrift_field_enumVal); + swap(a.__fbthrift_field_binaryVal, b.__fbthrift_field_binaryVal); + swap(a.__fbthrift_field_stringVal, b.__fbthrift_field_stringVal); + swap(a.__fbthrift_field_doubleVal, b.__fbthrift_field_doubleVal); + swap(a.__fbthrift_field_floatVal, b.__fbthrift_field_floatVal); + swap(a.__fbthrift_field_i64Val, b.__fbthrift_field_i64Val); + swap(a.__fbthrift_field_i32Val, b.__fbthrift_field_i32Val); + swap(a.__fbthrift_field_i16Val, b.__fbthrift_field_i16Val); + swap(a.__fbthrift_field_byteVal, b.__fbthrift_field_byteVal); + swap(a.__fbthrift_field_boolVal, b.__fbthrift_field_boolVal); swap(a.__isset, b.__isset); } @@ -3583,43 +3583,43 @@ static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::BoolPatch>, + ::test::fixtures::patch::MyStructFieldN30Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::BytePatch>, + ::test::fixtures::patch::MyStructFieldN29Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::I16Patch>, + ::test::fixtures::patch::MyStructFieldN28Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::I32Patch>, + ::test::fixtures::patch::LateDefStructPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::I64Patch>, + ::test::fixtures::patch::MyDataPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::FloatPatch>, + ::test::fixtures::patch::MyStructFieldN25Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::DoublePatch>, + ::apache::thrift::op::BinaryPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< @@ -3631,85 +3631,85 @@ static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::BinaryPatch>, + ::apache::thrift::op::DoublePatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::MyStructFieldN10Patch>, + ::apache::thrift::op::FloatPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::MyDataPatch>, + ::apache::thrift::op::I64Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::MyUnionPatch>, + ::apache::thrift::op::I32Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::LateDefStructPatch>, + ::apache::thrift::op::I16Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::DurationPatch>, + ::apache::thrift::op::BytePatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::TimePatch>, + ::apache::thrift::op::BoolPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::BoolPatch>, + ::apache::thrift::op::TimePatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::BytePatch>, + ::apache::thrift::op::DurationPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::I16Patch>, + ::test::fixtures::patch::LateDefStructPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::I32Patch>, + ::test::fixtures::patch::MyUnionPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::I64Patch>, + ::test::fixtures::patch::MyDataPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::FloatPatch>, + ::test::fixtures::patch::MyStructFieldN10Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::DoublePatch>, + ::apache::thrift::op::BinaryPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< @@ -3721,43 +3721,43 @@ static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::apache::thrift::op::BinaryPatch>, + ::apache::thrift::op::DoublePatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::MyStructFieldN25Patch>, + ::apache::thrift::op::FloatPatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::MyDataPatch>, + ::apache::thrift::op::I64Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::LateDefStructPatch>, + ::apache::thrift::op::I32Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::MyStructFieldN28Patch>, + ::apache::thrift::op::I16Patch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::MyStructFieldN29Patch>, + ::apache::thrift::op::BytePatch>, "inconsistent use of json option"); static_assert( ::apache::thrift::detail::st::gen_check_json< MyStructFieldPatchStruct, ::apache::thrift::type_class::structure, - ::test::fixtures::patch::MyStructFieldN30Patch>, + ::apache::thrift::op::BoolPatch>, "inconsistent use of json option"); }}} // test::fixtures::patch @@ -3965,36 +3965,36 @@ FOLLY_MAYBE_UNUSED FOLLY_ERASE void validateAdapters() { ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::FieldPatchAdapter, 6, ::test::fixtures::patch::MyUnionFieldPatchStruct, ::test::fixtures::patch::MyUnionPatchStruct>(); ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::FieldPatchAdapter, 3, ::test::fixtures::patch::LateDefStructFieldPatchStruct, ::test::fixtures::patch::LateDefStructPatchStruct>(); ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::FieldPatchAdapter, 6, ::test::fixtures::patch::LateDefStructFieldPatchStruct, ::test::fixtures::patch::LateDefStructPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::BoolPatchAdapter, -1, ::apache::thrift::op::BoolPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -2, ::apache::thrift::op::BytePatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -3, ::apache::thrift::op::I16PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -4, ::apache::thrift::op::I32PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -5, ::apache::thrift::op::I64PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -6, ::apache::thrift::op::FloatPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -7, ::apache::thrift::op::DoublePatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StringPatchAdapter, -8, ::apache::thrift::op::StringPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::BinaryPatchAdapter, -9, ::apache::thrift::op::BinaryPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::AssignPatchAdapter, -10, ::test::fixtures::patch::MyStructFieldN10PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StructPatchAdapter, -11, ::test::fixtures::patch::MyDataPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::UnionPatchAdapter, -12, ::test::fixtures::patch::MyUnionPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StructPatchAdapter, -13, ::test::fixtures::patch::LateDefStructPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::AssignPatchAdapter, -14, ::apache::thrift::op::DurationStructPatch, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::AssignPatchAdapter, -15, ::apache::thrift::op::TimeStructPatch, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::BoolPatchAdapter, -16, ::apache::thrift::op::BoolPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -17, ::apache::thrift::op::BytePatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -18, ::apache::thrift::op::I16PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -19, ::apache::thrift::op::I32PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -20, ::apache::thrift::op::I64PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -21, ::apache::thrift::op::FloatPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -22, ::apache::thrift::op::DoublePatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StringPatchAdapter, -23, ::apache::thrift::op::StringPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::BinaryPatchAdapter, -24, ::apache::thrift::op::BinaryPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::AssignPatchAdapter, -25, ::test::fixtures::patch::MyStructFieldN25PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StructPatchAdapter, -26, ::test::fixtures::patch::MyDataPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StructPatchAdapter, -27, ::test::fixtures::patch::LateDefStructPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::ListPatchAdapter, -28, ::test::fixtures::patch::MyStructFieldN28PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); - ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::SetPatchAdapter, -29, ::test::fixtures::patch::MyStructFieldN29PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::MapPatchAdapter, -30, ::test::fixtures::patch::MyStructFieldN30PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::SetPatchAdapter, -29, ::test::fixtures::patch::MyStructFieldN29PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::ListPatchAdapter, -28, ::test::fixtures::patch::MyStructFieldN28PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StructPatchAdapter, -27, ::test::fixtures::patch::LateDefStructPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StructPatchAdapter, -26, ::test::fixtures::patch::MyDataPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::AssignPatchAdapter, -25, ::test::fixtures::patch::MyStructFieldN25PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::BinaryPatchAdapter, -24, ::apache::thrift::op::BinaryPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StringPatchAdapter, -23, ::apache::thrift::op::StringPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -22, ::apache::thrift::op::DoublePatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -21, ::apache::thrift::op::FloatPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -20, ::apache::thrift::op::I64PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -19, ::apache::thrift::op::I32PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -18, ::apache::thrift::op::I16PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -17, ::apache::thrift::op::BytePatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::BoolPatchAdapter, -16, ::apache::thrift::op::BoolPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::AssignPatchAdapter, -15, ::apache::thrift::op::TimeStructPatch, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::AssignPatchAdapter, -14, ::apache::thrift::op::DurationStructPatch, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StructPatchAdapter, -13, ::test::fixtures::patch::LateDefStructPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::UnionPatchAdapter, -12, ::test::fixtures::patch::MyUnionPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StructPatchAdapter, -11, ::test::fixtures::patch::MyDataPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::AssignPatchAdapter, -10, ::test::fixtures::patch::MyStructFieldN10PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::BinaryPatchAdapter, -9, ::apache::thrift::op::BinaryPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::StringPatchAdapter, -8, ::apache::thrift::op::StringPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -7, ::apache::thrift::op::DoublePatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -6, ::apache::thrift::op::FloatPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -5, ::apache::thrift::op::I64PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -4, ::apache::thrift::op::I32PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -3, ::apache::thrift::op::I16PatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::NumberPatchAdapter, -2, ::apache::thrift::op::BytePatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); + ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::BoolPatchAdapter, -1, ::apache::thrift::op::BoolPatchStruct, ::test::fixtures::patch::MyStructFieldPatchStruct>(); ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::FieldPatchAdapter, 3, ::test::fixtures::patch::MyStructFieldPatchStruct, ::test::fixtures::patch::MyStructPatchStruct>(); ::apache::thrift::adapt_detail::validateFieldAdapter<::apache::thrift::op::detail::FieldPatchAdapter, 6, ::test::fixtures::patch::MyStructFieldPatchStruct, ::test::fixtures::patch::MyStructPatchStruct>(); } diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.h b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.h index 2591d1a9422..a9b5201879f 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.h +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.h @@ -97,36 +97,36 @@ struct clear; struct patchPrior; struct ensure; struct patch; -struct boolVal; -struct byteVal; -struct i16Val; -struct i32Val; -struct i64Val; -struct floatVal; -struct doubleVal; -struct stringVal; -struct binaryVal; -struct enumVal; -struct structVal; -struct unionVal; -struct lateStructVal; -struct durationVal; -struct timeVal; -struct optBoolVal; -struct optByteVal; -struct optI16Val; -struct optI32Val; -struct optI64Val; -struct optFloatVal; -struct optDoubleVal; -struct optStringVal; -struct optBinaryVal; -struct optEnumVal; -struct optStructVal; -struct optLateStructVal; -struct optListVal; -struct optSetVal; struct optMapVal; +struct optSetVal; +struct optListVal; +struct optLateStructVal; +struct optStructVal; +struct optEnumVal; +struct optBinaryVal; +struct optStringVal; +struct optDoubleVal; +struct optFloatVal; +struct optI64Val; +struct optI32Val; +struct optI16Val; +struct optByteVal; +struct optBoolVal; +struct timeVal; +struct durationVal; +struct lateStructVal; +struct unionVal; +struct structVal; +struct enumVal; +struct binaryVal; +struct stringVal; +struct doubleVal; +struct floatVal; +struct i64Val; +struct i32Val; +struct i16Val; +struct byteVal; +struct boolVal; struct assign; struct clear; struct patchPrior; @@ -458,125 +458,125 @@ APACHE_THRIFT_DEFINE_ACCESSOR(ensure); #define APACHE_THRIFT_ACCESSOR_patch APACHE_THRIFT_DEFINE_ACCESSOR(patch); #endif -#ifndef APACHE_THRIFT_ACCESSOR_boolVal -#define APACHE_THRIFT_ACCESSOR_boolVal -APACHE_THRIFT_DEFINE_ACCESSOR(boolVal); -#endif -#ifndef APACHE_THRIFT_ACCESSOR_byteVal -#define APACHE_THRIFT_ACCESSOR_byteVal -APACHE_THRIFT_DEFINE_ACCESSOR(byteVal); +#ifndef APACHE_THRIFT_ACCESSOR_optMapVal +#define APACHE_THRIFT_ACCESSOR_optMapVal +APACHE_THRIFT_DEFINE_ACCESSOR(optMapVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_i16Val -#define APACHE_THRIFT_ACCESSOR_i16Val -APACHE_THRIFT_DEFINE_ACCESSOR(i16Val); +#ifndef APACHE_THRIFT_ACCESSOR_optSetVal +#define APACHE_THRIFT_ACCESSOR_optSetVal +APACHE_THRIFT_DEFINE_ACCESSOR(optSetVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_i32Val -#define APACHE_THRIFT_ACCESSOR_i32Val -APACHE_THRIFT_DEFINE_ACCESSOR(i32Val); +#ifndef APACHE_THRIFT_ACCESSOR_optListVal +#define APACHE_THRIFT_ACCESSOR_optListVal +APACHE_THRIFT_DEFINE_ACCESSOR(optListVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_i64Val -#define APACHE_THRIFT_ACCESSOR_i64Val -APACHE_THRIFT_DEFINE_ACCESSOR(i64Val); +#ifndef APACHE_THRIFT_ACCESSOR_optLateStructVal +#define APACHE_THRIFT_ACCESSOR_optLateStructVal +APACHE_THRIFT_DEFINE_ACCESSOR(optLateStructVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_floatVal -#define APACHE_THRIFT_ACCESSOR_floatVal -APACHE_THRIFT_DEFINE_ACCESSOR(floatVal); +#ifndef APACHE_THRIFT_ACCESSOR_optStructVal +#define APACHE_THRIFT_ACCESSOR_optStructVal +APACHE_THRIFT_DEFINE_ACCESSOR(optStructVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_doubleVal -#define APACHE_THRIFT_ACCESSOR_doubleVal -APACHE_THRIFT_DEFINE_ACCESSOR(doubleVal); +#ifndef APACHE_THRIFT_ACCESSOR_optEnumVal +#define APACHE_THRIFT_ACCESSOR_optEnumVal +APACHE_THRIFT_DEFINE_ACCESSOR(optEnumVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_stringVal -#define APACHE_THRIFT_ACCESSOR_stringVal -APACHE_THRIFT_DEFINE_ACCESSOR(stringVal); +#ifndef APACHE_THRIFT_ACCESSOR_optBinaryVal +#define APACHE_THRIFT_ACCESSOR_optBinaryVal +APACHE_THRIFT_DEFINE_ACCESSOR(optBinaryVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_binaryVal -#define APACHE_THRIFT_ACCESSOR_binaryVal -APACHE_THRIFT_DEFINE_ACCESSOR(binaryVal); +#ifndef APACHE_THRIFT_ACCESSOR_optStringVal +#define APACHE_THRIFT_ACCESSOR_optStringVal +APACHE_THRIFT_DEFINE_ACCESSOR(optStringVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_enumVal -#define APACHE_THRIFT_ACCESSOR_enumVal -APACHE_THRIFT_DEFINE_ACCESSOR(enumVal); +#ifndef APACHE_THRIFT_ACCESSOR_optDoubleVal +#define APACHE_THRIFT_ACCESSOR_optDoubleVal +APACHE_THRIFT_DEFINE_ACCESSOR(optDoubleVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_structVal -#define APACHE_THRIFT_ACCESSOR_structVal -APACHE_THRIFT_DEFINE_ACCESSOR(structVal); +#ifndef APACHE_THRIFT_ACCESSOR_optFloatVal +#define APACHE_THRIFT_ACCESSOR_optFloatVal +APACHE_THRIFT_DEFINE_ACCESSOR(optFloatVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_unionVal -#define APACHE_THRIFT_ACCESSOR_unionVal -APACHE_THRIFT_DEFINE_ACCESSOR(unionVal); +#ifndef APACHE_THRIFT_ACCESSOR_optI64Val +#define APACHE_THRIFT_ACCESSOR_optI64Val +APACHE_THRIFT_DEFINE_ACCESSOR(optI64Val); #endif -#ifndef APACHE_THRIFT_ACCESSOR_lateStructVal -#define APACHE_THRIFT_ACCESSOR_lateStructVal -APACHE_THRIFT_DEFINE_ACCESSOR(lateStructVal); +#ifndef APACHE_THRIFT_ACCESSOR_optI32Val +#define APACHE_THRIFT_ACCESSOR_optI32Val +APACHE_THRIFT_DEFINE_ACCESSOR(optI32Val); #endif -#ifndef APACHE_THRIFT_ACCESSOR_durationVal -#define APACHE_THRIFT_ACCESSOR_durationVal -APACHE_THRIFT_DEFINE_ACCESSOR(durationVal); +#ifndef APACHE_THRIFT_ACCESSOR_optI16Val +#define APACHE_THRIFT_ACCESSOR_optI16Val +APACHE_THRIFT_DEFINE_ACCESSOR(optI16Val); #endif -#ifndef APACHE_THRIFT_ACCESSOR_timeVal -#define APACHE_THRIFT_ACCESSOR_timeVal -APACHE_THRIFT_DEFINE_ACCESSOR(timeVal); +#ifndef APACHE_THRIFT_ACCESSOR_optByteVal +#define APACHE_THRIFT_ACCESSOR_optByteVal +APACHE_THRIFT_DEFINE_ACCESSOR(optByteVal); #endif #ifndef APACHE_THRIFT_ACCESSOR_optBoolVal #define APACHE_THRIFT_ACCESSOR_optBoolVal APACHE_THRIFT_DEFINE_ACCESSOR(optBoolVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optByteVal -#define APACHE_THRIFT_ACCESSOR_optByteVal -APACHE_THRIFT_DEFINE_ACCESSOR(optByteVal); +#ifndef APACHE_THRIFT_ACCESSOR_timeVal +#define APACHE_THRIFT_ACCESSOR_timeVal +APACHE_THRIFT_DEFINE_ACCESSOR(timeVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optI16Val -#define APACHE_THRIFT_ACCESSOR_optI16Val -APACHE_THRIFT_DEFINE_ACCESSOR(optI16Val); +#ifndef APACHE_THRIFT_ACCESSOR_durationVal +#define APACHE_THRIFT_ACCESSOR_durationVal +APACHE_THRIFT_DEFINE_ACCESSOR(durationVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optI32Val -#define APACHE_THRIFT_ACCESSOR_optI32Val -APACHE_THRIFT_DEFINE_ACCESSOR(optI32Val); +#ifndef APACHE_THRIFT_ACCESSOR_lateStructVal +#define APACHE_THRIFT_ACCESSOR_lateStructVal +APACHE_THRIFT_DEFINE_ACCESSOR(lateStructVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optI64Val -#define APACHE_THRIFT_ACCESSOR_optI64Val -APACHE_THRIFT_DEFINE_ACCESSOR(optI64Val); +#ifndef APACHE_THRIFT_ACCESSOR_unionVal +#define APACHE_THRIFT_ACCESSOR_unionVal +APACHE_THRIFT_DEFINE_ACCESSOR(unionVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optFloatVal -#define APACHE_THRIFT_ACCESSOR_optFloatVal -APACHE_THRIFT_DEFINE_ACCESSOR(optFloatVal); +#ifndef APACHE_THRIFT_ACCESSOR_structVal +#define APACHE_THRIFT_ACCESSOR_structVal +APACHE_THRIFT_DEFINE_ACCESSOR(structVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optDoubleVal -#define APACHE_THRIFT_ACCESSOR_optDoubleVal -APACHE_THRIFT_DEFINE_ACCESSOR(optDoubleVal); +#ifndef APACHE_THRIFT_ACCESSOR_enumVal +#define APACHE_THRIFT_ACCESSOR_enumVal +APACHE_THRIFT_DEFINE_ACCESSOR(enumVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optStringVal -#define APACHE_THRIFT_ACCESSOR_optStringVal -APACHE_THRIFT_DEFINE_ACCESSOR(optStringVal); +#ifndef APACHE_THRIFT_ACCESSOR_binaryVal +#define APACHE_THRIFT_ACCESSOR_binaryVal +APACHE_THRIFT_DEFINE_ACCESSOR(binaryVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optBinaryVal -#define APACHE_THRIFT_ACCESSOR_optBinaryVal -APACHE_THRIFT_DEFINE_ACCESSOR(optBinaryVal); +#ifndef APACHE_THRIFT_ACCESSOR_stringVal +#define APACHE_THRIFT_ACCESSOR_stringVal +APACHE_THRIFT_DEFINE_ACCESSOR(stringVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optEnumVal -#define APACHE_THRIFT_ACCESSOR_optEnumVal -APACHE_THRIFT_DEFINE_ACCESSOR(optEnumVal); +#ifndef APACHE_THRIFT_ACCESSOR_doubleVal +#define APACHE_THRIFT_ACCESSOR_doubleVal +APACHE_THRIFT_DEFINE_ACCESSOR(doubleVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optStructVal -#define APACHE_THRIFT_ACCESSOR_optStructVal -APACHE_THRIFT_DEFINE_ACCESSOR(optStructVal); +#ifndef APACHE_THRIFT_ACCESSOR_floatVal +#define APACHE_THRIFT_ACCESSOR_floatVal +APACHE_THRIFT_DEFINE_ACCESSOR(floatVal); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optLateStructVal -#define APACHE_THRIFT_ACCESSOR_optLateStructVal -APACHE_THRIFT_DEFINE_ACCESSOR(optLateStructVal); +#ifndef APACHE_THRIFT_ACCESSOR_i64Val +#define APACHE_THRIFT_ACCESSOR_i64Val +APACHE_THRIFT_DEFINE_ACCESSOR(i64Val); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optListVal -#define APACHE_THRIFT_ACCESSOR_optListVal -APACHE_THRIFT_DEFINE_ACCESSOR(optListVal); +#ifndef APACHE_THRIFT_ACCESSOR_i32Val +#define APACHE_THRIFT_ACCESSOR_i32Val +APACHE_THRIFT_DEFINE_ACCESSOR(i32Val); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optSetVal -#define APACHE_THRIFT_ACCESSOR_optSetVal -APACHE_THRIFT_DEFINE_ACCESSOR(optSetVal); +#ifndef APACHE_THRIFT_ACCESSOR_i16Val +#define APACHE_THRIFT_ACCESSOR_i16Val +APACHE_THRIFT_DEFINE_ACCESSOR(i16Val); #endif -#ifndef APACHE_THRIFT_ACCESSOR_optMapVal -#define APACHE_THRIFT_ACCESSOR_optMapVal -APACHE_THRIFT_DEFINE_ACCESSOR(optMapVal); +#ifndef APACHE_THRIFT_ACCESSOR_byteVal +#define APACHE_THRIFT_ACCESSOR_byteVal +APACHE_THRIFT_DEFINE_ACCESSOR(byteVal); +#endif +#ifndef APACHE_THRIFT_ACCESSOR_boolVal +#define APACHE_THRIFT_ACCESSOR_boolVal +APACHE_THRIFT_DEFINE_ACCESSOR(boolVal); #endif #ifndef APACHE_THRIFT_ACCESSOR_assign #define APACHE_THRIFT_ACCESSOR_assign @@ -5402,7 +5402,7 @@ unsigned long MyUnionPatchStruct::read(Protocol_* iprot) { using MyUnionPatch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::UnionPatchAdapter, ::test::fixtures::patch::MyUnionPatchStruct>; -class LateDefStructFieldPatchStruct final { +class MyStructFieldN10PatchStruct final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template friend struct ::apache::thrift::detail::invoke_reffer; @@ -5411,31 +5411,47 @@ class LateDefStructFieldPatchStruct final { static constexpr bool __fbthrift_cpp2_gen_json = false; static const char* __fbthrift_thrift_uri(); static const folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); - static constexpr std::size_t __fbthrift_field_size_v = 0; + static constexpr std::size_t __fbthrift_field_size_v = 2; template using __fbthrift_id = folly::type_pack_element_t; + void, + ::apache::thrift::field_id<1>, + ::apache::thrift::field_id<2>>; template using __fbthrift_type_tag = folly::type_pack_element_t; + void, + ::apache::thrift::type::enum_t<::test::fixtures::patch::MyEnum>, + ::apache::thrift::type::bool_t>; template using __fbthrift_ident = folly::type_pack_element_t; + void, + ::apache::thrift::ident::assign, + ::apache::thrift::ident::clear>; struct __fbthrift_ordinal_impl { #if defined(_MSC_VER) || defined(__clang__) template static constexpr int value = 0; + template<> static constexpr int value<::apache::thrift::field_id<1>> = 1; + template<> static constexpr int value<::apache::thrift::ident::assign> = 1; + template<> static constexpr int value<::apache::thrift::field_id<2>> = 2; + template<> static constexpr int value<::apache::thrift::ident::clear> = 2; #else template static constexpr int value_impl(folly::tag_t) { return 0; } - template static constexpr int value = value_impl(folly::tag_t{}); -#endif + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<1>>) { return 1; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::assign>) { return 1; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<2>>) { return 2; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::clear>) { return 2; } + template static constexpr int value = value_impl(folly::tag_t{}); +#endif }; struct __fbthrift_ordinal_impl_for_non_unique_type { template struct Impl { static constexpr int value = 0; }; + template struct Impl<::apache::thrift::type::enum_t<::test::fixtures::patch::MyEnum>, T, std::enable_if_t> { static constexpr int value = 1; }; + template struct Impl<::apache::thrift::type::bool_t, T, std::enable_if_t> { static constexpr int value = 2; }; template static constexpr int value = Impl::value; }; @@ -5452,32 +5468,145 @@ class LateDefStructFieldPatchStruct final { bool __fbthrift_is_empty() const; public: - using __fbthrift_cpp2_type = LateDefStructFieldPatchStruct; + using __fbthrift_cpp2_type = MyStructFieldN10PatchStruct; static constexpr bool __fbthrift_cpp2_is_union = false; public: - LateDefStructFieldPatchStruct() { + MyStructFieldN10PatchStruct() : + __fbthrift_field_assign(), + __fbthrift_field_clear() { } // FragileConstructor for use in initialization lists only. [[deprecated("This constructor is deprecated")]] - LateDefStructFieldPatchStruct(apache::thrift::FragileConstructor); + MyStructFieldN10PatchStruct(apache::thrift::FragileConstructor, ::test::fixtures::patch::MyEnum assign__arg, bool clear__arg); - LateDefStructFieldPatchStruct(LateDefStructFieldPatchStruct&&) = default; + MyStructFieldN10PatchStruct(MyStructFieldN10PatchStruct&&) = default; - LateDefStructFieldPatchStruct(const LateDefStructFieldPatchStruct&) = default; + MyStructFieldN10PatchStruct(const MyStructFieldN10PatchStruct&) = default; - LateDefStructFieldPatchStruct& operator=(LateDefStructFieldPatchStruct&&) = default; + MyStructFieldN10PatchStruct& operator=(MyStructFieldN10PatchStruct&&) = default; - LateDefStructFieldPatchStruct& operator=(const LateDefStructFieldPatchStruct&) = default; + MyStructFieldN10PatchStruct& operator=(const MyStructFieldN10PatchStruct&) = default; + private: + ::test::fixtures::patch::MyEnum __fbthrift_field_assign; + private: + bool __fbthrift_field_clear; + private: + apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: - bool operator==(const LateDefStructFieldPatchStruct&) const; - bool operator<(const LateDefStructFieldPatchStruct&) const; + bool operator==(const MyStructFieldN10PatchStruct&) const; + bool operator<(const MyStructFieldN10PatchStruct&) const; + + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const& { + return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; + } + + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const&& { + return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; + } + + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() & { + return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; + } + + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() && { + return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; + } + + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const& { + return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; + } + + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const&& { + return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; + } + + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign() & { + return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; + } + + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign() && { + return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref clear_ref() const& { + return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref clear_ref() const&& { + return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref clear_ref() & { + return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref clear_ref() && { + return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref clear() const& { + return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref clear() const&& { + return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref clear() & { + return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref clear() && { + return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; + } + + const ::test::fixtures::patch::MyEnum* get_assign() const& { + return assign_ref() ? std::addressof(__fbthrift_field_assign) : nullptr; + } + + ::test::fixtures::patch::MyEnum* get_assign() & { + return assign_ref() ? std::addressof(__fbthrift_field_assign) : nullptr; + } + ::test::fixtures::patch::MyEnum* get_assign() && = delete; + + [[deprecated("Use `FOO.assign_ref() = BAR;` instead of `FOO.set_assign(BAR);`")]] + ::test::fixtures::patch::MyEnum& set_assign(::test::fixtures::patch::MyEnum assign_) { + assign_ref() = assign_; + return __fbthrift_field_assign; + } + + bool get_clear() const { + return __fbthrift_field_clear; + } + + [[deprecated("Use `FOO.clear_ref() = BAR;` instead of `FOO.set_clear(BAR);`")]] + bool& set_clear(bool clear_) { + clear_ref() = clear_; + return __fbthrift_field_clear; + } template unsigned long read(Protocol_* iprot); @@ -5492,21 +5621,21 @@ class LateDefStructFieldPatchStruct final { template void readNoXfer(Protocol_* iprot); - friend class ::apache::thrift::Cpp2Ops; - friend void swap(LateDefStructFieldPatchStruct& a, LateDefStructFieldPatchStruct& b); + friend class ::apache::thrift::Cpp2Ops; + friend void swap(MyStructFieldN10PatchStruct& a, MyStructFieldN10PatchStruct& b); }; template -unsigned long LateDefStructFieldPatchStruct::read(Protocol_* iprot) { +unsigned long MyStructFieldN10PatchStruct::read(Protocol_* iprot) { auto _xferStart = iprot->getCursorPosition(); readNoXfer(iprot); return iprot->getCursorPosition() - _xferStart; } -using LateDefStructFieldPatch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::FieldPatchAdapter, ::test::fixtures::patch::LateDefStructFieldPatchStruct>; +using MyStructFieldN10Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::AssignPatchAdapter, ::test::fixtures::patch::MyStructFieldN10PatchStruct>; -class LateDefStructPatchStruct final { +class MyStructFieldN25PatchStruct final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template friend struct ::apache::thrift::detail::invoke_reffer; @@ -5515,34 +5644,25 @@ class LateDefStructPatchStruct final { static constexpr bool __fbthrift_cpp2_gen_json = false; static const char* __fbthrift_thrift_uri(); static const folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); - static constexpr std::size_t __fbthrift_field_size_v = 5; + static constexpr std::size_t __fbthrift_field_size_v = 2; template using __fbthrift_id = folly::type_pack_element_t, - ::apache::thrift::field_id<2>, - ::apache::thrift::field_id<3>, - ::apache::thrift::field_id<5>, - ::apache::thrift::field_id<6>>; + ::apache::thrift::field_id<2>>; template using __fbthrift_type_tag = folly::type_pack_element_t, - ::apache::thrift::type::bool_t, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::FieldPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructFieldPatchStruct>>, - ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStruct>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::FieldPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructFieldPatchStruct>>>; + ::apache::thrift::type::enum_t<::test::fixtures::patch::MyEnum>, + ::apache::thrift::type::bool_t>; template using __fbthrift_ident = folly::type_pack_element_t; + ::apache::thrift::ident::clear>; struct __fbthrift_ordinal_impl { #if defined(_MSC_VER) || defined(__clang__) @@ -5551,35 +5671,20 @@ class LateDefStructPatchStruct final { template<> static constexpr int value<::apache::thrift::ident::assign> = 1; template<> static constexpr int value<::apache::thrift::field_id<2>> = 2; template<> static constexpr int value<::apache::thrift::ident::clear> = 2; - template<> static constexpr int value<::apache::thrift::field_id<3>> = 3; - template<> static constexpr int value<::apache::thrift::ident::patchPrior> = 3; - template<> static constexpr int value<::apache::thrift::field_id<5>> = 4; - template<> static constexpr int value<::apache::thrift::ident::ensure> = 4; - template<> static constexpr int value<::apache::thrift::field_id<6>> = 5; - template<> static constexpr int value<::apache::thrift::ident::patch> = 5; #else template static constexpr int value_impl(folly::tag_t) { return 0; } static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<1>>) { return 1; } static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::assign>) { return 1; } static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<2>>) { return 2; } static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::clear>) { return 2; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<3>>) { return 3; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::patchPrior>) { return 3; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<5>>) { return 4; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::ensure>) { return 4; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<6>>) { return 5; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::patch>) { return 5; } template static constexpr int value = value_impl(folly::tag_t{}); #endif }; struct __fbthrift_ordinal_impl_for_non_unique_type { template struct Impl { static constexpr int value = 0; }; - template struct Impl<::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStruct>, T, std::enable_if_t> { static constexpr int value = 1; }; + template struct Impl<::apache::thrift::type::enum_t<::test::fixtures::patch::MyEnum>, T, std::enable_if_t> { static constexpr int value = 1; }; template struct Impl<::apache::thrift::type::bool_t, T, std::enable_if_t> { static constexpr int value = 2; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::FieldPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructFieldPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 3; }; - template struct Impl<::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStruct>, T, std::enable_if_t> { static constexpr int value = 4; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::FieldPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructFieldPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 5; }; template static constexpr int value = Impl::value; }; @@ -5596,244 +5701,134 @@ class LateDefStructPatchStruct final { bool __fbthrift_is_empty() const; public: - using __fbthrift_cpp2_type = LateDefStructPatchStruct; + using __fbthrift_cpp2_type = MyStructFieldN25PatchStruct; static constexpr bool __fbthrift_cpp2_is_union = false; public: - LateDefStructPatchStruct(); - + MyStructFieldN25PatchStruct() : + __fbthrift_field_assign(), + __fbthrift_field_clear() { + } // FragileConstructor for use in initialization lists only. [[deprecated("This constructor is deprecated")]] - LateDefStructPatchStruct(apache::thrift::FragileConstructor, ::apache::thrift::detail::boxed_value_ptr<::test::fixtures::patch::LateDefStruct> assign__arg, bool clear__arg, ::test::fixtures::patch::LateDefStructFieldPatch patchPrior__arg, ::test::fixtures::patch::LateDefStruct ensure__arg, ::test::fixtures::patch::LateDefStructFieldPatch patch__arg); + MyStructFieldN25PatchStruct(apache::thrift::FragileConstructor, ::test::fixtures::patch::MyEnum assign__arg, bool clear__arg); - LateDefStructPatchStruct(LateDefStructPatchStruct&&) noexcept; - LateDefStructPatchStruct(const LateDefStructPatchStruct& src); + MyStructFieldN25PatchStruct(MyStructFieldN25PatchStruct&&) = default; + MyStructFieldN25PatchStruct(const MyStructFieldN25PatchStruct&) = default; - LateDefStructPatchStruct& operator=(LateDefStructPatchStruct&&) noexcept; - LateDefStructPatchStruct& operator=(const LateDefStructPatchStruct& src); - ~LateDefStructPatchStruct(); + MyStructFieldN25PatchStruct& operator=(MyStructFieldN25PatchStruct&&) = default; + MyStructFieldN25PatchStruct& operator=(const MyStructFieldN25PatchStruct&) = default; private: - ::apache::thrift::detail::boxed_value_ptr<::test::fixtures::patch::LateDefStruct> __fbthrift_field_assign; + ::test::fixtures::patch::MyEnum __fbthrift_field_assign; private: bool __fbthrift_field_clear; private: - ::test::fixtures::patch::LateDefStructFieldPatch __fbthrift_field_patchPrior; - private: - ::test::fixtures::patch::LateDefStruct __fbthrift_field_ensure; - private: - ::test::fixtures::patch::LateDefStructFieldPatch __fbthrift_field_patch; - private: - apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; + apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: - bool operator==(const LateDefStructPatchStruct&) const; - bool operator<(const LateDefStructPatchStruct&) const; + bool operator==(const MyStructFieldN25PatchStruct&) const; + bool operator<(const MyStructFieldN25PatchStruct&) const; - template > - FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign_ref() const& { - return ::apache::thrift::optional_boxed_field_ref{this->__fbthrift_field_assign}; + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const& { + return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign_ref() const&& { - return ::apache::thrift::optional_boxed_field_ref{static_cast(this->__fbthrift_field_assign)}; + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const&& { + return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign_ref() & { - return ::apache::thrift::optional_boxed_field_ref{this->__fbthrift_field_assign}; + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() & { + return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign_ref() && { - return ::apache::thrift::optional_boxed_field_ref{static_cast(this->__fbthrift_field_assign)}; + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() && { + return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign() const& { - return ::apache::thrift::optional_boxed_field_ref{this->__fbthrift_field_assign}; + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const& { + return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign() const&& { - return ::apache::thrift::optional_boxed_field_ref{static_cast(this->__fbthrift_field_assign)}; + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const&& { + return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign() & { - return ::apache::thrift::optional_boxed_field_ref{this->__fbthrift_field_assign}; + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign() & { + return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign() && { - return ::apache::thrift::optional_boxed_field_ref{static_cast(this->__fbthrift_field_assign)}; + template + FOLLY_ERASE ::apache::thrift::optional_field_ref assign() && { + return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear_ref() const& { - return {this->__fbthrift_field_clear, __isset.at(0), __isset.bit(0)}; + return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear_ref() const&& { - return {static_cast(this->__fbthrift_field_clear), __isset.at(0), __isset.bit(0)}; + return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear_ref() & { - return {this->__fbthrift_field_clear, __isset.at(0), __isset.bit(0)}; + return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear_ref() && { - return {static_cast(this->__fbthrift_field_clear), __isset.at(0), __isset.bit(0)}; + return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear() const& { - return {this->__fbthrift_field_clear, __isset.at(0), __isset.bit(0)}; + return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear() const&& { - return {static_cast(this->__fbthrift_field_clear), __isset.at(0), __isset.bit(0)}; + return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear() & { - return {this->__fbthrift_field_clear, __isset.at(0), __isset.bit(0)}; + return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear() && { - return {static_cast(this->__fbthrift_field_clear), __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patchPrior_ref() const& { - return {this->__fbthrift_field_patchPrior, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patchPrior_ref() const&& { - return {static_cast(this->__fbthrift_field_patchPrior), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patchPrior_ref() & { - return {this->__fbthrift_field_patchPrior, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patchPrior_ref() && { - return {static_cast(this->__fbthrift_field_patchPrior), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patchPrior() const& { - return {this->__fbthrift_field_patchPrior, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patchPrior() const&& { - return {static_cast(this->__fbthrift_field_patchPrior), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patchPrior() & { - return {this->__fbthrift_field_patchPrior, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patchPrior() && { - return {static_cast(this->__fbthrift_field_patchPrior), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref ensure_ref() const& { - return {this->__fbthrift_field_ensure, __isset.at(2), __isset.bit(2)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref ensure_ref() const&& { - return {static_cast(this->__fbthrift_field_ensure), __isset.at(2), __isset.bit(2)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref ensure_ref() & { - return {this->__fbthrift_field_ensure, __isset.at(2), __isset.bit(2)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref ensure_ref() && { - return {static_cast(this->__fbthrift_field_ensure), __isset.at(2), __isset.bit(2)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref ensure() const& { - return {this->__fbthrift_field_ensure, __isset.at(2), __isset.bit(2)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref ensure() const&& { - return {static_cast(this->__fbthrift_field_ensure), __isset.at(2), __isset.bit(2)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref ensure() & { - return {this->__fbthrift_field_ensure, __isset.at(2), __isset.bit(2)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref ensure() && { - return {static_cast(this->__fbthrift_field_ensure), __isset.at(2), __isset.bit(2)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patch_ref() const& { - return {this->__fbthrift_field_patch, __isset.at(3), __isset.bit(3)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patch_ref() const&& { - return {static_cast(this->__fbthrift_field_patch), __isset.at(3), __isset.bit(3)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patch_ref() & { - return {this->__fbthrift_field_patch, __isset.at(3), __isset.bit(3)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patch_ref() && { - return {static_cast(this->__fbthrift_field_patch), __isset.at(3), __isset.bit(3)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref patch() const& { - return {this->__fbthrift_field_patch, __isset.at(3), __isset.bit(3)}; + return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref patch() const&& { - return {static_cast(this->__fbthrift_field_patch), __isset.at(3), __isset.bit(3)}; + const ::test::fixtures::patch::MyEnum* get_assign() const& { + return assign_ref() ? std::addressof(__fbthrift_field_assign) : nullptr; } - template - FOLLY_ERASE ::apache::thrift::field_ref patch() & { - return {this->__fbthrift_field_patch, __isset.at(3), __isset.bit(3)}; + ::test::fixtures::patch::MyEnum* get_assign() & { + return assign_ref() ? std::addressof(__fbthrift_field_assign) : nullptr; } + ::test::fixtures::patch::MyEnum* get_assign() && = delete; - template - FOLLY_ERASE ::apache::thrift::field_ref patch() && { - return {static_cast(this->__fbthrift_field_patch), __isset.at(3), __isset.bit(3)}; + [[deprecated("Use `FOO.assign_ref() = BAR;` instead of `FOO.set_assign(BAR);`")]] + ::test::fixtures::patch::MyEnum& set_assign(::test::fixtures::patch::MyEnum assign_) { + assign_ref() = assign_; + return __fbthrift_field_assign; } bool get_clear() const { @@ -5845,15 +5840,6 @@ class LateDefStructPatchStruct final { clear_ref() = clear_; return __fbthrift_field_clear; } - const ::test::fixtures::patch::LateDefStruct& get_ensure() const&; - ::test::fixtures::patch::LateDefStruct get_ensure() &&; - - template - [[deprecated("Use `FOO.ensure_ref() = BAR;` instead of `FOO.set_ensure(BAR);`")]] - ::test::fixtures::patch::LateDefStruct& set_ensure(T_LateDefStructPatchStruct_ensure_struct_setter&& ensure_) { - ensure_ref() = std::forward(ensure_); - return __fbthrift_field_ensure; - } template unsigned long read(Protocol_* iprot); @@ -5868,21 +5854,21 @@ class LateDefStructPatchStruct final { template void readNoXfer(Protocol_* iprot); - friend class ::apache::thrift::Cpp2Ops; - friend void swap(LateDefStructPatchStruct& a, LateDefStructPatchStruct& b); + friend class ::apache::thrift::Cpp2Ops; + friend void swap(MyStructFieldN25PatchStruct& a, MyStructFieldN25PatchStruct& b); }; template -unsigned long LateDefStructPatchStruct::read(Protocol_* iprot) { +unsigned long MyStructFieldN25PatchStruct::read(Protocol_* iprot) { auto _xferStart = iprot->getCursorPosition(); readNoXfer(iprot); return iprot->getCursorPosition() - _xferStart; } -using LateDefStructPatch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::StructPatchAdapter, ::test::fixtures::patch::LateDefStructPatchStruct>; +using MyStructFieldN25Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::AssignPatchAdapter, ::test::fixtures::patch::MyStructFieldN25PatchStruct>; -class MyStructFieldN10PatchStruct final { +class MyStructFieldN28PatchStruct final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template friend struct ::apache::thrift::detail::invoke_reffer; @@ -5891,25 +5877,37 @@ class MyStructFieldN10PatchStruct final { static constexpr bool __fbthrift_cpp2_gen_json = false; static const char* __fbthrift_thrift_uri(); static const folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); - static constexpr std::size_t __fbthrift_field_size_v = 2; + static constexpr std::size_t __fbthrift_field_size_v = 6; template using __fbthrift_id = folly::type_pack_element_t, - ::apache::thrift::field_id<2>>; + ::apache::thrift::field_id<2>, + ::apache::thrift::field_id<3>, + ::apache::thrift::field_id<7>, + ::apache::thrift::field_id<8>, + ::apache::thrift::field_id<9>>; template using __fbthrift_type_tag = folly::type_pack_element_t, - ::apache::thrift::type::bool_t>; + ::apache::thrift::type::list<::apache::thrift::type::i16_t>, + ::apache::thrift::type::bool_t, + ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>>, + ::apache::thrift::type::list<::apache::thrift::type::i16_t>, + ::apache::thrift::type::list<::apache::thrift::type::i16_t>, + ::apache::thrift::type::list<::apache::thrift::type::i16_t>>; template using __fbthrift_ident = folly::type_pack_element_t; + ::apache::thrift::ident::clear, + ::apache::thrift::ident::patch, + ::apache::thrift::ident::remove, + ::apache::thrift::ident::prepend, + ::apache::thrift::ident::append>; struct __fbthrift_ordinal_impl { #if defined(_MSC_VER) || defined(__clang__) @@ -5918,20 +5916,40 @@ class MyStructFieldN10PatchStruct final { template<> static constexpr int value<::apache::thrift::ident::assign> = 1; template<> static constexpr int value<::apache::thrift::field_id<2>> = 2; template<> static constexpr int value<::apache::thrift::ident::clear> = 2; + template<> static constexpr int value<::apache::thrift::field_id<3>> = 3; + template<> static constexpr int value<::apache::thrift::ident::patch> = 3; + template<> static constexpr int value<::apache::thrift::field_id<7>> = 4; + template<> static constexpr int value<::apache::thrift::ident::remove> = 4; + template<> static constexpr int value<::apache::thrift::field_id<8>> = 5; + template<> static constexpr int value<::apache::thrift::ident::prepend> = 5; + template<> static constexpr int value<::apache::thrift::field_id<9>> = 6; + template<> static constexpr int value<::apache::thrift::ident::append> = 6; #else template static constexpr int value_impl(folly::tag_t) { return 0; } static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<1>>) { return 1; } static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::assign>) { return 1; } static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<2>>) { return 2; } static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::clear>) { return 2; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<3>>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::patch>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<7>>) { return 4; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::remove>) { return 4; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<8>>) { return 5; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::prepend>) { return 5; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<9>>) { return 6; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::append>) { return 6; } template static constexpr int value = value_impl(folly::tag_t{}); #endif }; struct __fbthrift_ordinal_impl_for_non_unique_type { template struct Impl { static constexpr int value = 0; }; - template struct Impl<::apache::thrift::type::enum_t<::test::fixtures::patch::MyEnum>, T, std::enable_if_t> { static constexpr int value = 1; }; + template struct Impl<::apache::thrift::type::list<::apache::thrift::type::i16_t>, T, std::enable_if_t> { static constexpr int value = 1; }; template struct Impl<::apache::thrift::type::bool_t, T, std::enable_if_t> { static constexpr int value = 2; }; + template struct Impl<::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>>, T, std::enable_if_t> { static constexpr int value = 3; }; + template struct Impl<::apache::thrift::type::list<::apache::thrift::type::i16_t>, T, std::enable_if_t> { static constexpr int value = 4; }; + template struct Impl<::apache::thrift::type::list<::apache::thrift::type::i16_t>, T, std::enable_if_t> { static constexpr int value = 5; }; + template struct Impl<::apache::thrift::type::list<::apache::thrift::type::i16_t>, T, std::enable_if_t> { static constexpr int value = 6; }; template static constexpr int value = Impl::value; }; @@ -5948,77 +5966,85 @@ class MyStructFieldN10PatchStruct final { bool __fbthrift_is_empty() const; public: - using __fbthrift_cpp2_type = MyStructFieldN10PatchStruct; + using __fbthrift_cpp2_type = MyStructFieldN28PatchStruct; static constexpr bool __fbthrift_cpp2_is_union = false; public: - MyStructFieldN10PatchStruct() : - __fbthrift_field_assign(), - __fbthrift_field_clear() { - } + MyStructFieldN28PatchStruct(); + // FragileConstructor for use in initialization lists only. [[deprecated("This constructor is deprecated")]] - MyStructFieldN10PatchStruct(apache::thrift::FragileConstructor, ::test::fixtures::patch::MyEnum assign__arg, bool clear__arg); + MyStructFieldN28PatchStruct(apache::thrift::FragileConstructor, ::std::vector<::std::int16_t> assign__arg, bool clear__arg, ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch> patch__arg, ::std::vector<::std::int16_t> remove__arg, ::std::vector<::std::int16_t> prepend__arg, ::std::vector<::std::int16_t> append__arg); - MyStructFieldN10PatchStruct(MyStructFieldN10PatchStruct&&) = default; + MyStructFieldN28PatchStruct(MyStructFieldN28PatchStruct&&) noexcept; - MyStructFieldN10PatchStruct(const MyStructFieldN10PatchStruct&) = default; + MyStructFieldN28PatchStruct(const MyStructFieldN28PatchStruct& src); - MyStructFieldN10PatchStruct& operator=(MyStructFieldN10PatchStruct&&) = default; + MyStructFieldN28PatchStruct& operator=(MyStructFieldN28PatchStruct&&) noexcept; + MyStructFieldN28PatchStruct& operator=(const MyStructFieldN28PatchStruct& src); + + ~MyStructFieldN28PatchStruct(); - MyStructFieldN10PatchStruct& operator=(const MyStructFieldN10PatchStruct&) = default; private: - ::test::fixtures::patch::MyEnum __fbthrift_field_assign; + ::std::vector<::std::int16_t> __fbthrift_field_assign; private: bool __fbthrift_field_clear; private: - apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; + ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch> __fbthrift_field_patch; + private: + ::std::vector<::std::int16_t> __fbthrift_field_remove; + private: + ::std::vector<::std::int16_t> __fbthrift_field_prepend; + private: + ::std::vector<::std::int16_t> __fbthrift_field_append; + private: + apache::thrift::detail::isset_bitset<6, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: - bool operator==(const MyStructFieldN10PatchStruct&) const; - bool operator<(const MyStructFieldN10PatchStruct&) const; + bool operator==(const MyStructFieldN28PatchStruct&) const; + bool operator<(const MyStructFieldN28PatchStruct&) const; - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const& { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const&& { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() & { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() && { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const& { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const&& { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() & { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() && { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } @@ -6063,18 +6089,173 @@ class MyStructFieldN10PatchStruct final { return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; } - const ::test::fixtures::patch::MyEnum* get_assign() const& { - return assign_ref() ? std::addressof(__fbthrift_field_assign) : nullptr; + template > + FOLLY_ERASE ::apache::thrift::field_ref patch_ref() const& { + return {this->__fbthrift_field_patch, __isset.at(2), __isset.bit(2)}; } - ::test::fixtures::patch::MyEnum* get_assign() & { - return assign_ref() ? std::addressof(__fbthrift_field_assign) : nullptr; + template > + FOLLY_ERASE ::apache::thrift::field_ref patch_ref() const&& { + return {static_cast(this->__fbthrift_field_patch), __isset.at(2), __isset.bit(2)}; } - ::test::fixtures::patch::MyEnum* get_assign() && = delete; + template > + FOLLY_ERASE ::apache::thrift::field_ref patch_ref() & { + return {this->__fbthrift_field_patch, __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref patch_ref() && { + return {static_cast(this->__fbthrift_field_patch), __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref patch() const& { + return {this->__fbthrift_field_patch, __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref patch() const&& { + return {static_cast(this->__fbthrift_field_patch), __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref patch() & { + return {this->__fbthrift_field_patch, __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref patch() && { + return {static_cast(this->__fbthrift_field_patch), __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const& { + return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const&& { + return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove_ref() & { + return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove_ref() && { + return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove() const& { + return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove() const&& { + return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove() & { + return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove() && { + return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref prepend_ref() const& { + return {this->__fbthrift_field_prepend, __isset.at(4), __isset.bit(4)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref prepend_ref() const&& { + return {static_cast(this->__fbthrift_field_prepend), __isset.at(4), __isset.bit(4)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref prepend_ref() & { + return {this->__fbthrift_field_prepend, __isset.at(4), __isset.bit(4)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref prepend_ref() && { + return {static_cast(this->__fbthrift_field_prepend), __isset.at(4), __isset.bit(4)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref prepend() const& { + return {this->__fbthrift_field_prepend, __isset.at(4), __isset.bit(4)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref prepend() const&& { + return {static_cast(this->__fbthrift_field_prepend), __isset.at(4), __isset.bit(4)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref prepend() & { + return {this->__fbthrift_field_prepend, __isset.at(4), __isset.bit(4)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref prepend() && { + return {static_cast(this->__fbthrift_field_prepend), __isset.at(4), __isset.bit(4)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref append_ref() const& { + return {this->__fbthrift_field_append, __isset.at(5), __isset.bit(5)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref append_ref() const&& { + return {static_cast(this->__fbthrift_field_append), __isset.at(5), __isset.bit(5)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref append_ref() & { + return {this->__fbthrift_field_append, __isset.at(5), __isset.bit(5)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref append_ref() && { + return {static_cast(this->__fbthrift_field_append), __isset.at(5), __isset.bit(5)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref append() const& { + return {this->__fbthrift_field_append, __isset.at(5), __isset.bit(5)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref append() const&& { + return {static_cast(this->__fbthrift_field_append), __isset.at(5), __isset.bit(5)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref append() & { + return {this->__fbthrift_field_append, __isset.at(5), __isset.bit(5)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref append() && { + return {static_cast(this->__fbthrift_field_append), __isset.at(5), __isset.bit(5)}; + } + const ::std::vector<::std::int16_t>* get_assign() const&; + ::std::vector<::std::int16_t>* get_assign() &; + ::std::vector<::std::int16_t>* get_assign() && = delete; + + template > [[deprecated("Use `FOO.assign_ref() = BAR;` instead of `FOO.set_assign(BAR);`")]] - ::test::fixtures::patch::MyEnum& set_assign(::test::fixtures::patch::MyEnum assign_) { - assign_ref() = assign_; + ::std::vector<::std::int16_t>& set_assign(T_MyStructFieldN28PatchStruct_assign_struct_setter&& assign_) { + assign_ref() = std::forward(assign_); return __fbthrift_field_assign; } @@ -6087,6 +6268,42 @@ class MyStructFieldN10PatchStruct final { clear_ref() = clear_; return __fbthrift_field_clear; } + const ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch>& get_patch() const&; + ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch> get_patch() &&; + + template > + [[deprecated("Use `FOO.patch_ref() = BAR;` instead of `FOO.set_patch(BAR);`")]] + ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch>& set_patch(T_MyStructFieldN28PatchStruct_patch_struct_setter&& patch_) { + patch_ref() = std::forward(patch_); + return __fbthrift_field_patch; + } + const ::std::vector<::std::int16_t>& get_remove() const&; + ::std::vector<::std::int16_t> get_remove() &&; + + template > + [[deprecated("Use `FOO.remove_ref() = BAR;` instead of `FOO.set_remove(BAR);`")]] + ::std::vector<::std::int16_t>& set_remove(T_MyStructFieldN28PatchStruct_remove_struct_setter&& remove_) { + remove_ref() = std::forward(remove_); + return __fbthrift_field_remove; + } + const ::std::vector<::std::int16_t>& get_prepend() const&; + ::std::vector<::std::int16_t> get_prepend() &&; + + template > + [[deprecated("Use `FOO.prepend_ref() = BAR;` instead of `FOO.set_prepend(BAR);`")]] + ::std::vector<::std::int16_t>& set_prepend(T_MyStructFieldN28PatchStruct_prepend_struct_setter&& prepend_) { + prepend_ref() = std::forward(prepend_); + return __fbthrift_field_prepend; + } + const ::std::vector<::std::int16_t>& get_append() const&; + ::std::vector<::std::int16_t> get_append() &&; + + template > + [[deprecated("Use `FOO.append_ref() = BAR;` instead of `FOO.set_append(BAR);`")]] + ::std::vector<::std::int16_t>& set_append(T_MyStructFieldN28PatchStruct_append_struct_setter&& append_) { + append_ref() = std::forward(append_); + return __fbthrift_field_append; + } template unsigned long read(Protocol_* iprot); @@ -6101,21 +6318,21 @@ class MyStructFieldN10PatchStruct final { template void readNoXfer(Protocol_* iprot); - friend class ::apache::thrift::Cpp2Ops; - friend void swap(MyStructFieldN10PatchStruct& a, MyStructFieldN10PatchStruct& b); + friend class ::apache::thrift::Cpp2Ops; + friend void swap(MyStructFieldN28PatchStruct& a, MyStructFieldN28PatchStruct& b); }; template -unsigned long MyStructFieldN10PatchStruct::read(Protocol_* iprot) { +unsigned long MyStructFieldN28PatchStruct::read(Protocol_* iprot) { auto _xferStart = iprot->getCursorPosition(); readNoXfer(iprot); return iprot->getCursorPosition() - _xferStart; } -using MyStructFieldN10Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::AssignPatchAdapter, ::test::fixtures::patch::MyStructFieldN10PatchStruct>; +using MyStructFieldN28Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::ListPatchAdapter, ::test::fixtures::patch::MyStructFieldN28PatchStruct>; -class MyStructFieldN25PatchStruct final { +class MyStructFieldN29PatchStruct final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template friend struct ::apache::thrift::detail::invoke_reffer; @@ -6124,25 +6341,31 @@ class MyStructFieldN25PatchStruct final { static constexpr bool __fbthrift_cpp2_gen_json = false; static const char* __fbthrift_thrift_uri(); static const folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); - static constexpr std::size_t __fbthrift_field_size_v = 2; + static constexpr std::size_t __fbthrift_field_size_v = 4; template using __fbthrift_id = folly::type_pack_element_t, - ::apache::thrift::field_id<2>>; + ::apache::thrift::field_id<2>, + ::apache::thrift::field_id<7>, + ::apache::thrift::field_id<8>>; template using __fbthrift_type_tag = folly::type_pack_element_t, - ::apache::thrift::type::bool_t>; + ::apache::thrift::type::set<::apache::thrift::type::string_t>, + ::apache::thrift::type::bool_t, + ::apache::thrift::type::set<::apache::thrift::type::string_t>, + ::apache::thrift::type::set<::apache::thrift::type::string_t>>; template using __fbthrift_ident = folly::type_pack_element_t; + ::apache::thrift::ident::clear, + ::apache::thrift::ident::remove, + ::apache::thrift::ident::add>; struct __fbthrift_ordinal_impl { #if defined(_MSC_VER) || defined(__clang__) @@ -6151,20 +6374,30 @@ class MyStructFieldN25PatchStruct final { template<> static constexpr int value<::apache::thrift::ident::assign> = 1; template<> static constexpr int value<::apache::thrift::field_id<2>> = 2; template<> static constexpr int value<::apache::thrift::ident::clear> = 2; + template<> static constexpr int value<::apache::thrift::field_id<7>> = 3; + template<> static constexpr int value<::apache::thrift::ident::remove> = 3; + template<> static constexpr int value<::apache::thrift::field_id<8>> = 4; + template<> static constexpr int value<::apache::thrift::ident::add> = 4; #else template static constexpr int value_impl(folly::tag_t) { return 0; } static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<1>>) { return 1; } static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::assign>) { return 1; } static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<2>>) { return 2; } static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::clear>) { return 2; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<7>>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::remove>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<8>>) { return 4; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::add>) { return 4; } template static constexpr int value = value_impl(folly::tag_t{}); #endif }; struct __fbthrift_ordinal_impl_for_non_unique_type { template struct Impl { static constexpr int value = 0; }; - template struct Impl<::apache::thrift::type::enum_t<::test::fixtures::patch::MyEnum>, T, std::enable_if_t> { static constexpr int value = 1; }; + template struct Impl<::apache::thrift::type::set<::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 1; }; template struct Impl<::apache::thrift::type::bool_t, T, std::enable_if_t> { static constexpr int value = 2; }; + template struct Impl<::apache::thrift::type::set<::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 3; }; + template struct Impl<::apache::thrift::type::set<::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 4; }; template static constexpr int value = Impl::value; }; @@ -6181,77 +6414,79 @@ class MyStructFieldN25PatchStruct final { bool __fbthrift_is_empty() const; public: - using __fbthrift_cpp2_type = MyStructFieldN25PatchStruct; + using __fbthrift_cpp2_type = MyStructFieldN29PatchStruct; static constexpr bool __fbthrift_cpp2_is_union = false; public: - MyStructFieldN25PatchStruct() : - __fbthrift_field_assign(), + MyStructFieldN29PatchStruct() : __fbthrift_field_clear() { } // FragileConstructor for use in initialization lists only. [[deprecated("This constructor is deprecated")]] - MyStructFieldN25PatchStruct(apache::thrift::FragileConstructor, ::test::fixtures::patch::MyEnum assign__arg, bool clear__arg); - - MyStructFieldN25PatchStruct(MyStructFieldN25PatchStruct&&) = default; + MyStructFieldN29PatchStruct(apache::thrift::FragileConstructor, ::std::set<::std::string> assign__arg, bool clear__arg, ::std::set<::std::string> remove__arg, ::std::set<::std::string> add__arg); - MyStructFieldN25PatchStruct(const MyStructFieldN25PatchStruct&) = default; + MyStructFieldN29PatchStruct(MyStructFieldN29PatchStruct&&) noexcept; + MyStructFieldN29PatchStruct(const MyStructFieldN29PatchStruct& src); - MyStructFieldN25PatchStruct& operator=(MyStructFieldN25PatchStruct&&) = default; - MyStructFieldN25PatchStruct& operator=(const MyStructFieldN25PatchStruct&) = default; + MyStructFieldN29PatchStruct& operator=(MyStructFieldN29PatchStruct&&) noexcept; + MyStructFieldN29PatchStruct& operator=(const MyStructFieldN29PatchStruct& src); private: - ::test::fixtures::patch::MyEnum __fbthrift_field_assign; + ::std::set<::std::string> __fbthrift_field_assign; private: bool __fbthrift_field_clear; private: - apache::thrift::detail::isset_bitset<2, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; + ::std::set<::std::string> __fbthrift_field_remove; + private: + ::std::set<::std::string> __fbthrift_field_add; + private: + apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: - bool operator==(const MyStructFieldN25PatchStruct&) const; - bool operator<(const MyStructFieldN25PatchStruct&) const; + bool operator==(const MyStructFieldN29PatchStruct&) const; + bool operator<(const MyStructFieldN29PatchStruct&) const; - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const& { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const&& { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() & { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() && { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const& { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const&& { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() & { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() && { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } @@ -6296,18 +6531,93 @@ class MyStructFieldN25PatchStruct final { return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; } - const ::test::fixtures::patch::MyEnum* get_assign() const& { - return assign_ref() ? std::addressof(__fbthrift_field_assign) : nullptr; + template > + FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const& { + return {this->__fbthrift_field_remove, __isset.at(2), __isset.bit(2)}; } - ::test::fixtures::patch::MyEnum* get_assign() & { - return assign_ref() ? std::addressof(__fbthrift_field_assign) : nullptr; + template > + FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const&& { + return {static_cast(this->__fbthrift_field_remove), __isset.at(2), __isset.bit(2)}; } - ::test::fixtures::patch::MyEnum* get_assign() && = delete; + template > + FOLLY_ERASE ::apache::thrift::field_ref remove_ref() & { + return {this->__fbthrift_field_remove, __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove_ref() && { + return {static_cast(this->__fbthrift_field_remove), __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove() const& { + return {this->__fbthrift_field_remove, __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove() const&& { + return {static_cast(this->__fbthrift_field_remove), __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove() & { + return {this->__fbthrift_field_remove, __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref remove() && { + return {static_cast(this->__fbthrift_field_remove), __isset.at(2), __isset.bit(2)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref add_ref() const& { + return {this->__fbthrift_field_add, __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref add_ref() const&& { + return {static_cast(this->__fbthrift_field_add), __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref add_ref() & { + return {this->__fbthrift_field_add, __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref add_ref() && { + return {static_cast(this->__fbthrift_field_add), __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref add() const& { + return {this->__fbthrift_field_add, __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref add() const&& { + return {static_cast(this->__fbthrift_field_add), __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref add() & { + return {this->__fbthrift_field_add, __isset.at(3), __isset.bit(3)}; + } + + template > + FOLLY_ERASE ::apache::thrift::field_ref add() && { + return {static_cast(this->__fbthrift_field_add), __isset.at(3), __isset.bit(3)}; + } + const ::std::set<::std::string>* get_assign() const&; + ::std::set<::std::string>* get_assign() &; + ::std::set<::std::string>* get_assign() && = delete; + + template > [[deprecated("Use `FOO.assign_ref() = BAR;` instead of `FOO.set_assign(BAR);`")]] - ::test::fixtures::patch::MyEnum& set_assign(::test::fixtures::patch::MyEnum assign_) { - assign_ref() = assign_; + ::std::set<::std::string>& set_assign(T_MyStructFieldN29PatchStruct_assign_struct_setter&& assign_) { + assign_ref() = std::forward(assign_); return __fbthrift_field_assign; } @@ -6320,6 +6630,24 @@ class MyStructFieldN25PatchStruct final { clear_ref() = clear_; return __fbthrift_field_clear; } + const ::std::set<::std::string>& get_remove() const&; + ::std::set<::std::string> get_remove() &&; + + template > + [[deprecated("Use `FOO.remove_ref() = BAR;` instead of `FOO.set_remove(BAR);`")]] + ::std::set<::std::string>& set_remove(T_MyStructFieldN29PatchStruct_remove_struct_setter&& remove_) { + remove_ref() = std::forward(remove_); + return __fbthrift_field_remove; + } + const ::std::set<::std::string>& get_add() const&; + ::std::set<::std::string> get_add() &&; + + template > + [[deprecated("Use `FOO.add_ref() = BAR;` instead of `FOO.set_add(BAR);`")]] + ::std::set<::std::string>& set_add(T_MyStructFieldN29PatchStruct_add_struct_setter&& add_) { + add_ref() = std::forward(add_); + return __fbthrift_field_add; + } template unsigned long read(Protocol_* iprot); @@ -6334,21 +6662,21 @@ class MyStructFieldN25PatchStruct final { template void readNoXfer(Protocol_* iprot); - friend class ::apache::thrift::Cpp2Ops; - friend void swap(MyStructFieldN25PatchStruct& a, MyStructFieldN25PatchStruct& b); + friend class ::apache::thrift::Cpp2Ops; + friend void swap(MyStructFieldN29PatchStruct& a, MyStructFieldN29PatchStruct& b); }; template -unsigned long MyStructFieldN25PatchStruct::read(Protocol_* iprot) { +unsigned long MyStructFieldN29PatchStruct::read(Protocol_* iprot) { auto _xferStart = iprot->getCursorPosition(); readNoXfer(iprot); return iprot->getCursorPosition() - _xferStart; } -using MyStructFieldN25Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::AssignPatchAdapter, ::test::fixtures::patch::MyStructFieldN25PatchStruct>; +using MyStructFieldN29Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::SetPatchAdapter, ::test::fixtures::patch::MyStructFieldN29PatchStruct>; -class MyStructFieldN28PatchStruct final { +class MyStructFieldN30PatchStruct final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template friend struct ::apache::thrift::detail::invoke_reffer; @@ -6357,37 +6685,34 @@ class MyStructFieldN28PatchStruct final { static constexpr bool __fbthrift_cpp2_gen_json = false; static const char* __fbthrift_thrift_uri(); static const folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); - static constexpr std::size_t __fbthrift_field_size_v = 6; + static constexpr std::size_t __fbthrift_field_size_v = 5; template using __fbthrift_id = folly::type_pack_element_t, ::apache::thrift::field_id<2>, - ::apache::thrift::field_id<3>, + ::apache::thrift::field_id<5>, ::apache::thrift::field_id<7>, - ::apache::thrift::field_id<8>, ::apache::thrift::field_id<9>>; template using __fbthrift_type_tag = folly::type_pack_element_t, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, ::apache::thrift::type::bool_t, - ::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>>, - ::apache::thrift::type::list<::apache::thrift::type::i16_t>, - ::apache::thrift::type::list<::apache::thrift::type::i16_t>, - ::apache::thrift::type::list<::apache::thrift::type::i16_t>>; + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, + ::apache::thrift::type::set<::apache::thrift::type::string_t>, + ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>>; template using __fbthrift_ident = folly::type_pack_element_t; + ::apache::thrift::ident::put>; struct __fbthrift_ordinal_impl { #if defined(_MSC_VER) || defined(__clang__) @@ -6396,40 +6721,35 @@ class MyStructFieldN28PatchStruct final { template<> static constexpr int value<::apache::thrift::ident::assign> = 1; template<> static constexpr int value<::apache::thrift::field_id<2>> = 2; template<> static constexpr int value<::apache::thrift::ident::clear> = 2; - template<> static constexpr int value<::apache::thrift::field_id<3>> = 3; - template<> static constexpr int value<::apache::thrift::ident::patch> = 3; + template<> static constexpr int value<::apache::thrift::field_id<5>> = 3; + template<> static constexpr int value<::apache::thrift::ident::add> = 3; template<> static constexpr int value<::apache::thrift::field_id<7>> = 4; template<> static constexpr int value<::apache::thrift::ident::remove> = 4; - template<> static constexpr int value<::apache::thrift::field_id<8>> = 5; - template<> static constexpr int value<::apache::thrift::ident::prepend> = 5; - template<> static constexpr int value<::apache::thrift::field_id<9>> = 6; - template<> static constexpr int value<::apache::thrift::ident::append> = 6; + template<> static constexpr int value<::apache::thrift::field_id<9>> = 5; + template<> static constexpr int value<::apache::thrift::ident::put> = 5; #else template static constexpr int value_impl(folly::tag_t) { return 0; } static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<1>>) { return 1; } static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::assign>) { return 1; } static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<2>>) { return 2; } static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::clear>) { return 2; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<3>>) { return 3; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::patch>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<5>>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::add>) { return 3; } static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<7>>) { return 4; } static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::remove>) { return 4; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<8>>) { return 5; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::prepend>) { return 5; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<9>>) { return 6; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::append>) { return 6; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<9>>) { return 5; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::put>) { return 5; } template static constexpr int value = value_impl(folly::tag_t{}); #endif }; struct __fbthrift_ordinal_impl_for_non_unique_type { template struct Impl { static constexpr int value = 0; }; - template struct Impl<::apache::thrift::type::list<::apache::thrift::type::i16_t>, T, std::enable_if_t> { static constexpr int value = 1; }; + template struct Impl<::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 1; }; template struct Impl<::apache::thrift::type::bool_t, T, std::enable_if_t> { static constexpr int value = 2; }; - template struct Impl<::apache::thrift::type::map<::apache::thrift::type::i32_t, ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>>, T, std::enable_if_t> { static constexpr int value = 3; }; - template struct Impl<::apache::thrift::type::list<::apache::thrift::type::i16_t>, T, std::enable_if_t> { static constexpr int value = 4; }; - template struct Impl<::apache::thrift::type::list<::apache::thrift::type::i16_t>, T, std::enable_if_t> { static constexpr int value = 5; }; - template struct Impl<::apache::thrift::type::list<::apache::thrift::type::i16_t>, T, std::enable_if_t> { static constexpr int value = 6; }; + template struct Impl<::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 3; }; + template struct Impl<::apache::thrift::type::set<::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 4; }; + template struct Impl<::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 5; }; template static constexpr int value = Impl::value; }; @@ -6446,85 +6766,83 @@ class MyStructFieldN28PatchStruct final { bool __fbthrift_is_empty() const; public: - using __fbthrift_cpp2_type = MyStructFieldN28PatchStruct; + using __fbthrift_cpp2_type = MyStructFieldN30PatchStruct; static constexpr bool __fbthrift_cpp2_is_union = false; public: - MyStructFieldN28PatchStruct(); + MyStructFieldN30PatchStruct(); // FragileConstructor for use in initialization lists only. [[deprecated("This constructor is deprecated")]] - MyStructFieldN28PatchStruct(apache::thrift::FragileConstructor, ::std::vector<::std::int16_t> assign__arg, bool clear__arg, ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch> patch__arg, ::std::vector<::std::int16_t> remove__arg, ::std::vector<::std::int16_t> prepend__arg, ::std::vector<::std::int16_t> append__arg); + MyStructFieldN30PatchStruct(apache::thrift::FragileConstructor, ::std::map<::std::string, ::std::string> assign__arg, bool clear__arg, ::std::map<::std::string, ::std::string> add__arg, ::std::unordered_set<::std::string> remove__arg, ::std::map<::std::string, ::std::string> put__arg); - MyStructFieldN28PatchStruct(MyStructFieldN28PatchStruct&&) noexcept; + MyStructFieldN30PatchStruct(MyStructFieldN30PatchStruct&&) noexcept; - MyStructFieldN28PatchStruct(const MyStructFieldN28PatchStruct& src); + MyStructFieldN30PatchStruct(const MyStructFieldN30PatchStruct& src); - MyStructFieldN28PatchStruct& operator=(MyStructFieldN28PatchStruct&&) noexcept; - MyStructFieldN28PatchStruct& operator=(const MyStructFieldN28PatchStruct& src); + MyStructFieldN30PatchStruct& operator=(MyStructFieldN30PatchStruct&&) noexcept; + MyStructFieldN30PatchStruct& operator=(const MyStructFieldN30PatchStruct& src); - ~MyStructFieldN28PatchStruct(); + ~MyStructFieldN30PatchStruct(); private: - ::std::vector<::std::int16_t> __fbthrift_field_assign; + ::std::map<::std::string, ::std::string> __fbthrift_field_assign; private: bool __fbthrift_field_clear; private: - ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch> __fbthrift_field_patch; - private: - ::std::vector<::std::int16_t> __fbthrift_field_remove; + ::std::map<::std::string, ::std::string> __fbthrift_field_add; private: - ::std::vector<::std::int16_t> __fbthrift_field_prepend; + ::std::unordered_set<::std::string> __fbthrift_field_remove; private: - ::std::vector<::std::int16_t> __fbthrift_field_append; + ::std::map<::std::string, ::std::string> __fbthrift_field_put; private: - apache::thrift::detail::isset_bitset<6, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; + apache::thrift::detail::isset_bitset<5, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: - bool operator==(const MyStructFieldN28PatchStruct&) const; - bool operator<(const MyStructFieldN28PatchStruct&) const; + bool operator==(const MyStructFieldN30PatchStruct&) const; + bool operator<(const MyStructFieldN30PatchStruct&) const; - template > + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const& { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template > + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const&& { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template > + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() & { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template > + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() && { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template > + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const& { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template > + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const&& { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } - template > + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() & { return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; } - template > + template > FOLLY_ERASE ::apache::thrift::optional_field_ref assign() && { return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; } @@ -6569,173 +6887,133 @@ class MyStructFieldN28PatchStruct final { return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref patch_ref() const& { - return {this->__fbthrift_field_patch, __isset.at(2), __isset.bit(2)}; - } + template > + FOLLY_ERASE ::apache::thrift::field_ref add_ref() const& { + return {this->__fbthrift_field_add, __isset.at(2), __isset.bit(2)}; + } - template > - FOLLY_ERASE ::apache::thrift::field_ref patch_ref() const&& { - return {static_cast(this->__fbthrift_field_patch), __isset.at(2), __isset.bit(2)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref add_ref() const&& { + return {static_cast(this->__fbthrift_field_add), __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref patch_ref() & { - return {this->__fbthrift_field_patch, __isset.at(2), __isset.bit(2)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref add_ref() & { + return {this->__fbthrift_field_add, __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref patch_ref() && { - return {static_cast(this->__fbthrift_field_patch), __isset.at(2), __isset.bit(2)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref add_ref() && { + return {static_cast(this->__fbthrift_field_add), __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref patch() const& { - return {this->__fbthrift_field_patch, __isset.at(2), __isset.bit(2)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref add() const& { + return {this->__fbthrift_field_add, __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref patch() const&& { - return {static_cast(this->__fbthrift_field_patch), __isset.at(2), __isset.bit(2)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref add() const&& { + return {static_cast(this->__fbthrift_field_add), __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref patch() & { - return {this->__fbthrift_field_patch, __isset.at(2), __isset.bit(2)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref add() & { + return {this->__fbthrift_field_add, __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref patch() && { - return {static_cast(this->__fbthrift_field_patch), __isset.at(2), __isset.bit(2)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref add() && { + return {static_cast(this->__fbthrift_field_add), __isset.at(2), __isset.bit(2)}; } - template > + template > FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const& { return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; } - template > + template > FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const&& { return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; } - template > + template > FOLLY_ERASE ::apache::thrift::field_ref remove_ref() & { return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; } - template > + template > FOLLY_ERASE ::apache::thrift::field_ref remove_ref() && { return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; } - template > + template > FOLLY_ERASE ::apache::thrift::field_ref remove() const& { return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; } - template > + template > FOLLY_ERASE ::apache::thrift::field_ref remove() const&& { return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; } - template > + template > FOLLY_ERASE ::apache::thrift::field_ref remove() & { return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; } - template > + template > FOLLY_ERASE ::apache::thrift::field_ref remove() && { return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref prepend_ref() const& { - return {this->__fbthrift_field_prepend, __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref prepend_ref() const&& { - return {static_cast(this->__fbthrift_field_prepend), __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref prepend_ref() & { - return {this->__fbthrift_field_prepend, __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref prepend_ref() && { - return {static_cast(this->__fbthrift_field_prepend), __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref prepend() const& { - return {this->__fbthrift_field_prepend, __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref prepend() const&& { - return {static_cast(this->__fbthrift_field_prepend), __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref prepend() & { - return {this->__fbthrift_field_prepend, __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref prepend() && { - return {static_cast(this->__fbthrift_field_prepend), __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref append_ref() const& { - return {this->__fbthrift_field_append, __isset.at(5), __isset.bit(5)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref put_ref() const& { + return {this->__fbthrift_field_put, __isset.at(4), __isset.bit(4)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref append_ref() const&& { - return {static_cast(this->__fbthrift_field_append), __isset.at(5), __isset.bit(5)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref put_ref() const&& { + return {static_cast(this->__fbthrift_field_put), __isset.at(4), __isset.bit(4)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref append_ref() & { - return {this->__fbthrift_field_append, __isset.at(5), __isset.bit(5)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref put_ref() & { + return {this->__fbthrift_field_put, __isset.at(4), __isset.bit(4)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref append_ref() && { - return {static_cast(this->__fbthrift_field_append), __isset.at(5), __isset.bit(5)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref put_ref() && { + return {static_cast(this->__fbthrift_field_put), __isset.at(4), __isset.bit(4)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref append() const& { - return {this->__fbthrift_field_append, __isset.at(5), __isset.bit(5)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref put() const& { + return {this->__fbthrift_field_put, __isset.at(4), __isset.bit(4)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref append() const&& { - return {static_cast(this->__fbthrift_field_append), __isset.at(5), __isset.bit(5)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref put() const&& { + return {static_cast(this->__fbthrift_field_put), __isset.at(4), __isset.bit(4)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref append() & { - return {this->__fbthrift_field_append, __isset.at(5), __isset.bit(5)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref put() & { + return {this->__fbthrift_field_put, __isset.at(4), __isset.bit(4)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref append() && { - return {static_cast(this->__fbthrift_field_append), __isset.at(5), __isset.bit(5)}; + template > + FOLLY_ERASE ::apache::thrift::field_ref put() && { + return {static_cast(this->__fbthrift_field_put), __isset.at(4), __isset.bit(4)}; } - const ::std::vector<::std::int16_t>* get_assign() const&; - ::std::vector<::std::int16_t>* get_assign() &; - ::std::vector<::std::int16_t>* get_assign() && = delete; + const ::std::map<::std::string, ::std::string>* get_assign() const&; + ::std::map<::std::string, ::std::string>* get_assign() &; + ::std::map<::std::string, ::std::string>* get_assign() && = delete; - template > + template > [[deprecated("Use `FOO.assign_ref() = BAR;` instead of `FOO.set_assign(BAR);`")]] - ::std::vector<::std::int16_t>& set_assign(T_MyStructFieldN28PatchStruct_assign_struct_setter&& assign_) { - assign_ref() = std::forward(assign_); + ::std::map<::std::string, ::std::string>& set_assign(T_MyStructFieldN30PatchStruct_assign_struct_setter&& assign_) { + assign_ref() = std::forward(assign_); return __fbthrift_field_assign; } @@ -6748,41 +7026,32 @@ class MyStructFieldN28PatchStruct final { clear_ref() = clear_; return __fbthrift_field_clear; } - const ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch>& get_patch() const&; - ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch> get_patch() &&; + const ::std::map<::std::string, ::std::string>& get_add() const&; + ::std::map<::std::string, ::std::string> get_add() &&; - template > - [[deprecated("Use `FOO.patch_ref() = BAR;` instead of `FOO.set_patch(BAR);`")]] - ::std::unordered_map<::std::int32_t, ::apache::thrift::op::I16Patch>& set_patch(T_MyStructFieldN28PatchStruct_patch_struct_setter&& patch_) { - patch_ref() = std::forward(patch_); - return __fbthrift_field_patch; + template > + [[deprecated("Use `FOO.add_ref() = BAR;` instead of `FOO.set_add(BAR);`")]] + ::std::map<::std::string, ::std::string>& set_add(T_MyStructFieldN30PatchStruct_add_struct_setter&& add_) { + add_ref() = std::forward(add_); + return __fbthrift_field_add; } - const ::std::vector<::std::int16_t>& get_remove() const&; - ::std::vector<::std::int16_t> get_remove() &&; + const ::std::unordered_set<::std::string>& get_remove() const&; + ::std::unordered_set<::std::string> get_remove() &&; - template > + template > [[deprecated("Use `FOO.remove_ref() = BAR;` instead of `FOO.set_remove(BAR);`")]] - ::std::vector<::std::int16_t>& set_remove(T_MyStructFieldN28PatchStruct_remove_struct_setter&& remove_) { - remove_ref() = std::forward(remove_); + ::std::unordered_set<::std::string>& set_remove(T_MyStructFieldN30PatchStruct_remove_struct_setter&& remove_) { + remove_ref() = std::forward(remove_); return __fbthrift_field_remove; } - const ::std::vector<::std::int16_t>& get_prepend() const&; - ::std::vector<::std::int16_t> get_prepend() &&; - - template > - [[deprecated("Use `FOO.prepend_ref() = BAR;` instead of `FOO.set_prepend(BAR);`")]] - ::std::vector<::std::int16_t>& set_prepend(T_MyStructFieldN28PatchStruct_prepend_struct_setter&& prepend_) { - prepend_ref() = std::forward(prepend_); - return __fbthrift_field_prepend; - } - const ::std::vector<::std::int16_t>& get_append() const&; - ::std::vector<::std::int16_t> get_append() &&; + const ::std::map<::std::string, ::std::string>& get_put() const&; + ::std::map<::std::string, ::std::string> get_put() &&; - template > - [[deprecated("Use `FOO.append_ref() = BAR;` instead of `FOO.set_append(BAR);`")]] - ::std::vector<::std::int16_t>& set_append(T_MyStructFieldN28PatchStruct_append_struct_setter&& append_) { - append_ref() = std::forward(append_); - return __fbthrift_field_append; + template > + [[deprecated("Use `FOO.put_ref() = BAR;` instead of `FOO.set_put(BAR);`")]] + ::std::map<::std::string, ::std::string>& set_put(T_MyStructFieldN30PatchStruct_put_struct_setter&& put_) { + put_ref() = std::forward(put_); + return __fbthrift_field_put; } template @@ -6798,21 +7067,21 @@ class MyStructFieldN28PatchStruct final { template void readNoXfer(Protocol_* iprot); - friend class ::apache::thrift::Cpp2Ops; - friend void swap(MyStructFieldN28PatchStruct& a, MyStructFieldN28PatchStruct& b); + friend class ::apache::thrift::Cpp2Ops; + friend void swap(MyStructFieldN30PatchStruct& a, MyStructFieldN30PatchStruct& b); }; template -unsigned long MyStructFieldN28PatchStruct::read(Protocol_* iprot) { +unsigned long MyStructFieldN30PatchStruct::read(Protocol_* iprot) { auto _xferStart = iprot->getCursorPosition(); readNoXfer(iprot); return iprot->getCursorPosition() - _xferStart; } -using MyStructFieldN28Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::ListPatchAdapter, ::test::fixtures::patch::MyStructFieldN28PatchStruct>; +using MyStructFieldN30Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::MapPatchAdapter, ::test::fixtures::patch::MyStructFieldN30PatchStruct>; -class MyStructFieldN29PatchStruct final { +class LateDefStructFieldPatchStruct final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template friend struct ::apache::thrift::detail::invoke_reffer; @@ -6821,63 +7090,31 @@ class MyStructFieldN29PatchStruct final { static constexpr bool __fbthrift_cpp2_gen_json = false; static const char* __fbthrift_thrift_uri(); static const folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); - static constexpr std::size_t __fbthrift_field_size_v = 4; + static constexpr std::size_t __fbthrift_field_size_v = 0; template using __fbthrift_id = folly::type_pack_element_t, - ::apache::thrift::field_id<2>, - ::apache::thrift::field_id<7>, - ::apache::thrift::field_id<8>>; + void>; template using __fbthrift_type_tag = folly::type_pack_element_t, - ::apache::thrift::type::bool_t, - ::apache::thrift::type::set<::apache::thrift::type::string_t>, - ::apache::thrift::type::set<::apache::thrift::type::string_t>>; + void>; template using __fbthrift_ident = folly::type_pack_element_t; + void>; struct __fbthrift_ordinal_impl { #if defined(_MSC_VER) || defined(__clang__) template static constexpr int value = 0; - template<> static constexpr int value<::apache::thrift::field_id<1>> = 1; - template<> static constexpr int value<::apache::thrift::ident::assign> = 1; - template<> static constexpr int value<::apache::thrift::field_id<2>> = 2; - template<> static constexpr int value<::apache::thrift::ident::clear> = 2; - template<> static constexpr int value<::apache::thrift::field_id<7>> = 3; - template<> static constexpr int value<::apache::thrift::ident::remove> = 3; - template<> static constexpr int value<::apache::thrift::field_id<8>> = 4; - template<> static constexpr int value<::apache::thrift::ident::add> = 4; #else template static constexpr int value_impl(folly::tag_t) { return 0; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<1>>) { return 1; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::assign>) { return 1; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<2>>) { return 2; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::clear>) { return 2; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<7>>) { return 3; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::remove>) { return 3; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<8>>) { return 4; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::add>) { return 4; } template static constexpr int value = value_impl(folly::tag_t{}); #endif }; struct __fbthrift_ordinal_impl_for_non_unique_type { template struct Impl { static constexpr int value = 0; }; - template struct Impl<::apache::thrift::type::set<::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 1; }; - template struct Impl<::apache::thrift::type::bool_t, T, std::enable_if_t> { static constexpr int value = 2; }; - template struct Impl<::apache::thrift::type::set<::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 3; }; - template struct Impl<::apache::thrift::type::set<::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 4; }; template static constexpr int value = Impl::value; }; @@ -6894,211 +7131,388 @@ class MyStructFieldN29PatchStruct final { bool __fbthrift_is_empty() const; public: - using __fbthrift_cpp2_type = MyStructFieldN29PatchStruct; + using __fbthrift_cpp2_type = LateDefStructFieldPatchStruct; static constexpr bool __fbthrift_cpp2_is_union = false; public: - MyStructFieldN29PatchStruct() : - __fbthrift_field_clear() { + LateDefStructFieldPatchStruct() { } // FragileConstructor for use in initialization lists only. [[deprecated("This constructor is deprecated")]] - MyStructFieldN29PatchStruct(apache::thrift::FragileConstructor, ::std::set<::std::string> assign__arg, bool clear__arg, ::std::set<::std::string> remove__arg, ::std::set<::std::string> add__arg); + LateDefStructFieldPatchStruct(apache::thrift::FragileConstructor); - MyStructFieldN29PatchStruct(MyStructFieldN29PatchStruct&&) noexcept; + LateDefStructFieldPatchStruct(LateDefStructFieldPatchStruct&&) = default; - MyStructFieldN29PatchStruct(const MyStructFieldN29PatchStruct& src); + LateDefStructFieldPatchStruct(const LateDefStructFieldPatchStruct&) = default; - MyStructFieldN29PatchStruct& operator=(MyStructFieldN29PatchStruct&&) noexcept; - MyStructFieldN29PatchStruct& operator=(const MyStructFieldN29PatchStruct& src); + LateDefStructFieldPatchStruct& operator=(LateDefStructFieldPatchStruct&&) = default; + + LateDefStructFieldPatchStruct& operator=(const LateDefStructFieldPatchStruct&) = default; + + public: + + bool operator==(const LateDefStructFieldPatchStruct&) const; + bool operator<(const LateDefStructFieldPatchStruct&) const; + + template + unsigned long read(Protocol_* iprot); + template + uint32_t serializedSize(Protocol_ const* prot_) const; + template + uint32_t serializedSizeZC(Protocol_ const* prot_) const; + template + uint32_t write(Protocol_* prot_) const; + private: - ::std::set<::std::string> __fbthrift_field_assign; + template + void readNoXfer(Protocol_* iprot); + + friend class ::apache::thrift::Cpp2Ops; + friend void swap(LateDefStructFieldPatchStruct& a, LateDefStructFieldPatchStruct& b); +}; + +template +unsigned long LateDefStructFieldPatchStruct::read(Protocol_* iprot) { + auto _xferStart = iprot->getCursorPosition(); + readNoXfer(iprot); + return iprot->getCursorPosition() - _xferStart; +} + +using LateDefStructFieldPatch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::FieldPatchAdapter, ::test::fixtures::patch::LateDefStructFieldPatchStruct>; + + +class LateDefStructPatchStruct final { + private: + friend struct ::apache::thrift::detail::st::struct_private_access; + template friend struct ::apache::thrift::detail::invoke_reffer; + + // used by a static_assert in the corresponding source + static constexpr bool __fbthrift_cpp2_gen_json = false; + static const char* __fbthrift_thrift_uri(); + static const folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); + static constexpr std::size_t __fbthrift_field_size_v = 5; + + template + using __fbthrift_id = folly::type_pack_element_t, + ::apache::thrift::field_id<2>, + ::apache::thrift::field_id<3>, + ::apache::thrift::field_id<5>, + ::apache::thrift::field_id<6>>; + + template + using __fbthrift_type_tag = folly::type_pack_element_t, + ::apache::thrift::type::bool_t, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::FieldPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructFieldPatchStruct>>, + ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStruct>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::FieldPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructFieldPatchStruct>>>; + + template + using __fbthrift_ident = folly::type_pack_element_t; + + struct __fbthrift_ordinal_impl { +#if defined(_MSC_VER) || defined(__clang__) + template static constexpr int value = 0; + template<> static constexpr int value<::apache::thrift::field_id<1>> = 1; + template<> static constexpr int value<::apache::thrift::ident::assign> = 1; + template<> static constexpr int value<::apache::thrift::field_id<2>> = 2; + template<> static constexpr int value<::apache::thrift::ident::clear> = 2; + template<> static constexpr int value<::apache::thrift::field_id<3>> = 3; + template<> static constexpr int value<::apache::thrift::ident::patchPrior> = 3; + template<> static constexpr int value<::apache::thrift::field_id<5>> = 4; + template<> static constexpr int value<::apache::thrift::ident::ensure> = 4; + template<> static constexpr int value<::apache::thrift::field_id<6>> = 5; + template<> static constexpr int value<::apache::thrift::ident::patch> = 5; +#else + template static constexpr int value_impl(folly::tag_t) { return 0; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<1>>) { return 1; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::assign>) { return 1; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<2>>) { return 2; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::clear>) { return 2; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<3>>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::patchPrior>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<5>>) { return 4; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::ensure>) { return 4; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<6>>) { return 5; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::patch>) { return 5; } + template static constexpr int value = value_impl(folly::tag_t{}); +#endif + }; + + struct __fbthrift_ordinal_impl_for_non_unique_type { + template struct Impl { static constexpr int value = 0; }; + template struct Impl<::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStruct>, T, std::enable_if_t> { static constexpr int value = 1; }; + template struct Impl<::apache::thrift::type::bool_t, T, std::enable_if_t> { static constexpr int value = 2; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::FieldPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructFieldPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 3; }; + template struct Impl<::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStruct>, T, std::enable_if_t> { static constexpr int value = 4; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::FieldPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructFieldPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 5; }; + + template static constexpr int value = Impl::value; + }; + + template using __fbthrift_ordinal = ::apache::thrift::field_ordinal< + std::conditional_t< + __fbthrift_ordinal_impl::value != 0, + __fbthrift_ordinal_impl, + __fbthrift_ordinal_impl_for_non_unique_type>::template value + >; + + void __fbthrift_clear(); + void __fbthrift_clear_terse_fields(); + bool __fbthrift_is_empty() const; + + public: + using __fbthrift_cpp2_type = LateDefStructPatchStruct; + static constexpr bool __fbthrift_cpp2_is_union = + false; + + + public: + + LateDefStructPatchStruct(); + + // FragileConstructor for use in initialization lists only. + [[deprecated("This constructor is deprecated")]] + LateDefStructPatchStruct(apache::thrift::FragileConstructor, ::apache::thrift::detail::boxed_value_ptr<::test::fixtures::patch::LateDefStruct> assign__arg, bool clear__arg, ::test::fixtures::patch::LateDefStructFieldPatch patchPrior__arg, ::test::fixtures::patch::LateDefStruct ensure__arg, ::test::fixtures::patch::LateDefStructFieldPatch patch__arg); + + LateDefStructPatchStruct(LateDefStructPatchStruct&&) noexcept; + LateDefStructPatchStruct(const LateDefStructPatchStruct& src); + + + LateDefStructPatchStruct& operator=(LateDefStructPatchStruct&&) noexcept; + LateDefStructPatchStruct& operator=(const LateDefStructPatchStruct& src); + + ~LateDefStructPatchStruct(); + + private: + ::apache::thrift::detail::boxed_value_ptr<::test::fixtures::patch::LateDefStruct> __fbthrift_field_assign; private: bool __fbthrift_field_clear; private: - ::std::set<::std::string> __fbthrift_field_remove; + ::test::fixtures::patch::LateDefStructFieldPatch __fbthrift_field_patchPrior; private: - ::std::set<::std::string> __fbthrift_field_add; + ::test::fixtures::patch::LateDefStruct __fbthrift_field_ensure; + private: + ::test::fixtures::patch::LateDefStructFieldPatch __fbthrift_field_patch; private: apache::thrift::detail::isset_bitset<4, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; public: - bool operator==(const MyStructFieldN29PatchStruct&) const; - bool operator<(const MyStructFieldN29PatchStruct&) const; + bool operator==(const LateDefStructPatchStruct&) const; + bool operator<(const LateDefStructPatchStruct&) const; - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const& { - return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; + template > + FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign_ref() const& { + return ::apache::thrift::optional_boxed_field_ref{this->__fbthrift_field_assign}; } - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const&& { - return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; + template > + FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign_ref() const&& { + return ::apache::thrift::optional_boxed_field_ref{static_cast(this->__fbthrift_field_assign)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() & { - return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; + template > + FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign_ref() & { + return ::apache::thrift::optional_boxed_field_ref{this->__fbthrift_field_assign}; } - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() && { - return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; + template > + FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign_ref() && { + return ::apache::thrift::optional_boxed_field_ref{static_cast(this->__fbthrift_field_assign)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const& { - return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; + template > + FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign() const& { + return ::apache::thrift::optional_boxed_field_ref{this->__fbthrift_field_assign}; } - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const&& { - return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; + template > + FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign() const&& { + return ::apache::thrift::optional_boxed_field_ref{static_cast(this->__fbthrift_field_assign)}; } - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign() & { - return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; + template > + FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign() & { + return ::apache::thrift::optional_boxed_field_ref{this->__fbthrift_field_assign}; } - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign() && { - return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; + template > + FOLLY_ERASE ::apache::thrift::optional_boxed_field_ref assign() && { + return ::apache::thrift::optional_boxed_field_ref{static_cast(this->__fbthrift_field_assign)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear_ref() const& { - return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; + return {this->__fbthrift_field_clear, __isset.at(0), __isset.bit(0)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear_ref() const&& { - return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; + return {static_cast(this->__fbthrift_field_clear), __isset.at(0), __isset.bit(0)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear_ref() & { - return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; + return {this->__fbthrift_field_clear, __isset.at(0), __isset.bit(0)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear_ref() && { - return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; + return {static_cast(this->__fbthrift_field_clear), __isset.at(0), __isset.bit(0)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear() const& { - return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; + return {this->__fbthrift_field_clear, __isset.at(0), __isset.bit(0)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear() const&& { - return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; + return {static_cast(this->__fbthrift_field_clear), __isset.at(0), __isset.bit(0)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear() & { - return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; + return {this->__fbthrift_field_clear, __isset.at(0), __isset.bit(0)}; } template FOLLY_ERASE ::apache::thrift::field_ref clear() && { - return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; + return {static_cast(this->__fbthrift_field_clear), __isset.at(0), __isset.bit(0)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const& { - return {this->__fbthrift_field_remove, __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref patchPrior_ref() const& { + return {this->__fbthrift_field_patchPrior, __isset.at(1), __isset.bit(1)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const&& { - return {static_cast(this->__fbthrift_field_remove), __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref patchPrior_ref() const&& { + return {static_cast(this->__fbthrift_field_patchPrior), __isset.at(1), __isset.bit(1)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref remove_ref() & { - return {this->__fbthrift_field_remove, __isset.at(2), __isset.bit(2)}; - } + template + FOLLY_ERASE ::apache::thrift::field_ref patchPrior_ref() & { + return {this->__fbthrift_field_patchPrior, __isset.at(1), __isset.bit(1)}; + } - template > - FOLLY_ERASE ::apache::thrift::field_ref remove_ref() && { - return {static_cast(this->__fbthrift_field_remove), __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref patchPrior_ref() && { + return {static_cast(this->__fbthrift_field_patchPrior), __isset.at(1), __isset.bit(1)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref remove() const& { - return {this->__fbthrift_field_remove, __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref patchPrior() const& { + return {this->__fbthrift_field_patchPrior, __isset.at(1), __isset.bit(1)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref remove() const&& { - return {static_cast(this->__fbthrift_field_remove), __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref patchPrior() const&& { + return {static_cast(this->__fbthrift_field_patchPrior), __isset.at(1), __isset.bit(1)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref remove() & { - return {this->__fbthrift_field_remove, __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref patchPrior() & { + return {this->__fbthrift_field_patchPrior, __isset.at(1), __isset.bit(1)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref remove() && { - return {static_cast(this->__fbthrift_field_remove), __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref patchPrior() && { + return {static_cast(this->__fbthrift_field_patchPrior), __isset.at(1), __isset.bit(1)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref add_ref() const& { - return {this->__fbthrift_field_add, __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref ensure_ref() const& { + return {this->__fbthrift_field_ensure, __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref add_ref() const&& { - return {static_cast(this->__fbthrift_field_add), __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref ensure_ref() const&& { + return {static_cast(this->__fbthrift_field_ensure), __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref add_ref() & { - return {this->__fbthrift_field_add, __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref ensure_ref() & { + return {this->__fbthrift_field_ensure, __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref add_ref() && { - return {static_cast(this->__fbthrift_field_add), __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref ensure_ref() && { + return {static_cast(this->__fbthrift_field_ensure), __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref add() const& { - return {this->__fbthrift_field_add, __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref ensure() const& { + return {this->__fbthrift_field_ensure, __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref add() const&& { - return {static_cast(this->__fbthrift_field_add), __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref ensure() const&& { + return {static_cast(this->__fbthrift_field_ensure), __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref add() & { - return {this->__fbthrift_field_add, __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref ensure() & { + return {this->__fbthrift_field_ensure, __isset.at(2), __isset.bit(2)}; } - template > - FOLLY_ERASE ::apache::thrift::field_ref add() && { - return {static_cast(this->__fbthrift_field_add), __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref ensure() && { + return {static_cast(this->__fbthrift_field_ensure), __isset.at(2), __isset.bit(2)}; } - const ::std::set<::std::string>* get_assign() const&; - ::std::set<::std::string>* get_assign() &; - ::std::set<::std::string>* get_assign() && = delete; - template > - [[deprecated("Use `FOO.assign_ref() = BAR;` instead of `FOO.set_assign(BAR);`")]] - ::std::set<::std::string>& set_assign(T_MyStructFieldN29PatchStruct_assign_struct_setter&& assign_) { - assign_ref() = std::forward(assign_); - return __fbthrift_field_assign; + template + FOLLY_ERASE ::apache::thrift::field_ref patch_ref() const& { + return {this->__fbthrift_field_patch, __isset.at(3), __isset.bit(3)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref patch_ref() const&& { + return {static_cast(this->__fbthrift_field_patch), __isset.at(3), __isset.bit(3)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref patch_ref() & { + return {this->__fbthrift_field_patch, __isset.at(3), __isset.bit(3)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref patch_ref() && { + return {static_cast(this->__fbthrift_field_patch), __isset.at(3), __isset.bit(3)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref patch() const& { + return {this->__fbthrift_field_patch, __isset.at(3), __isset.bit(3)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref patch() const&& { + return {static_cast(this->__fbthrift_field_patch), __isset.at(3), __isset.bit(3)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref patch() & { + return {this->__fbthrift_field_patch, __isset.at(3), __isset.bit(3)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref patch() && { + return {static_cast(this->__fbthrift_field_patch), __isset.at(3), __isset.bit(3)}; } bool get_clear() const { @@ -7110,23 +7524,14 @@ class MyStructFieldN29PatchStruct final { clear_ref() = clear_; return __fbthrift_field_clear; } - const ::std::set<::std::string>& get_remove() const&; - ::std::set<::std::string> get_remove() &&; - - template > - [[deprecated("Use `FOO.remove_ref() = BAR;` instead of `FOO.set_remove(BAR);`")]] - ::std::set<::std::string>& set_remove(T_MyStructFieldN29PatchStruct_remove_struct_setter&& remove_) { - remove_ref() = std::forward(remove_); - return __fbthrift_field_remove; - } - const ::std::set<::std::string>& get_add() const&; - ::std::set<::std::string> get_add() &&; + const ::test::fixtures::patch::LateDefStruct& get_ensure() const&; + ::test::fixtures::patch::LateDefStruct get_ensure() &&; - template > - [[deprecated("Use `FOO.add_ref() = BAR;` instead of `FOO.set_add(BAR);`")]] - ::std::set<::std::string>& set_add(T_MyStructFieldN29PatchStruct_add_struct_setter&& add_) { - add_ref() = std::forward(add_); - return __fbthrift_field_add; + template + [[deprecated("Use `FOO.ensure_ref() = BAR;` instead of `FOO.set_ensure(BAR);`")]] + ::test::fixtures::patch::LateDefStruct& set_ensure(T_LateDefStructPatchStruct_ensure_struct_setter&& ensure_) { + ensure_ref() = std::forward(ensure_); + return __fbthrift_field_ensure; } template @@ -7142,21 +7547,21 @@ class MyStructFieldN29PatchStruct final { template void readNoXfer(Protocol_* iprot); - friend class ::apache::thrift::Cpp2Ops; - friend void swap(MyStructFieldN29PatchStruct& a, MyStructFieldN29PatchStruct& b); + friend class ::apache::thrift::Cpp2Ops; + friend void swap(LateDefStructPatchStruct& a, LateDefStructPatchStruct& b); }; template -unsigned long MyStructFieldN29PatchStruct::read(Protocol_* iprot) { +unsigned long LateDefStructPatchStruct::read(Protocol_* iprot) { auto _xferStart = iprot->getCursorPosition(); readNoXfer(iprot); return iprot->getCursorPosition() - _xferStart; } -using MyStructFieldN29Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::SetPatchAdapter, ::test::fixtures::patch::MyStructFieldN29PatchStruct>; +using LateDefStructPatch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::StructPatchAdapter, ::test::fixtures::patch::LateDefStructPatchStruct>; -class MyStructFieldN30PatchStruct final { +class MyStructFieldPatchStruct final { private: friend struct ::apache::thrift::detail::st::struct_private_access; template friend struct ::apache::thrift::detail::invoke_reffer; @@ -7165,676 +7570,271 @@ class MyStructFieldN30PatchStruct final { static constexpr bool __fbthrift_cpp2_gen_json = false; static const char* __fbthrift_thrift_uri(); static const folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); - static constexpr std::size_t __fbthrift_field_size_v = 5; + static constexpr std::size_t __fbthrift_field_size_v = 30; template using __fbthrift_id = folly::type_pack_element_t, - ::apache::thrift::field_id<2>, - ::apache::thrift::field_id<5>, - ::apache::thrift::field_id<7>, - ::apache::thrift::field_id<9>>; + ::apache::thrift::field_id<-30>, + ::apache::thrift::field_id<-29>, + ::apache::thrift::field_id<-28>, + ::apache::thrift::field_id<-27>, + ::apache::thrift::field_id<-26>, + ::apache::thrift::field_id<-25>, + ::apache::thrift::field_id<-24>, + ::apache::thrift::field_id<-23>, + ::apache::thrift::field_id<-22>, + ::apache::thrift::field_id<-21>, + ::apache::thrift::field_id<-20>, + ::apache::thrift::field_id<-19>, + ::apache::thrift::field_id<-18>, + ::apache::thrift::field_id<-17>, + ::apache::thrift::field_id<-16>, + ::apache::thrift::field_id<-15>, + ::apache::thrift::field_id<-14>, + ::apache::thrift::field_id<-13>, + ::apache::thrift::field_id<-12>, + ::apache::thrift::field_id<-11>, + ::apache::thrift::field_id<-10>, + ::apache::thrift::field_id<-9>, + ::apache::thrift::field_id<-8>, + ::apache::thrift::field_id<-7>, + ::apache::thrift::field_id<-6>, + ::apache::thrift::field_id<-5>, + ::apache::thrift::field_id<-4>, + ::apache::thrift::field_id<-3>, + ::apache::thrift::field_id<-2>, + ::apache::thrift::field_id<-1>>; template using __fbthrift_type_tag = folly::type_pack_element_t, - ::apache::thrift::type::bool_t, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, - ::apache::thrift::type::set<::apache::thrift::type::string_t>, - ::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>>; + ::apache::thrift::type::adapted<::apache::thrift::op::detail::MapPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN30PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::SetPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN29PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::ListPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN28PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyDataPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN25PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::BinaryPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BinaryPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::StringPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::StringPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DoublePatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::FloatPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I64PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I32PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BytePatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::BoolPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BoolPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::TimeStructPatch>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DurationStructPatch>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::UnionPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyUnionPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyDataPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN10PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::BinaryPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BinaryPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::StringPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::StringPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DoublePatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::FloatPatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I64PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I32PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BytePatchStruct>>, + ::apache::thrift::type::adapted<::apache::thrift::op::detail::BoolPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BoolPatchStruct>>>; template using __fbthrift_ident = folly::type_pack_element_t; - - struct __fbthrift_ordinal_impl { -#if defined(_MSC_VER) || defined(__clang__) - template static constexpr int value = 0; - template<> static constexpr int value<::apache::thrift::field_id<1>> = 1; - template<> static constexpr int value<::apache::thrift::ident::assign> = 1; - template<> static constexpr int value<::apache::thrift::field_id<2>> = 2; - template<> static constexpr int value<::apache::thrift::ident::clear> = 2; - template<> static constexpr int value<::apache::thrift::field_id<5>> = 3; - template<> static constexpr int value<::apache::thrift::ident::add> = 3; - template<> static constexpr int value<::apache::thrift::field_id<7>> = 4; - template<> static constexpr int value<::apache::thrift::ident::remove> = 4; - template<> static constexpr int value<::apache::thrift::field_id<9>> = 5; - template<> static constexpr int value<::apache::thrift::ident::put> = 5; -#else - template static constexpr int value_impl(folly::tag_t) { return 0; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<1>>) { return 1; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::assign>) { return 1; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<2>>) { return 2; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::clear>) { return 2; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<5>>) { return 3; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::add>) { return 3; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<7>>) { return 4; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::remove>) { return 4; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<9>>) { return 5; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::put>) { return 5; } - template static constexpr int value = value_impl(folly::tag_t{}); -#endif - }; - - struct __fbthrift_ordinal_impl_for_non_unique_type { - template struct Impl { static constexpr int value = 0; }; - template struct Impl<::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 1; }; - template struct Impl<::apache::thrift::type::bool_t, T, std::enable_if_t> { static constexpr int value = 2; }; - template struct Impl<::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 3; }; - template struct Impl<::apache::thrift::type::set<::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 4; }; - template struct Impl<::apache::thrift::type::map<::apache::thrift::type::string_t, ::apache::thrift::type::string_t>, T, std::enable_if_t> { static constexpr int value = 5; }; - - template static constexpr int value = Impl::value; - }; - - template using __fbthrift_ordinal = ::apache::thrift::field_ordinal< - std::conditional_t< - __fbthrift_ordinal_impl::value != 0, - __fbthrift_ordinal_impl, - __fbthrift_ordinal_impl_for_non_unique_type>::template value - >; - - void __fbthrift_clear(); - void __fbthrift_clear_terse_fields(); - bool __fbthrift_is_empty() const; - - public: - using __fbthrift_cpp2_type = MyStructFieldN30PatchStruct; - static constexpr bool __fbthrift_cpp2_is_union = - false; - - - public: - - MyStructFieldN30PatchStruct(); - - // FragileConstructor for use in initialization lists only. - [[deprecated("This constructor is deprecated")]] - MyStructFieldN30PatchStruct(apache::thrift::FragileConstructor, ::std::map<::std::string, ::std::string> assign__arg, bool clear__arg, ::std::map<::std::string, ::std::string> add__arg, ::std::unordered_set<::std::string> remove__arg, ::std::map<::std::string, ::std::string> put__arg); - - MyStructFieldN30PatchStruct(MyStructFieldN30PatchStruct&&) noexcept; - - MyStructFieldN30PatchStruct(const MyStructFieldN30PatchStruct& src); - - - MyStructFieldN30PatchStruct& operator=(MyStructFieldN30PatchStruct&&) noexcept; - MyStructFieldN30PatchStruct& operator=(const MyStructFieldN30PatchStruct& src); - - ~MyStructFieldN30PatchStruct(); - - private: - ::std::map<::std::string, ::std::string> __fbthrift_field_assign; - private: - bool __fbthrift_field_clear; - private: - ::std::map<::std::string, ::std::string> __fbthrift_field_add; - private: - ::std::unordered_set<::std::string> __fbthrift_field_remove; - private: - ::std::map<::std::string, ::std::string> __fbthrift_field_put; - private: - apache::thrift::detail::isset_bitset<5, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; - - public: - - bool operator==(const MyStructFieldN30PatchStruct&) const; - bool operator<(const MyStructFieldN30PatchStruct&) const; - - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const& { - return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; - } - - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() const&& { - return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; - } - - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() & { - return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; - } - - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign_ref() && { - return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; - } - - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const& { - return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; - } - - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign() const&& { - return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; - } - - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign() & { - return {this->__fbthrift_field_assign, __isset.at(0), __isset.bit(0)}; - } - - template > - FOLLY_ERASE ::apache::thrift::optional_field_ref assign() && { - return {static_cast(this->__fbthrift_field_assign), __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref clear_ref() const& { - return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref clear_ref() const&& { - return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref clear_ref() & { - return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref clear_ref() && { - return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref clear() const& { - return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref clear() const&& { - return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref clear() & { - return {this->__fbthrift_field_clear, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref clear() && { - return {static_cast(this->__fbthrift_field_clear), __isset.at(1), __isset.bit(1)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref add_ref() const& { - return {this->__fbthrift_field_add, __isset.at(2), __isset.bit(2)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref add_ref() const&& { - return {static_cast(this->__fbthrift_field_add), __isset.at(2), __isset.bit(2)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref add_ref() & { - return {this->__fbthrift_field_add, __isset.at(2), __isset.bit(2)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref add_ref() && { - return {static_cast(this->__fbthrift_field_add), __isset.at(2), __isset.bit(2)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref add() const& { - return {this->__fbthrift_field_add, __isset.at(2), __isset.bit(2)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref add() const&& { - return {static_cast(this->__fbthrift_field_add), __isset.at(2), __isset.bit(2)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref add() & { - return {this->__fbthrift_field_add, __isset.at(2), __isset.bit(2)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref add() && { - return {static_cast(this->__fbthrift_field_add), __isset.at(2), __isset.bit(2)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const& { - return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref remove_ref() const&& { - return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref remove_ref() & { - return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref remove_ref() && { - return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref remove() const& { - return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref remove() const&& { - return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref remove() & { - return {this->__fbthrift_field_remove, __isset.at(3), __isset.bit(3)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref remove() && { - return {static_cast(this->__fbthrift_field_remove), __isset.at(3), __isset.bit(3)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref put_ref() const& { - return {this->__fbthrift_field_put, __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref put_ref() const&& { - return {static_cast(this->__fbthrift_field_put), __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref put_ref() & { - return {this->__fbthrift_field_put, __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref put_ref() && { - return {static_cast(this->__fbthrift_field_put), __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref put() const& { - return {this->__fbthrift_field_put, __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref put() const&& { - return {static_cast(this->__fbthrift_field_put), __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref put() & { - return {this->__fbthrift_field_put, __isset.at(4), __isset.bit(4)}; - } - - template > - FOLLY_ERASE ::apache::thrift::field_ref put() && { - return {static_cast(this->__fbthrift_field_put), __isset.at(4), __isset.bit(4)}; - } - const ::std::map<::std::string, ::std::string>* get_assign() const&; - ::std::map<::std::string, ::std::string>* get_assign() &; - ::std::map<::std::string, ::std::string>* get_assign() && = delete; - - template > - [[deprecated("Use `FOO.assign_ref() = BAR;` instead of `FOO.set_assign(BAR);`")]] - ::std::map<::std::string, ::std::string>& set_assign(T_MyStructFieldN30PatchStruct_assign_struct_setter&& assign_) { - assign_ref() = std::forward(assign_); - return __fbthrift_field_assign; - } - - bool get_clear() const { - return __fbthrift_field_clear; - } - - [[deprecated("Use `FOO.clear_ref() = BAR;` instead of `FOO.set_clear(BAR);`")]] - bool& set_clear(bool clear_) { - clear_ref() = clear_; - return __fbthrift_field_clear; - } - const ::std::map<::std::string, ::std::string>& get_add() const&; - ::std::map<::std::string, ::std::string> get_add() &&; - - template > - [[deprecated("Use `FOO.add_ref() = BAR;` instead of `FOO.set_add(BAR);`")]] - ::std::map<::std::string, ::std::string>& set_add(T_MyStructFieldN30PatchStruct_add_struct_setter&& add_) { - add_ref() = std::forward(add_); - return __fbthrift_field_add; - } - const ::std::unordered_set<::std::string>& get_remove() const&; - ::std::unordered_set<::std::string> get_remove() &&; - - template > - [[deprecated("Use `FOO.remove_ref() = BAR;` instead of `FOO.set_remove(BAR);`")]] - ::std::unordered_set<::std::string>& set_remove(T_MyStructFieldN30PatchStruct_remove_struct_setter&& remove_) { - remove_ref() = std::forward(remove_); - return __fbthrift_field_remove; - } - const ::std::map<::std::string, ::std::string>& get_put() const&; - ::std::map<::std::string, ::std::string> get_put() &&; - - template > - [[deprecated("Use `FOO.put_ref() = BAR;` instead of `FOO.set_put(BAR);`")]] - ::std::map<::std::string, ::std::string>& set_put(T_MyStructFieldN30PatchStruct_put_struct_setter&& put_) { - put_ref() = std::forward(put_); - return __fbthrift_field_put; - } - - template - unsigned long read(Protocol_* iprot); - template - uint32_t serializedSize(Protocol_ const* prot_) const; - template - uint32_t serializedSizeZC(Protocol_ const* prot_) const; - template - uint32_t write(Protocol_* prot_) const; - - private: - template - void readNoXfer(Protocol_* iprot); - - friend class ::apache::thrift::Cpp2Ops; - friend void swap(MyStructFieldN30PatchStruct& a, MyStructFieldN30PatchStruct& b); -}; - -template -unsigned long MyStructFieldN30PatchStruct::read(Protocol_* iprot) { - auto _xferStart = iprot->getCursorPosition(); - readNoXfer(iprot); - return iprot->getCursorPosition() - _xferStart; -} - -using MyStructFieldN30Patch = ::apache::thrift::adapt_detail::adapted_t<::apache::thrift::op::detail::MapPatchAdapter, ::test::fixtures::patch::MyStructFieldN30PatchStruct>; - - -class MyStructFieldPatchStruct final { - private: - friend struct ::apache::thrift::detail::st::struct_private_access; - template friend struct ::apache::thrift::detail::invoke_reffer; - - // used by a static_assert in the corresponding source - static constexpr bool __fbthrift_cpp2_gen_json = false; - static const char* __fbthrift_thrift_uri(); - static const folly::StringPiece __fbthrift_get_field_name(::apache::thrift::FieldOrdinal ord); - static constexpr std::size_t __fbthrift_field_size_v = 30; - - template - using __fbthrift_id = folly::type_pack_element_t, - ::apache::thrift::field_id<-2>, - ::apache::thrift::field_id<-3>, - ::apache::thrift::field_id<-4>, - ::apache::thrift::field_id<-5>, - ::apache::thrift::field_id<-6>, - ::apache::thrift::field_id<-7>, - ::apache::thrift::field_id<-8>, - ::apache::thrift::field_id<-9>, - ::apache::thrift::field_id<-10>, - ::apache::thrift::field_id<-11>, - ::apache::thrift::field_id<-12>, - ::apache::thrift::field_id<-13>, - ::apache::thrift::field_id<-14>, - ::apache::thrift::field_id<-15>, - ::apache::thrift::field_id<-16>, - ::apache::thrift::field_id<-17>, - ::apache::thrift::field_id<-18>, - ::apache::thrift::field_id<-19>, - ::apache::thrift::field_id<-20>, - ::apache::thrift::field_id<-21>, - ::apache::thrift::field_id<-22>, - ::apache::thrift::field_id<-23>, - ::apache::thrift::field_id<-24>, - ::apache::thrift::field_id<-25>, - ::apache::thrift::field_id<-26>, - ::apache::thrift::field_id<-27>, - ::apache::thrift::field_id<-28>, - ::apache::thrift::field_id<-29>, - ::apache::thrift::field_id<-30>>; - - template - using __fbthrift_type_tag = folly::type_pack_element_t>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BytePatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I32PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I64PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::FloatPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DoublePatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::StringPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::StringPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::BinaryPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BinaryPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN10PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyDataPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::UnionPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyUnionPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DurationStructPatch>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::TimeStructPatch>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::BoolPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BoolPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BytePatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I32PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I64PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::FloatPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DoublePatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::StringPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::StringPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::BinaryPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BinaryPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN25PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyDataPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructPatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::ListPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN28PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::SetPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN29PatchStruct>>, - ::apache::thrift::type::adapted<::apache::thrift::op::detail::MapPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN30PatchStruct>>>; - - template - using __fbthrift_ident = folly::type_pack_element_t; + ::apache::thrift::ident::optListVal, + ::apache::thrift::ident::optLateStructVal, + ::apache::thrift::ident::optStructVal, + ::apache::thrift::ident::optEnumVal, + ::apache::thrift::ident::optBinaryVal, + ::apache::thrift::ident::optStringVal, + ::apache::thrift::ident::optDoubleVal, + ::apache::thrift::ident::optFloatVal, + ::apache::thrift::ident::optI64Val, + ::apache::thrift::ident::optI32Val, + ::apache::thrift::ident::optI16Val, + ::apache::thrift::ident::optByteVal, + ::apache::thrift::ident::optBoolVal, + ::apache::thrift::ident::timeVal, + ::apache::thrift::ident::durationVal, + ::apache::thrift::ident::lateStructVal, + ::apache::thrift::ident::unionVal, + ::apache::thrift::ident::structVal, + ::apache::thrift::ident::enumVal, + ::apache::thrift::ident::binaryVal, + ::apache::thrift::ident::stringVal, + ::apache::thrift::ident::doubleVal, + ::apache::thrift::ident::floatVal, + ::apache::thrift::ident::i64Val, + ::apache::thrift::ident::i32Val, + ::apache::thrift::ident::i16Val, + ::apache::thrift::ident::byteVal, + ::apache::thrift::ident::boolVal>; struct __fbthrift_ordinal_impl { #if defined(_MSC_VER) || defined(__clang__) template static constexpr int value = 0; - template<> static constexpr int value<::apache::thrift::field_id<-1>> = 1; - template<> static constexpr int value<::apache::thrift::ident::boolVal> = 1; - template<> static constexpr int value<::apache::thrift::field_id<-2>> = 2; - template<> static constexpr int value<::apache::thrift::ident::byteVal> = 2; - template<> static constexpr int value<::apache::thrift::field_id<-3>> = 3; - template<> static constexpr int value<::apache::thrift::ident::i16Val> = 3; - template<> static constexpr int value<::apache::thrift::field_id<-4>> = 4; - template<> static constexpr int value<::apache::thrift::ident::i32Val> = 4; - template<> static constexpr int value<::apache::thrift::field_id<-5>> = 5; - template<> static constexpr int value<::apache::thrift::ident::i64Val> = 5; - template<> static constexpr int value<::apache::thrift::field_id<-6>> = 6; - template<> static constexpr int value<::apache::thrift::ident::floatVal> = 6; - template<> static constexpr int value<::apache::thrift::field_id<-7>> = 7; - template<> static constexpr int value<::apache::thrift::ident::doubleVal> = 7; - template<> static constexpr int value<::apache::thrift::field_id<-8>> = 8; - template<> static constexpr int value<::apache::thrift::ident::stringVal> = 8; - template<> static constexpr int value<::apache::thrift::field_id<-9>> = 9; - template<> static constexpr int value<::apache::thrift::ident::binaryVal> = 9; - template<> static constexpr int value<::apache::thrift::field_id<-10>> = 10; - template<> static constexpr int value<::apache::thrift::ident::enumVal> = 10; - template<> static constexpr int value<::apache::thrift::field_id<-11>> = 11; - template<> static constexpr int value<::apache::thrift::ident::structVal> = 11; - template<> static constexpr int value<::apache::thrift::field_id<-12>> = 12; - template<> static constexpr int value<::apache::thrift::ident::unionVal> = 12; - template<> static constexpr int value<::apache::thrift::field_id<-13>> = 13; - template<> static constexpr int value<::apache::thrift::ident::lateStructVal> = 13; - template<> static constexpr int value<::apache::thrift::field_id<-14>> = 14; - template<> static constexpr int value<::apache::thrift::ident::durationVal> = 14; - template<> static constexpr int value<::apache::thrift::field_id<-15>> = 15; - template<> static constexpr int value<::apache::thrift::ident::timeVal> = 15; - template<> static constexpr int value<::apache::thrift::field_id<-16>> = 16; - template<> static constexpr int value<::apache::thrift::ident::optBoolVal> = 16; - template<> static constexpr int value<::apache::thrift::field_id<-17>> = 17; - template<> static constexpr int value<::apache::thrift::ident::optByteVal> = 17; - template<> static constexpr int value<::apache::thrift::field_id<-18>> = 18; - template<> static constexpr int value<::apache::thrift::ident::optI16Val> = 18; - template<> static constexpr int value<::apache::thrift::field_id<-19>> = 19; - template<> static constexpr int value<::apache::thrift::ident::optI32Val> = 19; - template<> static constexpr int value<::apache::thrift::field_id<-20>> = 20; - template<> static constexpr int value<::apache::thrift::ident::optI64Val> = 20; - template<> static constexpr int value<::apache::thrift::field_id<-21>> = 21; - template<> static constexpr int value<::apache::thrift::ident::optFloatVal> = 21; - template<> static constexpr int value<::apache::thrift::field_id<-22>> = 22; - template<> static constexpr int value<::apache::thrift::ident::optDoubleVal> = 22; - template<> static constexpr int value<::apache::thrift::field_id<-23>> = 23; - template<> static constexpr int value<::apache::thrift::ident::optStringVal> = 23; - template<> static constexpr int value<::apache::thrift::field_id<-24>> = 24; - template<> static constexpr int value<::apache::thrift::ident::optBinaryVal> = 24; - template<> static constexpr int value<::apache::thrift::field_id<-25>> = 25; - template<> static constexpr int value<::apache::thrift::ident::optEnumVal> = 25; - template<> static constexpr int value<::apache::thrift::field_id<-26>> = 26; - template<> static constexpr int value<::apache::thrift::ident::optStructVal> = 26; - template<> static constexpr int value<::apache::thrift::field_id<-27>> = 27; - template<> static constexpr int value<::apache::thrift::ident::optLateStructVal> = 27; - template<> static constexpr int value<::apache::thrift::field_id<-28>> = 28; - template<> static constexpr int value<::apache::thrift::ident::optListVal> = 28; - template<> static constexpr int value<::apache::thrift::field_id<-29>> = 29; - template<> static constexpr int value<::apache::thrift::ident::optSetVal> = 29; - template<> static constexpr int value<::apache::thrift::field_id<-30>> = 30; - template<> static constexpr int value<::apache::thrift::ident::optMapVal> = 30; + template<> static constexpr int value<::apache::thrift::field_id<-30>> = 1; + template<> static constexpr int value<::apache::thrift::ident::optMapVal> = 1; + template<> static constexpr int value<::apache::thrift::field_id<-29>> = 2; + template<> static constexpr int value<::apache::thrift::ident::optSetVal> = 2; + template<> static constexpr int value<::apache::thrift::field_id<-28>> = 3; + template<> static constexpr int value<::apache::thrift::ident::optListVal> = 3; + template<> static constexpr int value<::apache::thrift::field_id<-27>> = 4; + template<> static constexpr int value<::apache::thrift::ident::optLateStructVal> = 4; + template<> static constexpr int value<::apache::thrift::field_id<-26>> = 5; + template<> static constexpr int value<::apache::thrift::ident::optStructVal> = 5; + template<> static constexpr int value<::apache::thrift::field_id<-25>> = 6; + template<> static constexpr int value<::apache::thrift::ident::optEnumVal> = 6; + template<> static constexpr int value<::apache::thrift::field_id<-24>> = 7; + template<> static constexpr int value<::apache::thrift::ident::optBinaryVal> = 7; + template<> static constexpr int value<::apache::thrift::field_id<-23>> = 8; + template<> static constexpr int value<::apache::thrift::ident::optStringVal> = 8; + template<> static constexpr int value<::apache::thrift::field_id<-22>> = 9; + template<> static constexpr int value<::apache::thrift::ident::optDoubleVal> = 9; + template<> static constexpr int value<::apache::thrift::field_id<-21>> = 10; + template<> static constexpr int value<::apache::thrift::ident::optFloatVal> = 10; + template<> static constexpr int value<::apache::thrift::field_id<-20>> = 11; + template<> static constexpr int value<::apache::thrift::ident::optI64Val> = 11; + template<> static constexpr int value<::apache::thrift::field_id<-19>> = 12; + template<> static constexpr int value<::apache::thrift::ident::optI32Val> = 12; + template<> static constexpr int value<::apache::thrift::field_id<-18>> = 13; + template<> static constexpr int value<::apache::thrift::ident::optI16Val> = 13; + template<> static constexpr int value<::apache::thrift::field_id<-17>> = 14; + template<> static constexpr int value<::apache::thrift::ident::optByteVal> = 14; + template<> static constexpr int value<::apache::thrift::field_id<-16>> = 15; + template<> static constexpr int value<::apache::thrift::ident::optBoolVal> = 15; + template<> static constexpr int value<::apache::thrift::field_id<-15>> = 16; + template<> static constexpr int value<::apache::thrift::ident::timeVal> = 16; + template<> static constexpr int value<::apache::thrift::field_id<-14>> = 17; + template<> static constexpr int value<::apache::thrift::ident::durationVal> = 17; + template<> static constexpr int value<::apache::thrift::field_id<-13>> = 18; + template<> static constexpr int value<::apache::thrift::ident::lateStructVal> = 18; + template<> static constexpr int value<::apache::thrift::field_id<-12>> = 19; + template<> static constexpr int value<::apache::thrift::ident::unionVal> = 19; + template<> static constexpr int value<::apache::thrift::field_id<-11>> = 20; + template<> static constexpr int value<::apache::thrift::ident::structVal> = 20; + template<> static constexpr int value<::apache::thrift::field_id<-10>> = 21; + template<> static constexpr int value<::apache::thrift::ident::enumVal> = 21; + template<> static constexpr int value<::apache::thrift::field_id<-9>> = 22; + template<> static constexpr int value<::apache::thrift::ident::binaryVal> = 22; + template<> static constexpr int value<::apache::thrift::field_id<-8>> = 23; + template<> static constexpr int value<::apache::thrift::ident::stringVal> = 23; + template<> static constexpr int value<::apache::thrift::field_id<-7>> = 24; + template<> static constexpr int value<::apache::thrift::ident::doubleVal> = 24; + template<> static constexpr int value<::apache::thrift::field_id<-6>> = 25; + template<> static constexpr int value<::apache::thrift::ident::floatVal> = 25; + template<> static constexpr int value<::apache::thrift::field_id<-5>> = 26; + template<> static constexpr int value<::apache::thrift::ident::i64Val> = 26; + template<> static constexpr int value<::apache::thrift::field_id<-4>> = 27; + template<> static constexpr int value<::apache::thrift::ident::i32Val> = 27; + template<> static constexpr int value<::apache::thrift::field_id<-3>> = 28; + template<> static constexpr int value<::apache::thrift::ident::i16Val> = 28; + template<> static constexpr int value<::apache::thrift::field_id<-2>> = 29; + template<> static constexpr int value<::apache::thrift::ident::byteVal> = 29; + template<> static constexpr int value<::apache::thrift::field_id<-1>> = 30; + template<> static constexpr int value<::apache::thrift::ident::boolVal> = 30; #else template static constexpr int value_impl(folly::tag_t) { return 0; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-1>>) { return 1; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::boolVal>) { return 1; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-2>>) { return 2; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::byteVal>) { return 2; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-3>>) { return 3; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::i16Val>) { return 3; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-4>>) { return 4; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::i32Val>) { return 4; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-5>>) { return 5; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::i64Val>) { return 5; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-6>>) { return 6; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::floatVal>) { return 6; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-7>>) { return 7; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::doubleVal>) { return 7; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-8>>) { return 8; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::stringVal>) { return 8; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-9>>) { return 9; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::binaryVal>) { return 9; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-10>>) { return 10; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::enumVal>) { return 10; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-11>>) { return 11; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::structVal>) { return 11; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-12>>) { return 12; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::unionVal>) { return 12; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-13>>) { return 13; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::lateStructVal>) { return 13; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-14>>) { return 14; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::durationVal>) { return 14; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-15>>) { return 15; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::timeVal>) { return 15; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-16>>) { return 16; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optBoolVal>) { return 16; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-17>>) { return 17; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optByteVal>) { return 17; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-18>>) { return 18; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optI16Val>) { return 18; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-19>>) { return 19; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optI32Val>) { return 19; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-20>>) { return 20; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optI64Val>) { return 20; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-21>>) { return 21; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optFloatVal>) { return 21; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-22>>) { return 22; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optDoubleVal>) { return 22; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-23>>) { return 23; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optStringVal>) { return 23; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-24>>) { return 24; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optBinaryVal>) { return 24; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-25>>) { return 25; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optEnumVal>) { return 25; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-26>>) { return 26; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optStructVal>) { return 26; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-27>>) { return 27; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optLateStructVal>) { return 27; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-28>>) { return 28; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optListVal>) { return 28; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-29>>) { return 29; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optSetVal>) { return 29; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-30>>) { return 30; } - static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optMapVal>) { return 30; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-30>>) { return 1; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optMapVal>) { return 1; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-29>>) { return 2; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optSetVal>) { return 2; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-28>>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optListVal>) { return 3; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-27>>) { return 4; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optLateStructVal>) { return 4; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-26>>) { return 5; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optStructVal>) { return 5; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-25>>) { return 6; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optEnumVal>) { return 6; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-24>>) { return 7; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optBinaryVal>) { return 7; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-23>>) { return 8; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optStringVal>) { return 8; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-22>>) { return 9; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optDoubleVal>) { return 9; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-21>>) { return 10; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optFloatVal>) { return 10; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-20>>) { return 11; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optI64Val>) { return 11; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-19>>) { return 12; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optI32Val>) { return 12; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-18>>) { return 13; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optI16Val>) { return 13; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-17>>) { return 14; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optByteVal>) { return 14; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-16>>) { return 15; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::optBoolVal>) { return 15; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-15>>) { return 16; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::timeVal>) { return 16; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-14>>) { return 17; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::durationVal>) { return 17; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-13>>) { return 18; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::lateStructVal>) { return 18; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-12>>) { return 19; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::unionVal>) { return 19; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-11>>) { return 20; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::structVal>) { return 20; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-10>>) { return 21; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::enumVal>) { return 21; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-9>>) { return 22; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::binaryVal>) { return 22; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-8>>) { return 23; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::stringVal>) { return 23; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-7>>) { return 24; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::doubleVal>) { return 24; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-6>>) { return 25; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::floatVal>) { return 25; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-5>>) { return 26; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::i64Val>) { return 26; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-4>>) { return 27; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::i32Val>) { return 27; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-3>>) { return 28; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::i16Val>) { return 28; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-2>>) { return 29; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::byteVal>) { return 29; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::field_id<-1>>) { return 30; } + static constexpr int value_impl(folly::tag_t<::apache::thrift::ident::boolVal>) { return 30; } template static constexpr int value = value_impl(folly::tag_t{}); #endif }; struct __fbthrift_ordinal_impl_for_non_unique_type { template struct Impl { static constexpr int value = 0; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::BoolPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BoolPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 1; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BytePatchStruct>>, T, std::enable_if_t> { static constexpr int value = 2; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 3; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I32PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 4; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I64PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 5; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::FloatPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 6; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DoublePatchStruct>>, T, std::enable_if_t> { static constexpr int value = 7; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::MapPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN30PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 1; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::SetPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN29PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 2; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::ListPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN28PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 3; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 4; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyDataPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 5; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN25PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 6; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::BinaryPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BinaryPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 7; }; template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StringPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::StringPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 8; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::BinaryPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BinaryPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 9; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN10PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 10; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyDataPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 11; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::UnionPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyUnionPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 12; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 13; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DurationStructPatch>>, T, std::enable_if_t> { static constexpr int value = 14; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::TimeStructPatch>>, T, std::enable_if_t> { static constexpr int value = 15; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::BoolPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BoolPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 16; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BytePatchStruct>>, T, std::enable_if_t> { static constexpr int value = 17; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 18; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I32PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 19; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I64PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 20; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::FloatPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 21; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DoublePatchStruct>>, T, std::enable_if_t> { static constexpr int value = 22; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DoublePatchStruct>>, T, std::enable_if_t> { static constexpr int value = 9; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::FloatPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 10; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I64PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 11; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I32PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 12; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 13; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BytePatchStruct>>, T, std::enable_if_t> { static constexpr int value = 14; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::BoolPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BoolPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 15; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::TimeStructPatch>>, T, std::enable_if_t> { static constexpr int value = 16; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DurationStructPatch>>, T, std::enable_if_t> { static constexpr int value = 17; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 18; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::UnionPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyUnionPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 19; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyDataPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 20; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN10PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 21; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::BinaryPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BinaryPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 22; }; template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StringPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::StringPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 23; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::BinaryPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BinaryPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 24; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::AssignPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN25PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 25; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyDataPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 26; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::StructPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::LateDefStructPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 27; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::ListPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN28PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 28; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::SetPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN29PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 29; }; - template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::MapPatchAdapter, ::apache::thrift::type::struct_t<::test::fixtures::patch::MyStructFieldN30PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 30; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::DoublePatchStruct>>, T, std::enable_if_t> { static constexpr int value = 24; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::FloatPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 25; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I64PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 26; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I32PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 27; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::I16PatchStruct>>, T, std::enable_if_t> { static constexpr int value = 28; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::NumberPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BytePatchStruct>>, T, std::enable_if_t> { static constexpr int value = 29; }; + template struct Impl<::apache::thrift::type::adapted<::apache::thrift::op::detail::BoolPatchAdapter, ::apache::thrift::type::struct_t<::apache::thrift::op::BoolPatchStruct>>, T, std::enable_if_t> { static constexpr int value = 30; }; template static constexpr int value = Impl::value; }; @@ -7859,40 +7859,40 @@ class MyStructFieldPatchStruct final { public: MyStructFieldPatchStruct() { - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); - ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::MapPatchAdapter, -30>(__fbthrift_field_optMapVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::SetPatchAdapter, -29>(__fbthrift_field_optSetVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::ListPatchAdapter, -28>(__fbthrift_field_optListVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -27>(__fbthrift_field_optLateStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -26>(__fbthrift_field_optStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -25>(__fbthrift_field_optEnumVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(__fbthrift_field_optBinaryVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -23>(__fbthrift_field_optStringVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -22>(__fbthrift_field_optDoubleVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -21>(__fbthrift_field_optFloatVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -20>(__fbthrift_field_optI64Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -19>(__fbthrift_field_optI32Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -18>(__fbthrift_field_optI16Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -17>(__fbthrift_field_optByteVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -16>(__fbthrift_field_optBoolVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -15>(__fbthrift_field_timeVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -14>(__fbthrift_field_durationVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -13>(__fbthrift_field_lateStructVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::UnionPatchAdapter, -12>(__fbthrift_field_unionVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StructPatchAdapter, -11>(__fbthrift_field_structVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::AssignPatchAdapter, -10>(__fbthrift_field_enumVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(__fbthrift_field_binaryVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::StringPatchAdapter, -8>(__fbthrift_field_stringVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -7>(__fbthrift_field_doubleVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -6>(__fbthrift_field_floatVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -5>(__fbthrift_field_i64Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -4>(__fbthrift_field_i32Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -3>(__fbthrift_field_i16Val, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::NumberPatchAdapter, -2>(__fbthrift_field_byteVal, *this); + ::apache::thrift::adapt_detail::construct<::apache::thrift::op::detail::BoolPatchAdapter, -1>(__fbthrift_field_boolVal, *this); } // FragileConstructor for use in initialization lists only. [[deprecated("This constructor is deprecated")]] - MyStructFieldPatchStruct(apache::thrift::FragileConstructor, ::apache::thrift::op::BoolPatch boolVal__arg, ::apache::thrift::op::BytePatch byteVal__arg, ::apache::thrift::op::I16Patch i16Val__arg, ::apache::thrift::op::I32Patch i32Val__arg, ::apache::thrift::op::I64Patch i64Val__arg, ::apache::thrift::op::FloatPatch floatVal__arg, ::apache::thrift::op::DoublePatch doubleVal__arg, ::apache::thrift::op::StringPatch stringVal__arg, ::apache::thrift::op::BinaryPatch binaryVal__arg, ::test::fixtures::patch::MyStructFieldN10Patch enumVal__arg, ::test::fixtures::patch::MyDataPatch structVal__arg, ::test::fixtures::patch::MyUnionPatch unionVal__arg, ::test::fixtures::patch::LateDefStructPatch lateStructVal__arg, ::apache::thrift::op::DurationPatch durationVal__arg, ::apache::thrift::op::TimePatch timeVal__arg, ::apache::thrift::op::BoolPatch optBoolVal__arg, ::apache::thrift::op::BytePatch optByteVal__arg, ::apache::thrift::op::I16Patch optI16Val__arg, ::apache::thrift::op::I32Patch optI32Val__arg, ::apache::thrift::op::I64Patch optI64Val__arg, ::apache::thrift::op::FloatPatch optFloatVal__arg, ::apache::thrift::op::DoublePatch optDoubleVal__arg, ::apache::thrift::op::StringPatch optStringVal__arg, ::apache::thrift::op::BinaryPatch optBinaryVal__arg, ::test::fixtures::patch::MyStructFieldN25Patch optEnumVal__arg, ::test::fixtures::patch::MyDataPatch optStructVal__arg, ::test::fixtures::patch::LateDefStructPatch optLateStructVal__arg, ::test::fixtures::patch::MyStructFieldN28Patch optListVal__arg, ::test::fixtures::patch::MyStructFieldN29Patch optSetVal__arg, ::test::fixtures::patch::MyStructFieldN30Patch optMapVal__arg); + MyStructFieldPatchStruct(apache::thrift::FragileConstructor, ::test::fixtures::patch::MyStructFieldN30Patch optMapVal__arg, ::test::fixtures::patch::MyStructFieldN29Patch optSetVal__arg, ::test::fixtures::patch::MyStructFieldN28Patch optListVal__arg, ::test::fixtures::patch::LateDefStructPatch optLateStructVal__arg, ::test::fixtures::patch::MyDataPatch optStructVal__arg, ::test::fixtures::patch::MyStructFieldN25Patch optEnumVal__arg, ::apache::thrift::op::BinaryPatch optBinaryVal__arg, ::apache::thrift::op::StringPatch optStringVal__arg, ::apache::thrift::op::DoublePatch optDoubleVal__arg, ::apache::thrift::op::FloatPatch optFloatVal__arg, ::apache::thrift::op::I64Patch optI64Val__arg, ::apache::thrift::op::I32Patch optI32Val__arg, ::apache::thrift::op::I16Patch optI16Val__arg, ::apache::thrift::op::BytePatch optByteVal__arg, ::apache::thrift::op::BoolPatch optBoolVal__arg, ::apache::thrift::op::TimePatch timeVal__arg, ::apache::thrift::op::DurationPatch durationVal__arg, ::test::fixtures::patch::LateDefStructPatch lateStructVal__arg, ::test::fixtures::patch::MyUnionPatch unionVal__arg, ::test::fixtures::patch::MyDataPatch structVal__arg, ::test::fixtures::patch::MyStructFieldN10Patch enumVal__arg, ::apache::thrift::op::BinaryPatch binaryVal__arg, ::apache::thrift::op::StringPatch stringVal__arg, ::apache::thrift::op::DoublePatch doubleVal__arg, ::apache::thrift::op::FloatPatch floatVal__arg, ::apache::thrift::op::I64Patch i64Val__arg, ::apache::thrift::op::I32Patch i32Val__arg, ::apache::thrift::op::I16Patch i16Val__arg, ::apache::thrift::op::BytePatch byteVal__arg, ::apache::thrift::op::BoolPatch boolVal__arg); MyStructFieldPatchStruct(MyStructFieldPatchStruct&&) noexcept; MyStructFieldPatchStruct(const MyStructFieldPatchStruct& src); @@ -7901,65 +7901,65 @@ class MyStructFieldPatchStruct final { MyStructFieldPatchStruct& operator=(MyStructFieldPatchStruct&&) noexcept; MyStructFieldPatchStruct& operator=(const MyStructFieldPatchStruct& src); private: - ::apache::thrift::op::BoolPatch __fbthrift_field_boolVal; - private: - ::apache::thrift::op::BytePatch __fbthrift_field_byteVal; + ::test::fixtures::patch::MyStructFieldN30Patch __fbthrift_field_optMapVal; private: - ::apache::thrift::op::I16Patch __fbthrift_field_i16Val; + ::test::fixtures::patch::MyStructFieldN29Patch __fbthrift_field_optSetVal; private: - ::apache::thrift::op::I32Patch __fbthrift_field_i32Val; + ::test::fixtures::patch::MyStructFieldN28Patch __fbthrift_field_optListVal; private: - ::apache::thrift::op::I64Patch __fbthrift_field_i64Val; + ::test::fixtures::patch::LateDefStructPatch __fbthrift_field_optLateStructVal; private: - ::apache::thrift::op::FloatPatch __fbthrift_field_floatVal; + ::test::fixtures::patch::MyDataPatch __fbthrift_field_optStructVal; private: - ::apache::thrift::op::DoublePatch __fbthrift_field_doubleVal; + ::test::fixtures::patch::MyStructFieldN25Patch __fbthrift_field_optEnumVal; private: - ::apache::thrift::op::StringPatch __fbthrift_field_stringVal; + ::apache::thrift::op::BinaryPatch __fbthrift_field_optBinaryVal; private: - ::apache::thrift::op::BinaryPatch __fbthrift_field_binaryVal; + ::apache::thrift::op::StringPatch __fbthrift_field_optStringVal; private: - ::test::fixtures::patch::MyStructFieldN10Patch __fbthrift_field_enumVal; + ::apache::thrift::op::DoublePatch __fbthrift_field_optDoubleVal; private: - ::test::fixtures::patch::MyDataPatch __fbthrift_field_structVal; + ::apache::thrift::op::FloatPatch __fbthrift_field_optFloatVal; private: - ::test::fixtures::patch::MyUnionPatch __fbthrift_field_unionVal; + ::apache::thrift::op::I64Patch __fbthrift_field_optI64Val; private: - ::test::fixtures::patch::LateDefStructPatch __fbthrift_field_lateStructVal; + ::apache::thrift::op::I32Patch __fbthrift_field_optI32Val; private: - ::apache::thrift::op::DurationPatch __fbthrift_field_durationVal; + ::apache::thrift::op::I16Patch __fbthrift_field_optI16Val; private: - ::apache::thrift::op::TimePatch __fbthrift_field_timeVal; + ::apache::thrift::op::BytePatch __fbthrift_field_optByteVal; private: ::apache::thrift::op::BoolPatch __fbthrift_field_optBoolVal; private: - ::apache::thrift::op::BytePatch __fbthrift_field_optByteVal; + ::apache::thrift::op::TimePatch __fbthrift_field_timeVal; private: - ::apache::thrift::op::I16Patch __fbthrift_field_optI16Val; + ::apache::thrift::op::DurationPatch __fbthrift_field_durationVal; private: - ::apache::thrift::op::I32Patch __fbthrift_field_optI32Val; + ::test::fixtures::patch::LateDefStructPatch __fbthrift_field_lateStructVal; private: - ::apache::thrift::op::I64Patch __fbthrift_field_optI64Val; + ::test::fixtures::patch::MyUnionPatch __fbthrift_field_unionVal; private: - ::apache::thrift::op::FloatPatch __fbthrift_field_optFloatVal; + ::test::fixtures::patch::MyDataPatch __fbthrift_field_structVal; private: - ::apache::thrift::op::DoublePatch __fbthrift_field_optDoubleVal; + ::test::fixtures::patch::MyStructFieldN10Patch __fbthrift_field_enumVal; private: - ::apache::thrift::op::StringPatch __fbthrift_field_optStringVal; + ::apache::thrift::op::BinaryPatch __fbthrift_field_binaryVal; private: - ::apache::thrift::op::BinaryPatch __fbthrift_field_optBinaryVal; + ::apache::thrift::op::StringPatch __fbthrift_field_stringVal; private: - ::test::fixtures::patch::MyStructFieldN25Patch __fbthrift_field_optEnumVal; + ::apache::thrift::op::DoublePatch __fbthrift_field_doubleVal; private: - ::test::fixtures::patch::MyDataPatch __fbthrift_field_optStructVal; + ::apache::thrift::op::FloatPatch __fbthrift_field_floatVal; private: - ::test::fixtures::patch::LateDefStructPatch __fbthrift_field_optLateStructVal; + ::apache::thrift::op::I64Patch __fbthrift_field_i64Val; private: - ::test::fixtures::patch::MyStructFieldN28Patch __fbthrift_field_optListVal; + ::apache::thrift::op::I32Patch __fbthrift_field_i32Val; private: - ::test::fixtures::patch::MyStructFieldN29Patch __fbthrift_field_optSetVal; + ::apache::thrift::op::I16Patch __fbthrift_field_i16Val; private: - ::test::fixtures::patch::MyStructFieldN30Patch __fbthrift_field_optMapVal; + ::apache::thrift::op::BytePatch __fbthrift_field_byteVal; + private: + ::apache::thrift::op::BoolPatch __fbthrift_field_boolVal; private: apache::thrift::detail::isset_bitset<30, apache::thrift::detail::IssetBitsetOption::Unpacked> __isset; @@ -7968,1204 +7968,1204 @@ class MyStructFieldPatchStruct final { bool operator==(const MyStructFieldPatchStruct&) const; bool operator<(const MyStructFieldPatchStruct&) const; - template - FOLLY_ERASE ::apache::thrift::field_ref boolVal_ref() const& { - return {this->__fbthrift_field_boolVal, __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref boolVal_ref() const&& { - return {static_cast(this->__fbthrift_field_boolVal), __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref boolVal_ref() & { - return {this->__fbthrift_field_boolVal, __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref boolVal_ref() && { - return {static_cast(this->__fbthrift_field_boolVal), __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref boolVal() const& { - return {this->__fbthrift_field_boolVal, __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref boolVal() const&& { - return {static_cast(this->__fbthrift_field_boolVal), __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref boolVal() & { - return {this->__fbthrift_field_boolVal, __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref boolVal() && { - return {static_cast(this->__fbthrift_field_boolVal), __isset.at(0), __isset.bit(0)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref byteVal_ref() const& { - return {this->__fbthrift_field_byteVal, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref byteVal_ref() const&& { - return {static_cast(this->__fbthrift_field_byteVal), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref byteVal_ref() & { - return {this->__fbthrift_field_byteVal, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref byteVal_ref() && { - return {static_cast(this->__fbthrift_field_byteVal), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref byteVal() const& { - return {this->__fbthrift_field_byteVal, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref byteVal() const&& { - return {static_cast(this->__fbthrift_field_byteVal), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref byteVal() & { - return {this->__fbthrift_field_byteVal, __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref byteVal() && { - return {static_cast(this->__fbthrift_field_byteVal), __isset.at(1), __isset.bit(1)}; - } - - template - FOLLY_ERASE ::apache::thrift::field_ref i16Val_ref() const& { - return {this->__fbthrift_field_i16Val, __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optMapVal_ref() const& { + return {this->__fbthrift_field_optMapVal, __isset.at(0), __isset.bit(0)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i16Val_ref() const&& { - return {static_cast(this->__fbthrift_field_i16Val), __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optMapVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optMapVal), __isset.at(0), __isset.bit(0)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i16Val_ref() & { - return {this->__fbthrift_field_i16Val, __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optMapVal_ref() & { + return {this->__fbthrift_field_optMapVal, __isset.at(0), __isset.bit(0)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i16Val_ref() && { - return {static_cast(this->__fbthrift_field_i16Val), __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optMapVal_ref() && { + return {static_cast(this->__fbthrift_field_optMapVal), __isset.at(0), __isset.bit(0)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i16Val() const& { - return {this->__fbthrift_field_i16Val, __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optMapVal() const& { + return {this->__fbthrift_field_optMapVal, __isset.at(0), __isset.bit(0)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i16Val() const&& { - return {static_cast(this->__fbthrift_field_i16Val), __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optMapVal() const&& { + return {static_cast(this->__fbthrift_field_optMapVal), __isset.at(0), __isset.bit(0)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i16Val() & { - return {this->__fbthrift_field_i16Val, __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optMapVal() & { + return {this->__fbthrift_field_optMapVal, __isset.at(0), __isset.bit(0)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i16Val() && { - return {static_cast(this->__fbthrift_field_i16Val), __isset.at(2), __isset.bit(2)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optMapVal() && { + return {static_cast(this->__fbthrift_field_optMapVal), __isset.at(0), __isset.bit(0)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i32Val_ref() const& { - return {this->__fbthrift_field_i32Val, __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optSetVal_ref() const& { + return {this->__fbthrift_field_optSetVal, __isset.at(1), __isset.bit(1)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i32Val_ref() const&& { - return {static_cast(this->__fbthrift_field_i32Val), __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optSetVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optSetVal), __isset.at(1), __isset.bit(1)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i32Val_ref() & { - return {this->__fbthrift_field_i32Val, __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optSetVal_ref() & { + return {this->__fbthrift_field_optSetVal, __isset.at(1), __isset.bit(1)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i32Val_ref() && { - return {static_cast(this->__fbthrift_field_i32Val), __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optSetVal_ref() && { + return {static_cast(this->__fbthrift_field_optSetVal), __isset.at(1), __isset.bit(1)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i32Val() const& { - return {this->__fbthrift_field_i32Val, __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optSetVal() const& { + return {this->__fbthrift_field_optSetVal, __isset.at(1), __isset.bit(1)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i32Val() const&& { - return {static_cast(this->__fbthrift_field_i32Val), __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optSetVal() const&& { + return {static_cast(this->__fbthrift_field_optSetVal), __isset.at(1), __isset.bit(1)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i32Val() & { - return {this->__fbthrift_field_i32Val, __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optSetVal() & { + return {this->__fbthrift_field_optSetVal, __isset.at(1), __isset.bit(1)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i32Val() && { - return {static_cast(this->__fbthrift_field_i32Val), __isset.at(3), __isset.bit(3)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optSetVal() && { + return {static_cast(this->__fbthrift_field_optSetVal), __isset.at(1), __isset.bit(1)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i64Val_ref() const& { - return {this->__fbthrift_field_i64Val, __isset.at(4), __isset.bit(4)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optListVal_ref() const& { + return {this->__fbthrift_field_optListVal, __isset.at(2), __isset.bit(2)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i64Val_ref() const&& { - return {static_cast(this->__fbthrift_field_i64Val), __isset.at(4), __isset.bit(4)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optListVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optListVal), __isset.at(2), __isset.bit(2)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i64Val_ref() & { - return {this->__fbthrift_field_i64Val, __isset.at(4), __isset.bit(4)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optListVal_ref() & { + return {this->__fbthrift_field_optListVal, __isset.at(2), __isset.bit(2)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i64Val_ref() && { - return {static_cast(this->__fbthrift_field_i64Val), __isset.at(4), __isset.bit(4)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optListVal_ref() && { + return {static_cast(this->__fbthrift_field_optListVal), __isset.at(2), __isset.bit(2)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i64Val() const& { - return {this->__fbthrift_field_i64Val, __isset.at(4), __isset.bit(4)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optListVal() const& { + return {this->__fbthrift_field_optListVal, __isset.at(2), __isset.bit(2)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i64Val() const&& { - return {static_cast(this->__fbthrift_field_i64Val), __isset.at(4), __isset.bit(4)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optListVal() const&& { + return {static_cast(this->__fbthrift_field_optListVal), __isset.at(2), __isset.bit(2)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i64Val() & { - return {this->__fbthrift_field_i64Val, __isset.at(4), __isset.bit(4)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optListVal() & { + return {this->__fbthrift_field_optListVal, __isset.at(2), __isset.bit(2)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref i64Val() && { - return {static_cast(this->__fbthrift_field_i64Val), __isset.at(4), __isset.bit(4)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optListVal() && { + return {static_cast(this->__fbthrift_field_optListVal), __isset.at(2), __isset.bit(2)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref floatVal_ref() const& { - return {this->__fbthrift_field_floatVal, __isset.at(5), __isset.bit(5)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal_ref() const& { + return {this->__fbthrift_field_optLateStructVal, __isset.at(3), __isset.bit(3)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref floatVal_ref() const&& { - return {static_cast(this->__fbthrift_field_floatVal), __isset.at(5), __isset.bit(5)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optLateStructVal), __isset.at(3), __isset.bit(3)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref floatVal_ref() & { - return {this->__fbthrift_field_floatVal, __isset.at(5), __isset.bit(5)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal_ref() & { + return {this->__fbthrift_field_optLateStructVal, __isset.at(3), __isset.bit(3)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref floatVal_ref() && { - return {static_cast(this->__fbthrift_field_floatVal), __isset.at(5), __isset.bit(5)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal_ref() && { + return {static_cast(this->__fbthrift_field_optLateStructVal), __isset.at(3), __isset.bit(3)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref floatVal() const& { - return {this->__fbthrift_field_floatVal, __isset.at(5), __isset.bit(5)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal() const& { + return {this->__fbthrift_field_optLateStructVal, __isset.at(3), __isset.bit(3)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref floatVal() const&& { - return {static_cast(this->__fbthrift_field_floatVal), __isset.at(5), __isset.bit(5)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal() const&& { + return {static_cast(this->__fbthrift_field_optLateStructVal), __isset.at(3), __isset.bit(3)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref floatVal() & { - return {this->__fbthrift_field_floatVal, __isset.at(5), __isset.bit(5)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal() & { + return {this->__fbthrift_field_optLateStructVal, __isset.at(3), __isset.bit(3)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref floatVal() && { - return {static_cast(this->__fbthrift_field_floatVal), __isset.at(5), __isset.bit(5)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal() && { + return {static_cast(this->__fbthrift_field_optLateStructVal), __isset.at(3), __isset.bit(3)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref doubleVal_ref() const& { - return {this->__fbthrift_field_doubleVal, __isset.at(6), __isset.bit(6)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStructVal_ref() const& { + return {this->__fbthrift_field_optStructVal, __isset.at(4), __isset.bit(4)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref doubleVal_ref() const&& { - return {static_cast(this->__fbthrift_field_doubleVal), __isset.at(6), __isset.bit(6)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStructVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optStructVal), __isset.at(4), __isset.bit(4)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref doubleVal_ref() & { - return {this->__fbthrift_field_doubleVal, __isset.at(6), __isset.bit(6)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStructVal_ref() & { + return {this->__fbthrift_field_optStructVal, __isset.at(4), __isset.bit(4)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref doubleVal_ref() && { - return {static_cast(this->__fbthrift_field_doubleVal), __isset.at(6), __isset.bit(6)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStructVal_ref() && { + return {static_cast(this->__fbthrift_field_optStructVal), __isset.at(4), __isset.bit(4)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref doubleVal() const& { - return {this->__fbthrift_field_doubleVal, __isset.at(6), __isset.bit(6)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStructVal() const& { + return {this->__fbthrift_field_optStructVal, __isset.at(4), __isset.bit(4)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref doubleVal() const&& { - return {static_cast(this->__fbthrift_field_doubleVal), __isset.at(6), __isset.bit(6)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStructVal() const&& { + return {static_cast(this->__fbthrift_field_optStructVal), __isset.at(4), __isset.bit(4)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref doubleVal() & { - return {this->__fbthrift_field_doubleVal, __isset.at(6), __isset.bit(6)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStructVal() & { + return {this->__fbthrift_field_optStructVal, __isset.at(4), __isset.bit(4)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref doubleVal() && { - return {static_cast(this->__fbthrift_field_doubleVal), __isset.at(6), __isset.bit(6)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStructVal() && { + return {static_cast(this->__fbthrift_field_optStructVal), __isset.at(4), __isset.bit(4)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref stringVal_ref() const& { - return {this->__fbthrift_field_stringVal, __isset.at(7), __isset.bit(7)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optEnumVal_ref() const& { + return {this->__fbthrift_field_optEnumVal, __isset.at(5), __isset.bit(5)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref stringVal_ref() const&& { - return {static_cast(this->__fbthrift_field_stringVal), __isset.at(7), __isset.bit(7)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optEnumVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optEnumVal), __isset.at(5), __isset.bit(5)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref stringVal_ref() & { - return {this->__fbthrift_field_stringVal, __isset.at(7), __isset.bit(7)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optEnumVal_ref() & { + return {this->__fbthrift_field_optEnumVal, __isset.at(5), __isset.bit(5)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref stringVal_ref() && { - return {static_cast(this->__fbthrift_field_stringVal), __isset.at(7), __isset.bit(7)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optEnumVal_ref() && { + return {static_cast(this->__fbthrift_field_optEnumVal), __isset.at(5), __isset.bit(5)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref stringVal() const& { - return {this->__fbthrift_field_stringVal, __isset.at(7), __isset.bit(7)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optEnumVal() const& { + return {this->__fbthrift_field_optEnumVal, __isset.at(5), __isset.bit(5)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref stringVal() const&& { - return {static_cast(this->__fbthrift_field_stringVal), __isset.at(7), __isset.bit(7)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optEnumVal() const&& { + return {static_cast(this->__fbthrift_field_optEnumVal), __isset.at(5), __isset.bit(5)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref stringVal() & { - return {this->__fbthrift_field_stringVal, __isset.at(7), __isset.bit(7)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optEnumVal() & { + return {this->__fbthrift_field_optEnumVal, __isset.at(5), __isset.bit(5)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref stringVal() && { - return {static_cast(this->__fbthrift_field_stringVal), __isset.at(7), __isset.bit(7)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optEnumVal() && { + return {static_cast(this->__fbthrift_field_optEnumVal), __isset.at(5), __isset.bit(5)}; } template - FOLLY_ERASE ::apache::thrift::field_ref binaryVal_ref() const& { - return {this->__fbthrift_field_binaryVal, __isset.at(8), __isset.bit(8)}; + FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal_ref() const& { + return {this->__fbthrift_field_optBinaryVal, __isset.at(6), __isset.bit(6)}; } template - FOLLY_ERASE ::apache::thrift::field_ref binaryVal_ref() const&& { - return {static_cast(this->__fbthrift_field_binaryVal), __isset.at(8), __isset.bit(8)}; + FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optBinaryVal), __isset.at(6), __isset.bit(6)}; } template - FOLLY_ERASE ::apache::thrift::field_ref binaryVal_ref() & { - return {this->__fbthrift_field_binaryVal, __isset.at(8), __isset.bit(8)}; + FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal_ref() & { + return {this->__fbthrift_field_optBinaryVal, __isset.at(6), __isset.bit(6)}; } template - FOLLY_ERASE ::apache::thrift::field_ref binaryVal_ref() && { - return {static_cast(this->__fbthrift_field_binaryVal), __isset.at(8), __isset.bit(8)}; + FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal_ref() && { + return {static_cast(this->__fbthrift_field_optBinaryVal), __isset.at(6), __isset.bit(6)}; } template - FOLLY_ERASE ::apache::thrift::field_ref binaryVal() const& { - return {this->__fbthrift_field_binaryVal, __isset.at(8), __isset.bit(8)}; + FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal() const& { + return {this->__fbthrift_field_optBinaryVal, __isset.at(6), __isset.bit(6)}; } template - FOLLY_ERASE ::apache::thrift::field_ref binaryVal() const&& { - return {static_cast(this->__fbthrift_field_binaryVal), __isset.at(8), __isset.bit(8)}; + FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal() const&& { + return {static_cast(this->__fbthrift_field_optBinaryVal), __isset.at(6), __isset.bit(6)}; } template - FOLLY_ERASE ::apache::thrift::field_ref binaryVal() & { - return {this->__fbthrift_field_binaryVal, __isset.at(8), __isset.bit(8)}; + FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal() & { + return {this->__fbthrift_field_optBinaryVal, __isset.at(6), __isset.bit(6)}; } template - FOLLY_ERASE ::apache::thrift::field_ref binaryVal() && { - return {static_cast(this->__fbthrift_field_binaryVal), __isset.at(8), __isset.bit(8)}; + FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal() && { + return {static_cast(this->__fbthrift_field_optBinaryVal), __isset.at(6), __isset.bit(6)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref enumVal_ref() const& { - return {this->__fbthrift_field_enumVal, __isset.at(9), __isset.bit(9)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStringVal_ref() const& { + return {this->__fbthrift_field_optStringVal, __isset.at(7), __isset.bit(7)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref enumVal_ref() const&& { - return {static_cast(this->__fbthrift_field_enumVal), __isset.at(9), __isset.bit(9)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStringVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optStringVal), __isset.at(7), __isset.bit(7)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref enumVal_ref() & { - return {this->__fbthrift_field_enumVal, __isset.at(9), __isset.bit(9)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStringVal_ref() & { + return {this->__fbthrift_field_optStringVal, __isset.at(7), __isset.bit(7)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref enumVal_ref() && { - return {static_cast(this->__fbthrift_field_enumVal), __isset.at(9), __isset.bit(9)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStringVal_ref() && { + return {static_cast(this->__fbthrift_field_optStringVal), __isset.at(7), __isset.bit(7)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref enumVal() const& { - return {this->__fbthrift_field_enumVal, __isset.at(9), __isset.bit(9)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStringVal() const& { + return {this->__fbthrift_field_optStringVal, __isset.at(7), __isset.bit(7)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref enumVal() const&& { - return {static_cast(this->__fbthrift_field_enumVal), __isset.at(9), __isset.bit(9)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStringVal() const&& { + return {static_cast(this->__fbthrift_field_optStringVal), __isset.at(7), __isset.bit(7)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref enumVal() & { - return {this->__fbthrift_field_enumVal, __isset.at(9), __isset.bit(9)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStringVal() & { + return {this->__fbthrift_field_optStringVal, __isset.at(7), __isset.bit(7)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref enumVal() && { - return {static_cast(this->__fbthrift_field_enumVal), __isset.at(9), __isset.bit(9)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optStringVal() && { + return {static_cast(this->__fbthrift_field_optStringVal), __isset.at(7), __isset.bit(7)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref structVal_ref() const& { - return {this->__fbthrift_field_structVal, __isset.at(10), __isset.bit(10)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal_ref() const& { + return {this->__fbthrift_field_optDoubleVal, __isset.at(8), __isset.bit(8)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref structVal_ref() const&& { - return {static_cast(this->__fbthrift_field_structVal), __isset.at(10), __isset.bit(10)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optDoubleVal), __isset.at(8), __isset.bit(8)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref structVal_ref() & { - return {this->__fbthrift_field_structVal, __isset.at(10), __isset.bit(10)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal_ref() & { + return {this->__fbthrift_field_optDoubleVal, __isset.at(8), __isset.bit(8)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref structVal_ref() && { - return {static_cast(this->__fbthrift_field_structVal), __isset.at(10), __isset.bit(10)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal_ref() && { + return {static_cast(this->__fbthrift_field_optDoubleVal), __isset.at(8), __isset.bit(8)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref structVal() const& { - return {this->__fbthrift_field_structVal, __isset.at(10), __isset.bit(10)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal() const& { + return {this->__fbthrift_field_optDoubleVal, __isset.at(8), __isset.bit(8)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref structVal() const&& { - return {static_cast(this->__fbthrift_field_structVal), __isset.at(10), __isset.bit(10)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal() const&& { + return {static_cast(this->__fbthrift_field_optDoubleVal), __isset.at(8), __isset.bit(8)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref structVal() & { - return {this->__fbthrift_field_structVal, __isset.at(10), __isset.bit(10)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal() & { + return {this->__fbthrift_field_optDoubleVal, __isset.at(8), __isset.bit(8)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref structVal() && { - return {static_cast(this->__fbthrift_field_structVal), __isset.at(10), __isset.bit(10)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal() && { + return {static_cast(this->__fbthrift_field_optDoubleVal), __isset.at(8), __isset.bit(8)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref unionVal_ref() const& { - return {this->__fbthrift_field_unionVal, __isset.at(11), __isset.bit(11)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optFloatVal_ref() const& { + return {this->__fbthrift_field_optFloatVal, __isset.at(9), __isset.bit(9)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref unionVal_ref() const&& { - return {static_cast(this->__fbthrift_field_unionVal), __isset.at(11), __isset.bit(11)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optFloatVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optFloatVal), __isset.at(9), __isset.bit(9)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref unionVal_ref() & { - return {this->__fbthrift_field_unionVal, __isset.at(11), __isset.bit(11)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optFloatVal_ref() & { + return {this->__fbthrift_field_optFloatVal, __isset.at(9), __isset.bit(9)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref unionVal_ref() && { - return {static_cast(this->__fbthrift_field_unionVal), __isset.at(11), __isset.bit(11)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optFloatVal_ref() && { + return {static_cast(this->__fbthrift_field_optFloatVal), __isset.at(9), __isset.bit(9)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref unionVal() const& { - return {this->__fbthrift_field_unionVal, __isset.at(11), __isset.bit(11)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optFloatVal() const& { + return {this->__fbthrift_field_optFloatVal, __isset.at(9), __isset.bit(9)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref unionVal() const&& { - return {static_cast(this->__fbthrift_field_unionVal), __isset.at(11), __isset.bit(11)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optFloatVal() const&& { + return {static_cast(this->__fbthrift_field_optFloatVal), __isset.at(9), __isset.bit(9)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref unionVal() & { - return {this->__fbthrift_field_unionVal, __isset.at(11), __isset.bit(11)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optFloatVal() & { + return {this->__fbthrift_field_optFloatVal, __isset.at(9), __isset.bit(9)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref unionVal() && { - return {static_cast(this->__fbthrift_field_unionVal), __isset.at(11), __isset.bit(11)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optFloatVal() && { + return {static_cast(this->__fbthrift_field_optFloatVal), __isset.at(9), __isset.bit(9)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref lateStructVal_ref() const& { - return {this->__fbthrift_field_lateStructVal, __isset.at(12), __isset.bit(12)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI64Val_ref() const& { + return {this->__fbthrift_field_optI64Val, __isset.at(10), __isset.bit(10)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref lateStructVal_ref() const&& { - return {static_cast(this->__fbthrift_field_lateStructVal), __isset.at(12), __isset.bit(12)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI64Val_ref() const&& { + return {static_cast(this->__fbthrift_field_optI64Val), __isset.at(10), __isset.bit(10)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref lateStructVal_ref() & { - return {this->__fbthrift_field_lateStructVal, __isset.at(12), __isset.bit(12)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI64Val_ref() & { + return {this->__fbthrift_field_optI64Val, __isset.at(10), __isset.bit(10)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref lateStructVal_ref() && { - return {static_cast(this->__fbthrift_field_lateStructVal), __isset.at(12), __isset.bit(12)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI64Val_ref() && { + return {static_cast(this->__fbthrift_field_optI64Val), __isset.at(10), __isset.bit(10)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref lateStructVal() const& { - return {this->__fbthrift_field_lateStructVal, __isset.at(12), __isset.bit(12)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI64Val() const& { + return {this->__fbthrift_field_optI64Val, __isset.at(10), __isset.bit(10)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref lateStructVal() const&& { - return {static_cast(this->__fbthrift_field_lateStructVal), __isset.at(12), __isset.bit(12)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI64Val() const&& { + return {static_cast(this->__fbthrift_field_optI64Val), __isset.at(10), __isset.bit(10)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref lateStructVal() & { - return {this->__fbthrift_field_lateStructVal, __isset.at(12), __isset.bit(12)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI64Val() & { + return {this->__fbthrift_field_optI64Val, __isset.at(10), __isset.bit(10)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref lateStructVal() && { - return {static_cast(this->__fbthrift_field_lateStructVal), __isset.at(12), __isset.bit(12)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI64Val() && { + return {static_cast(this->__fbthrift_field_optI64Val), __isset.at(10), __isset.bit(10)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref durationVal_ref() const& { - return {this->__fbthrift_field_durationVal, __isset.at(13), __isset.bit(13)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI32Val_ref() const& { + return {this->__fbthrift_field_optI32Val, __isset.at(11), __isset.bit(11)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref durationVal_ref() const&& { - return {static_cast(this->__fbthrift_field_durationVal), __isset.at(13), __isset.bit(13)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI32Val_ref() const&& { + return {static_cast(this->__fbthrift_field_optI32Val), __isset.at(11), __isset.bit(11)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref durationVal_ref() & { - return {this->__fbthrift_field_durationVal, __isset.at(13), __isset.bit(13)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI32Val_ref() & { + return {this->__fbthrift_field_optI32Val, __isset.at(11), __isset.bit(11)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref durationVal_ref() && { - return {static_cast(this->__fbthrift_field_durationVal), __isset.at(13), __isset.bit(13)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI32Val_ref() && { + return {static_cast(this->__fbthrift_field_optI32Val), __isset.at(11), __isset.bit(11)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref optI32Val() const& { + return {this->__fbthrift_field_optI32Val, __isset.at(11), __isset.bit(11)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref optI32Val() const&& { + return {static_cast(this->__fbthrift_field_optI32Val), __isset.at(11), __isset.bit(11)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref optI32Val() & { + return {this->__fbthrift_field_optI32Val, __isset.at(11), __isset.bit(11)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref optI32Val() && { + return {static_cast(this->__fbthrift_field_optI32Val), __isset.at(11), __isset.bit(11)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref optI16Val_ref() const& { + return {this->__fbthrift_field_optI16Val, __isset.at(12), __isset.bit(12)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref optI16Val_ref() const&& { + return {static_cast(this->__fbthrift_field_optI16Val), __isset.at(12), __isset.bit(12)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref optI16Val_ref() & { + return {this->__fbthrift_field_optI16Val, __isset.at(12), __isset.bit(12)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref optI16Val_ref() && { + return {static_cast(this->__fbthrift_field_optI16Val), __isset.at(12), __isset.bit(12)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref durationVal() const& { - return {this->__fbthrift_field_durationVal, __isset.at(13), __isset.bit(13)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI16Val() const& { + return {this->__fbthrift_field_optI16Val, __isset.at(12), __isset.bit(12)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref durationVal() const&& { - return {static_cast(this->__fbthrift_field_durationVal), __isset.at(13), __isset.bit(13)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI16Val() const&& { + return {static_cast(this->__fbthrift_field_optI16Val), __isset.at(12), __isset.bit(12)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref durationVal() & { - return {this->__fbthrift_field_durationVal, __isset.at(13), __isset.bit(13)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI16Val() & { + return {this->__fbthrift_field_optI16Val, __isset.at(12), __isset.bit(12)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref durationVal() && { - return {static_cast(this->__fbthrift_field_durationVal), __isset.at(13), __isset.bit(13)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optI16Val() && { + return {static_cast(this->__fbthrift_field_optI16Val), __isset.at(12), __isset.bit(12)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref timeVal_ref() const& { - return {this->__fbthrift_field_timeVal, __isset.at(14), __isset.bit(14)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optByteVal_ref() const& { + return {this->__fbthrift_field_optByteVal, __isset.at(13), __isset.bit(13)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref timeVal_ref() const&& { - return {static_cast(this->__fbthrift_field_timeVal), __isset.at(14), __isset.bit(14)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optByteVal_ref() const&& { + return {static_cast(this->__fbthrift_field_optByteVal), __isset.at(13), __isset.bit(13)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref timeVal_ref() & { - return {this->__fbthrift_field_timeVal, __isset.at(14), __isset.bit(14)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optByteVal_ref() & { + return {this->__fbthrift_field_optByteVal, __isset.at(13), __isset.bit(13)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref timeVal_ref() && { - return {static_cast(this->__fbthrift_field_timeVal), __isset.at(14), __isset.bit(14)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optByteVal_ref() && { + return {static_cast(this->__fbthrift_field_optByteVal), __isset.at(13), __isset.bit(13)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref timeVal() const& { - return {this->__fbthrift_field_timeVal, __isset.at(14), __isset.bit(14)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optByteVal() const& { + return {this->__fbthrift_field_optByteVal, __isset.at(13), __isset.bit(13)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref timeVal() const&& { - return {static_cast(this->__fbthrift_field_timeVal), __isset.at(14), __isset.bit(14)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optByteVal() const&& { + return {static_cast(this->__fbthrift_field_optByteVal), __isset.at(13), __isset.bit(13)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref timeVal() & { - return {this->__fbthrift_field_timeVal, __isset.at(14), __isset.bit(14)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optByteVal() & { + return {this->__fbthrift_field_optByteVal, __isset.at(13), __isset.bit(13)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref timeVal() && { - return {static_cast(this->__fbthrift_field_timeVal), __isset.at(14), __isset.bit(14)}; + template + FOLLY_ERASE ::apache::thrift::field_ref optByteVal() && { + return {static_cast(this->__fbthrift_field_optByteVal), __isset.at(13), __isset.bit(13)}; } template FOLLY_ERASE ::apache::thrift::field_ref optBoolVal_ref() const& { - return {this->__fbthrift_field_optBoolVal, __isset.at(15), __isset.bit(15)}; + return {this->__fbthrift_field_optBoolVal, __isset.at(14), __isset.bit(14)}; } template FOLLY_ERASE ::apache::thrift::field_ref optBoolVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optBoolVal), __isset.at(15), __isset.bit(15)}; + return {static_cast(this->__fbthrift_field_optBoolVal), __isset.at(14), __isset.bit(14)}; } template FOLLY_ERASE ::apache::thrift::field_ref optBoolVal_ref() & { - return {this->__fbthrift_field_optBoolVal, __isset.at(15), __isset.bit(15)}; + return {this->__fbthrift_field_optBoolVal, __isset.at(14), __isset.bit(14)}; } template FOLLY_ERASE ::apache::thrift::field_ref optBoolVal_ref() && { - return {static_cast(this->__fbthrift_field_optBoolVal), __isset.at(15), __isset.bit(15)}; + return {static_cast(this->__fbthrift_field_optBoolVal), __isset.at(14), __isset.bit(14)}; } template FOLLY_ERASE ::apache::thrift::field_ref optBoolVal() const& { - return {this->__fbthrift_field_optBoolVal, __isset.at(15), __isset.bit(15)}; + return {this->__fbthrift_field_optBoolVal, __isset.at(14), __isset.bit(14)}; } template FOLLY_ERASE ::apache::thrift::field_ref optBoolVal() const&& { - return {static_cast(this->__fbthrift_field_optBoolVal), __isset.at(15), __isset.bit(15)}; + return {static_cast(this->__fbthrift_field_optBoolVal), __isset.at(14), __isset.bit(14)}; } template FOLLY_ERASE ::apache::thrift::field_ref optBoolVal() & { - return {this->__fbthrift_field_optBoolVal, __isset.at(15), __isset.bit(15)}; + return {this->__fbthrift_field_optBoolVal, __isset.at(14), __isset.bit(14)}; } template FOLLY_ERASE ::apache::thrift::field_ref optBoolVal() && { - return {static_cast(this->__fbthrift_field_optBoolVal), __isset.at(15), __isset.bit(15)}; + return {static_cast(this->__fbthrift_field_optBoolVal), __isset.at(14), __isset.bit(14)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optByteVal_ref() const& { - return {this->__fbthrift_field_optByteVal, __isset.at(16), __isset.bit(16)}; + template + FOLLY_ERASE ::apache::thrift::field_ref timeVal_ref() const& { + return {this->__fbthrift_field_timeVal, __isset.at(15), __isset.bit(15)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optByteVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optByteVal), __isset.at(16), __isset.bit(16)}; + template + FOLLY_ERASE ::apache::thrift::field_ref timeVal_ref() const&& { + return {static_cast(this->__fbthrift_field_timeVal), __isset.at(15), __isset.bit(15)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optByteVal_ref() & { - return {this->__fbthrift_field_optByteVal, __isset.at(16), __isset.bit(16)}; + template + FOLLY_ERASE ::apache::thrift::field_ref timeVal_ref() & { + return {this->__fbthrift_field_timeVal, __isset.at(15), __isset.bit(15)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optByteVal_ref() && { - return {static_cast(this->__fbthrift_field_optByteVal), __isset.at(16), __isset.bit(16)}; + template + FOLLY_ERASE ::apache::thrift::field_ref timeVal_ref() && { + return {static_cast(this->__fbthrift_field_timeVal), __isset.at(15), __isset.bit(15)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optByteVal() const& { - return {this->__fbthrift_field_optByteVal, __isset.at(16), __isset.bit(16)}; + template + FOLLY_ERASE ::apache::thrift::field_ref timeVal() const& { + return {this->__fbthrift_field_timeVal, __isset.at(15), __isset.bit(15)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optByteVal() const&& { - return {static_cast(this->__fbthrift_field_optByteVal), __isset.at(16), __isset.bit(16)}; + template + FOLLY_ERASE ::apache::thrift::field_ref timeVal() const&& { + return {static_cast(this->__fbthrift_field_timeVal), __isset.at(15), __isset.bit(15)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optByteVal() & { - return {this->__fbthrift_field_optByteVal, __isset.at(16), __isset.bit(16)}; + template + FOLLY_ERASE ::apache::thrift::field_ref timeVal() & { + return {this->__fbthrift_field_timeVal, __isset.at(15), __isset.bit(15)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optByteVal() && { - return {static_cast(this->__fbthrift_field_optByteVal), __isset.at(16), __isset.bit(16)}; + template + FOLLY_ERASE ::apache::thrift::field_ref timeVal() && { + return {static_cast(this->__fbthrift_field_timeVal), __isset.at(15), __isset.bit(15)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI16Val_ref() const& { - return {this->__fbthrift_field_optI16Val, __isset.at(17), __isset.bit(17)}; + template + FOLLY_ERASE ::apache::thrift::field_ref durationVal_ref() const& { + return {this->__fbthrift_field_durationVal, __isset.at(16), __isset.bit(16)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI16Val_ref() const&& { - return {static_cast(this->__fbthrift_field_optI16Val), __isset.at(17), __isset.bit(17)}; + template + FOLLY_ERASE ::apache::thrift::field_ref durationVal_ref() const&& { + return {static_cast(this->__fbthrift_field_durationVal), __isset.at(16), __isset.bit(16)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI16Val_ref() & { - return {this->__fbthrift_field_optI16Val, __isset.at(17), __isset.bit(17)}; + template + FOLLY_ERASE ::apache::thrift::field_ref durationVal_ref() & { + return {this->__fbthrift_field_durationVal, __isset.at(16), __isset.bit(16)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI16Val_ref() && { - return {static_cast(this->__fbthrift_field_optI16Val), __isset.at(17), __isset.bit(17)}; + template + FOLLY_ERASE ::apache::thrift::field_ref durationVal_ref() && { + return {static_cast(this->__fbthrift_field_durationVal), __isset.at(16), __isset.bit(16)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI16Val() const& { - return {this->__fbthrift_field_optI16Val, __isset.at(17), __isset.bit(17)}; + template + FOLLY_ERASE ::apache::thrift::field_ref durationVal() const& { + return {this->__fbthrift_field_durationVal, __isset.at(16), __isset.bit(16)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI16Val() const&& { - return {static_cast(this->__fbthrift_field_optI16Val), __isset.at(17), __isset.bit(17)}; + template + FOLLY_ERASE ::apache::thrift::field_ref durationVal() const&& { + return {static_cast(this->__fbthrift_field_durationVal), __isset.at(16), __isset.bit(16)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI16Val() & { - return {this->__fbthrift_field_optI16Val, __isset.at(17), __isset.bit(17)}; + template + FOLLY_ERASE ::apache::thrift::field_ref durationVal() & { + return {this->__fbthrift_field_durationVal, __isset.at(16), __isset.bit(16)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI16Val() && { - return {static_cast(this->__fbthrift_field_optI16Val), __isset.at(17), __isset.bit(17)}; + template + FOLLY_ERASE ::apache::thrift::field_ref durationVal() && { + return {static_cast(this->__fbthrift_field_durationVal), __isset.at(16), __isset.bit(16)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI32Val_ref() const& { - return {this->__fbthrift_field_optI32Val, __isset.at(18), __isset.bit(18)}; + template + FOLLY_ERASE ::apache::thrift::field_ref lateStructVal_ref() const& { + return {this->__fbthrift_field_lateStructVal, __isset.at(17), __isset.bit(17)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI32Val_ref() const&& { - return {static_cast(this->__fbthrift_field_optI32Val), __isset.at(18), __isset.bit(18)}; + template + FOLLY_ERASE ::apache::thrift::field_ref lateStructVal_ref() const&& { + return {static_cast(this->__fbthrift_field_lateStructVal), __isset.at(17), __isset.bit(17)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI32Val_ref() & { - return {this->__fbthrift_field_optI32Val, __isset.at(18), __isset.bit(18)}; + template + FOLLY_ERASE ::apache::thrift::field_ref lateStructVal_ref() & { + return {this->__fbthrift_field_lateStructVal, __isset.at(17), __isset.bit(17)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI32Val_ref() && { - return {static_cast(this->__fbthrift_field_optI32Val), __isset.at(18), __isset.bit(18)}; + template + FOLLY_ERASE ::apache::thrift::field_ref lateStructVal_ref() && { + return {static_cast(this->__fbthrift_field_lateStructVal), __isset.at(17), __isset.bit(17)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI32Val() const& { - return {this->__fbthrift_field_optI32Val, __isset.at(18), __isset.bit(18)}; + template + FOLLY_ERASE ::apache::thrift::field_ref lateStructVal() const& { + return {this->__fbthrift_field_lateStructVal, __isset.at(17), __isset.bit(17)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI32Val() const&& { - return {static_cast(this->__fbthrift_field_optI32Val), __isset.at(18), __isset.bit(18)}; + template + FOLLY_ERASE ::apache::thrift::field_ref lateStructVal() const&& { + return {static_cast(this->__fbthrift_field_lateStructVal), __isset.at(17), __isset.bit(17)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI32Val() & { - return {this->__fbthrift_field_optI32Val, __isset.at(18), __isset.bit(18)}; + template + FOLLY_ERASE ::apache::thrift::field_ref lateStructVal() & { + return {this->__fbthrift_field_lateStructVal, __isset.at(17), __isset.bit(17)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI32Val() && { - return {static_cast(this->__fbthrift_field_optI32Val), __isset.at(18), __isset.bit(18)}; + template + FOLLY_ERASE ::apache::thrift::field_ref lateStructVal() && { + return {static_cast(this->__fbthrift_field_lateStructVal), __isset.at(17), __isset.bit(17)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI64Val_ref() const& { - return {this->__fbthrift_field_optI64Val, __isset.at(19), __isset.bit(19)}; + template + FOLLY_ERASE ::apache::thrift::field_ref unionVal_ref() const& { + return {this->__fbthrift_field_unionVal, __isset.at(18), __isset.bit(18)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI64Val_ref() const&& { - return {static_cast(this->__fbthrift_field_optI64Val), __isset.at(19), __isset.bit(19)}; + template + FOLLY_ERASE ::apache::thrift::field_ref unionVal_ref() const&& { + return {static_cast(this->__fbthrift_field_unionVal), __isset.at(18), __isset.bit(18)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI64Val_ref() & { - return {this->__fbthrift_field_optI64Val, __isset.at(19), __isset.bit(19)}; + template + FOLLY_ERASE ::apache::thrift::field_ref unionVal_ref() & { + return {this->__fbthrift_field_unionVal, __isset.at(18), __isset.bit(18)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI64Val_ref() && { - return {static_cast(this->__fbthrift_field_optI64Val), __isset.at(19), __isset.bit(19)}; + template + FOLLY_ERASE ::apache::thrift::field_ref unionVal_ref() && { + return {static_cast(this->__fbthrift_field_unionVal), __isset.at(18), __isset.bit(18)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI64Val() const& { - return {this->__fbthrift_field_optI64Val, __isset.at(19), __isset.bit(19)}; + template + FOLLY_ERASE ::apache::thrift::field_ref unionVal() const& { + return {this->__fbthrift_field_unionVal, __isset.at(18), __isset.bit(18)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI64Val() const&& { - return {static_cast(this->__fbthrift_field_optI64Val), __isset.at(19), __isset.bit(19)}; + template + FOLLY_ERASE ::apache::thrift::field_ref unionVal() const&& { + return {static_cast(this->__fbthrift_field_unionVal), __isset.at(18), __isset.bit(18)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI64Val() & { - return {this->__fbthrift_field_optI64Val, __isset.at(19), __isset.bit(19)}; + template + FOLLY_ERASE ::apache::thrift::field_ref unionVal() & { + return {this->__fbthrift_field_unionVal, __isset.at(18), __isset.bit(18)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optI64Val() && { - return {static_cast(this->__fbthrift_field_optI64Val), __isset.at(19), __isset.bit(19)}; + template + FOLLY_ERASE ::apache::thrift::field_ref unionVal() && { + return {static_cast(this->__fbthrift_field_unionVal), __isset.at(18), __isset.bit(18)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optFloatVal_ref() const& { - return {this->__fbthrift_field_optFloatVal, __isset.at(20), __isset.bit(20)}; + template + FOLLY_ERASE ::apache::thrift::field_ref structVal_ref() const& { + return {this->__fbthrift_field_structVal, __isset.at(19), __isset.bit(19)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optFloatVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optFloatVal), __isset.at(20), __isset.bit(20)}; + template + FOLLY_ERASE ::apache::thrift::field_ref structVal_ref() const&& { + return {static_cast(this->__fbthrift_field_structVal), __isset.at(19), __isset.bit(19)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optFloatVal_ref() & { - return {this->__fbthrift_field_optFloatVal, __isset.at(20), __isset.bit(20)}; + template + FOLLY_ERASE ::apache::thrift::field_ref structVal_ref() & { + return {this->__fbthrift_field_structVal, __isset.at(19), __isset.bit(19)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optFloatVal_ref() && { - return {static_cast(this->__fbthrift_field_optFloatVal), __isset.at(20), __isset.bit(20)}; + template + FOLLY_ERASE ::apache::thrift::field_ref structVal_ref() && { + return {static_cast(this->__fbthrift_field_structVal), __isset.at(19), __isset.bit(19)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optFloatVal() const& { - return {this->__fbthrift_field_optFloatVal, __isset.at(20), __isset.bit(20)}; + template + FOLLY_ERASE ::apache::thrift::field_ref structVal() const& { + return {this->__fbthrift_field_structVal, __isset.at(19), __isset.bit(19)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optFloatVal() const&& { - return {static_cast(this->__fbthrift_field_optFloatVal), __isset.at(20), __isset.bit(20)}; + template + FOLLY_ERASE ::apache::thrift::field_ref structVal() const&& { + return {static_cast(this->__fbthrift_field_structVal), __isset.at(19), __isset.bit(19)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optFloatVal() & { - return {this->__fbthrift_field_optFloatVal, __isset.at(20), __isset.bit(20)}; + template + FOLLY_ERASE ::apache::thrift::field_ref structVal() & { + return {this->__fbthrift_field_structVal, __isset.at(19), __isset.bit(19)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optFloatVal() && { - return {static_cast(this->__fbthrift_field_optFloatVal), __isset.at(20), __isset.bit(20)}; + template + FOLLY_ERASE ::apache::thrift::field_ref structVal() && { + return {static_cast(this->__fbthrift_field_structVal), __isset.at(19), __isset.bit(19)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal_ref() const& { - return {this->__fbthrift_field_optDoubleVal, __isset.at(21), __isset.bit(21)}; + template + FOLLY_ERASE ::apache::thrift::field_ref enumVal_ref() const& { + return {this->__fbthrift_field_enumVal, __isset.at(20), __isset.bit(20)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optDoubleVal), __isset.at(21), __isset.bit(21)}; + template + FOLLY_ERASE ::apache::thrift::field_ref enumVal_ref() const&& { + return {static_cast(this->__fbthrift_field_enumVal), __isset.at(20), __isset.bit(20)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal_ref() & { - return {this->__fbthrift_field_optDoubleVal, __isset.at(21), __isset.bit(21)}; + template + FOLLY_ERASE ::apache::thrift::field_ref enumVal_ref() & { + return {this->__fbthrift_field_enumVal, __isset.at(20), __isset.bit(20)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal_ref() && { - return {static_cast(this->__fbthrift_field_optDoubleVal), __isset.at(21), __isset.bit(21)}; + template + FOLLY_ERASE ::apache::thrift::field_ref enumVal_ref() && { + return {static_cast(this->__fbthrift_field_enumVal), __isset.at(20), __isset.bit(20)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref enumVal() const& { + return {this->__fbthrift_field_enumVal, __isset.at(20), __isset.bit(20)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref enumVal() const&& { + return {static_cast(this->__fbthrift_field_enumVal), __isset.at(20), __isset.bit(20)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref enumVal() & { + return {this->__fbthrift_field_enumVal, __isset.at(20), __isset.bit(20)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref enumVal() && { + return {static_cast(this->__fbthrift_field_enumVal), __isset.at(20), __isset.bit(20)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref binaryVal_ref() const& { + return {this->__fbthrift_field_binaryVal, __isset.at(21), __isset.bit(21)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref binaryVal_ref() const&& { + return {static_cast(this->__fbthrift_field_binaryVal), __isset.at(21), __isset.bit(21)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref binaryVal_ref() & { + return {this->__fbthrift_field_binaryVal, __isset.at(21), __isset.bit(21)}; + } + + template + FOLLY_ERASE ::apache::thrift::field_ref binaryVal_ref() && { + return {static_cast(this->__fbthrift_field_binaryVal), __isset.at(21), __isset.bit(21)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal() const& { - return {this->__fbthrift_field_optDoubleVal, __isset.at(21), __isset.bit(21)}; + template + FOLLY_ERASE ::apache::thrift::field_ref binaryVal() const& { + return {this->__fbthrift_field_binaryVal, __isset.at(21), __isset.bit(21)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal() const&& { - return {static_cast(this->__fbthrift_field_optDoubleVal), __isset.at(21), __isset.bit(21)}; + template + FOLLY_ERASE ::apache::thrift::field_ref binaryVal() const&& { + return {static_cast(this->__fbthrift_field_binaryVal), __isset.at(21), __isset.bit(21)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal() & { - return {this->__fbthrift_field_optDoubleVal, __isset.at(21), __isset.bit(21)}; + template + FOLLY_ERASE ::apache::thrift::field_ref binaryVal() & { + return {this->__fbthrift_field_binaryVal, __isset.at(21), __isset.bit(21)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optDoubleVal() && { - return {static_cast(this->__fbthrift_field_optDoubleVal), __isset.at(21), __isset.bit(21)}; + template + FOLLY_ERASE ::apache::thrift::field_ref binaryVal() && { + return {static_cast(this->__fbthrift_field_binaryVal), __isset.at(21), __isset.bit(21)}; } template - FOLLY_ERASE ::apache::thrift::field_ref optStringVal_ref() const& { - return {this->__fbthrift_field_optStringVal, __isset.at(22), __isset.bit(22)}; + FOLLY_ERASE ::apache::thrift::field_ref stringVal_ref() const& { + return {this->__fbthrift_field_stringVal, __isset.at(22), __isset.bit(22)}; } template - FOLLY_ERASE ::apache::thrift::field_ref optStringVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optStringVal), __isset.at(22), __isset.bit(22)}; + FOLLY_ERASE ::apache::thrift::field_ref stringVal_ref() const&& { + return {static_cast(this->__fbthrift_field_stringVal), __isset.at(22), __isset.bit(22)}; } template - FOLLY_ERASE ::apache::thrift::field_ref optStringVal_ref() & { - return {this->__fbthrift_field_optStringVal, __isset.at(22), __isset.bit(22)}; + FOLLY_ERASE ::apache::thrift::field_ref stringVal_ref() & { + return {this->__fbthrift_field_stringVal, __isset.at(22), __isset.bit(22)}; } template - FOLLY_ERASE ::apache::thrift::field_ref optStringVal_ref() && { - return {static_cast(this->__fbthrift_field_optStringVal), __isset.at(22), __isset.bit(22)}; + FOLLY_ERASE ::apache::thrift::field_ref stringVal_ref() && { + return {static_cast(this->__fbthrift_field_stringVal), __isset.at(22), __isset.bit(22)}; } template - FOLLY_ERASE ::apache::thrift::field_ref optStringVal() const& { - return {this->__fbthrift_field_optStringVal, __isset.at(22), __isset.bit(22)}; + FOLLY_ERASE ::apache::thrift::field_ref stringVal() const& { + return {this->__fbthrift_field_stringVal, __isset.at(22), __isset.bit(22)}; } template - FOLLY_ERASE ::apache::thrift::field_ref optStringVal() const&& { - return {static_cast(this->__fbthrift_field_optStringVal), __isset.at(22), __isset.bit(22)}; + FOLLY_ERASE ::apache::thrift::field_ref stringVal() const&& { + return {static_cast(this->__fbthrift_field_stringVal), __isset.at(22), __isset.bit(22)}; } template - FOLLY_ERASE ::apache::thrift::field_ref optStringVal() & { - return {this->__fbthrift_field_optStringVal, __isset.at(22), __isset.bit(22)}; + FOLLY_ERASE ::apache::thrift::field_ref stringVal() & { + return {this->__fbthrift_field_stringVal, __isset.at(22), __isset.bit(22)}; } template - FOLLY_ERASE ::apache::thrift::field_ref optStringVal() && { - return {static_cast(this->__fbthrift_field_optStringVal), __isset.at(22), __isset.bit(22)}; + FOLLY_ERASE ::apache::thrift::field_ref stringVal() && { + return {static_cast(this->__fbthrift_field_stringVal), __isset.at(22), __isset.bit(22)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal_ref() const& { - return {this->__fbthrift_field_optBinaryVal, __isset.at(23), __isset.bit(23)}; + template + FOLLY_ERASE ::apache::thrift::field_ref doubleVal_ref() const& { + return {this->__fbthrift_field_doubleVal, __isset.at(23), __isset.bit(23)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optBinaryVal), __isset.at(23), __isset.bit(23)}; + template + FOLLY_ERASE ::apache::thrift::field_ref doubleVal_ref() const&& { + return {static_cast(this->__fbthrift_field_doubleVal), __isset.at(23), __isset.bit(23)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal_ref() & { - return {this->__fbthrift_field_optBinaryVal, __isset.at(23), __isset.bit(23)}; + template + FOLLY_ERASE ::apache::thrift::field_ref doubleVal_ref() & { + return {this->__fbthrift_field_doubleVal, __isset.at(23), __isset.bit(23)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal_ref() && { - return {static_cast(this->__fbthrift_field_optBinaryVal), __isset.at(23), __isset.bit(23)}; + template + FOLLY_ERASE ::apache::thrift::field_ref doubleVal_ref() && { + return {static_cast(this->__fbthrift_field_doubleVal), __isset.at(23), __isset.bit(23)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal() const& { - return {this->__fbthrift_field_optBinaryVal, __isset.at(23), __isset.bit(23)}; + template + FOLLY_ERASE ::apache::thrift::field_ref doubleVal() const& { + return {this->__fbthrift_field_doubleVal, __isset.at(23), __isset.bit(23)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal() const&& { - return {static_cast(this->__fbthrift_field_optBinaryVal), __isset.at(23), __isset.bit(23)}; + template + FOLLY_ERASE ::apache::thrift::field_ref doubleVal() const&& { + return {static_cast(this->__fbthrift_field_doubleVal), __isset.at(23), __isset.bit(23)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal() & { - return {this->__fbthrift_field_optBinaryVal, __isset.at(23), __isset.bit(23)}; + template + FOLLY_ERASE ::apache::thrift::field_ref doubleVal() & { + return {this->__fbthrift_field_doubleVal, __isset.at(23), __isset.bit(23)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optBinaryVal() && { - return {static_cast(this->__fbthrift_field_optBinaryVal), __isset.at(23), __isset.bit(23)}; + template + FOLLY_ERASE ::apache::thrift::field_ref doubleVal() && { + return {static_cast(this->__fbthrift_field_doubleVal), __isset.at(23), __isset.bit(23)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optEnumVal_ref() const& { - return {this->__fbthrift_field_optEnumVal, __isset.at(24), __isset.bit(24)}; + template + FOLLY_ERASE ::apache::thrift::field_ref floatVal_ref() const& { + return {this->__fbthrift_field_floatVal, __isset.at(24), __isset.bit(24)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optEnumVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optEnumVal), __isset.at(24), __isset.bit(24)}; + template + FOLLY_ERASE ::apache::thrift::field_ref floatVal_ref() const&& { + return {static_cast(this->__fbthrift_field_floatVal), __isset.at(24), __isset.bit(24)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optEnumVal_ref() & { - return {this->__fbthrift_field_optEnumVal, __isset.at(24), __isset.bit(24)}; + template + FOLLY_ERASE ::apache::thrift::field_ref floatVal_ref() & { + return {this->__fbthrift_field_floatVal, __isset.at(24), __isset.bit(24)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optEnumVal_ref() && { - return {static_cast(this->__fbthrift_field_optEnumVal), __isset.at(24), __isset.bit(24)}; + template + FOLLY_ERASE ::apache::thrift::field_ref floatVal_ref() && { + return {static_cast(this->__fbthrift_field_floatVal), __isset.at(24), __isset.bit(24)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optEnumVal() const& { - return {this->__fbthrift_field_optEnumVal, __isset.at(24), __isset.bit(24)}; + template + FOLLY_ERASE ::apache::thrift::field_ref floatVal() const& { + return {this->__fbthrift_field_floatVal, __isset.at(24), __isset.bit(24)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optEnumVal() const&& { - return {static_cast(this->__fbthrift_field_optEnumVal), __isset.at(24), __isset.bit(24)}; + template + FOLLY_ERASE ::apache::thrift::field_ref floatVal() const&& { + return {static_cast(this->__fbthrift_field_floatVal), __isset.at(24), __isset.bit(24)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optEnumVal() & { - return {this->__fbthrift_field_optEnumVal, __isset.at(24), __isset.bit(24)}; + template + FOLLY_ERASE ::apache::thrift::field_ref floatVal() & { + return {this->__fbthrift_field_floatVal, __isset.at(24), __isset.bit(24)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optEnumVal() && { - return {static_cast(this->__fbthrift_field_optEnumVal), __isset.at(24), __isset.bit(24)}; + template + FOLLY_ERASE ::apache::thrift::field_ref floatVal() && { + return {static_cast(this->__fbthrift_field_floatVal), __isset.at(24), __isset.bit(24)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optStructVal_ref() const& { - return {this->__fbthrift_field_optStructVal, __isset.at(25), __isset.bit(25)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i64Val_ref() const& { + return {this->__fbthrift_field_i64Val, __isset.at(25), __isset.bit(25)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optStructVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optStructVal), __isset.at(25), __isset.bit(25)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i64Val_ref() const&& { + return {static_cast(this->__fbthrift_field_i64Val), __isset.at(25), __isset.bit(25)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optStructVal_ref() & { - return {this->__fbthrift_field_optStructVal, __isset.at(25), __isset.bit(25)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i64Val_ref() & { + return {this->__fbthrift_field_i64Val, __isset.at(25), __isset.bit(25)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optStructVal_ref() && { - return {static_cast(this->__fbthrift_field_optStructVal), __isset.at(25), __isset.bit(25)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i64Val_ref() && { + return {static_cast(this->__fbthrift_field_i64Val), __isset.at(25), __isset.bit(25)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optStructVal() const& { - return {this->__fbthrift_field_optStructVal, __isset.at(25), __isset.bit(25)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i64Val() const& { + return {this->__fbthrift_field_i64Val, __isset.at(25), __isset.bit(25)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optStructVal() const&& { - return {static_cast(this->__fbthrift_field_optStructVal), __isset.at(25), __isset.bit(25)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i64Val() const&& { + return {static_cast(this->__fbthrift_field_i64Val), __isset.at(25), __isset.bit(25)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optStructVal() & { - return {this->__fbthrift_field_optStructVal, __isset.at(25), __isset.bit(25)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i64Val() & { + return {this->__fbthrift_field_i64Val, __isset.at(25), __isset.bit(25)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optStructVal() && { - return {static_cast(this->__fbthrift_field_optStructVal), __isset.at(25), __isset.bit(25)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i64Val() && { + return {static_cast(this->__fbthrift_field_i64Val), __isset.at(25), __isset.bit(25)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal_ref() const& { - return {this->__fbthrift_field_optLateStructVal, __isset.at(26), __isset.bit(26)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i32Val_ref() const& { + return {this->__fbthrift_field_i32Val, __isset.at(26), __isset.bit(26)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optLateStructVal), __isset.at(26), __isset.bit(26)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i32Val_ref() const&& { + return {static_cast(this->__fbthrift_field_i32Val), __isset.at(26), __isset.bit(26)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal_ref() & { - return {this->__fbthrift_field_optLateStructVal, __isset.at(26), __isset.bit(26)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i32Val_ref() & { + return {this->__fbthrift_field_i32Val, __isset.at(26), __isset.bit(26)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal_ref() && { - return {static_cast(this->__fbthrift_field_optLateStructVal), __isset.at(26), __isset.bit(26)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i32Val_ref() && { + return {static_cast(this->__fbthrift_field_i32Val), __isset.at(26), __isset.bit(26)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal() const& { - return {this->__fbthrift_field_optLateStructVal, __isset.at(26), __isset.bit(26)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i32Val() const& { + return {this->__fbthrift_field_i32Val, __isset.at(26), __isset.bit(26)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal() const&& { - return {static_cast(this->__fbthrift_field_optLateStructVal), __isset.at(26), __isset.bit(26)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i32Val() const&& { + return {static_cast(this->__fbthrift_field_i32Val), __isset.at(26), __isset.bit(26)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal() & { - return {this->__fbthrift_field_optLateStructVal, __isset.at(26), __isset.bit(26)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i32Val() & { + return {this->__fbthrift_field_i32Val, __isset.at(26), __isset.bit(26)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optLateStructVal() && { - return {static_cast(this->__fbthrift_field_optLateStructVal), __isset.at(26), __isset.bit(26)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i32Val() && { + return {static_cast(this->__fbthrift_field_i32Val), __isset.at(26), __isset.bit(26)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optListVal_ref() const& { - return {this->__fbthrift_field_optListVal, __isset.at(27), __isset.bit(27)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i16Val_ref() const& { + return {this->__fbthrift_field_i16Val, __isset.at(27), __isset.bit(27)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optListVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optListVal), __isset.at(27), __isset.bit(27)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i16Val_ref() const&& { + return {static_cast(this->__fbthrift_field_i16Val), __isset.at(27), __isset.bit(27)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optListVal_ref() & { - return {this->__fbthrift_field_optListVal, __isset.at(27), __isset.bit(27)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i16Val_ref() & { + return {this->__fbthrift_field_i16Val, __isset.at(27), __isset.bit(27)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optListVal_ref() && { - return {static_cast(this->__fbthrift_field_optListVal), __isset.at(27), __isset.bit(27)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i16Val_ref() && { + return {static_cast(this->__fbthrift_field_i16Val), __isset.at(27), __isset.bit(27)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optListVal() const& { - return {this->__fbthrift_field_optListVal, __isset.at(27), __isset.bit(27)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i16Val() const& { + return {this->__fbthrift_field_i16Val, __isset.at(27), __isset.bit(27)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optListVal() const&& { - return {static_cast(this->__fbthrift_field_optListVal), __isset.at(27), __isset.bit(27)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i16Val() const&& { + return {static_cast(this->__fbthrift_field_i16Val), __isset.at(27), __isset.bit(27)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optListVal() & { - return {this->__fbthrift_field_optListVal, __isset.at(27), __isset.bit(27)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i16Val() & { + return {this->__fbthrift_field_i16Val, __isset.at(27), __isset.bit(27)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optListVal() && { - return {static_cast(this->__fbthrift_field_optListVal), __isset.at(27), __isset.bit(27)}; + template + FOLLY_ERASE ::apache::thrift::field_ref i16Val() && { + return {static_cast(this->__fbthrift_field_i16Val), __isset.at(27), __isset.bit(27)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optSetVal_ref() const& { - return {this->__fbthrift_field_optSetVal, __isset.at(28), __isset.bit(28)}; + template + FOLLY_ERASE ::apache::thrift::field_ref byteVal_ref() const& { + return {this->__fbthrift_field_byteVal, __isset.at(28), __isset.bit(28)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optSetVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optSetVal), __isset.at(28), __isset.bit(28)}; + template + FOLLY_ERASE ::apache::thrift::field_ref byteVal_ref() const&& { + return {static_cast(this->__fbthrift_field_byteVal), __isset.at(28), __isset.bit(28)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optSetVal_ref() & { - return {this->__fbthrift_field_optSetVal, __isset.at(28), __isset.bit(28)}; + template + FOLLY_ERASE ::apache::thrift::field_ref byteVal_ref() & { + return {this->__fbthrift_field_byteVal, __isset.at(28), __isset.bit(28)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optSetVal_ref() && { - return {static_cast(this->__fbthrift_field_optSetVal), __isset.at(28), __isset.bit(28)}; + template + FOLLY_ERASE ::apache::thrift::field_ref byteVal_ref() && { + return {static_cast(this->__fbthrift_field_byteVal), __isset.at(28), __isset.bit(28)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optSetVal() const& { - return {this->__fbthrift_field_optSetVal, __isset.at(28), __isset.bit(28)}; + template + FOLLY_ERASE ::apache::thrift::field_ref byteVal() const& { + return {this->__fbthrift_field_byteVal, __isset.at(28), __isset.bit(28)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optSetVal() const&& { - return {static_cast(this->__fbthrift_field_optSetVal), __isset.at(28), __isset.bit(28)}; + template + FOLLY_ERASE ::apache::thrift::field_ref byteVal() const&& { + return {static_cast(this->__fbthrift_field_byteVal), __isset.at(28), __isset.bit(28)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optSetVal() & { - return {this->__fbthrift_field_optSetVal, __isset.at(28), __isset.bit(28)}; + template + FOLLY_ERASE ::apache::thrift::field_ref byteVal() & { + return {this->__fbthrift_field_byteVal, __isset.at(28), __isset.bit(28)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optSetVal() && { - return {static_cast(this->__fbthrift_field_optSetVal), __isset.at(28), __isset.bit(28)}; + template + FOLLY_ERASE ::apache::thrift::field_ref byteVal() && { + return {static_cast(this->__fbthrift_field_byteVal), __isset.at(28), __isset.bit(28)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optMapVal_ref() const& { - return {this->__fbthrift_field_optMapVal, __isset.at(29), __isset.bit(29)}; + template + FOLLY_ERASE ::apache::thrift::field_ref boolVal_ref() const& { + return {this->__fbthrift_field_boolVal, __isset.at(29), __isset.bit(29)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optMapVal_ref() const&& { - return {static_cast(this->__fbthrift_field_optMapVal), __isset.at(29), __isset.bit(29)}; + template + FOLLY_ERASE ::apache::thrift::field_ref boolVal_ref() const&& { + return {static_cast(this->__fbthrift_field_boolVal), __isset.at(29), __isset.bit(29)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optMapVal_ref() & { - return {this->__fbthrift_field_optMapVal, __isset.at(29), __isset.bit(29)}; + template + FOLLY_ERASE ::apache::thrift::field_ref boolVal_ref() & { + return {this->__fbthrift_field_boolVal, __isset.at(29), __isset.bit(29)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optMapVal_ref() && { - return {static_cast(this->__fbthrift_field_optMapVal), __isset.at(29), __isset.bit(29)}; + template + FOLLY_ERASE ::apache::thrift::field_ref boolVal_ref() && { + return {static_cast(this->__fbthrift_field_boolVal), __isset.at(29), __isset.bit(29)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optMapVal() const& { - return {this->__fbthrift_field_optMapVal, __isset.at(29), __isset.bit(29)}; + template + FOLLY_ERASE ::apache::thrift::field_ref boolVal() const& { + return {this->__fbthrift_field_boolVal, __isset.at(29), __isset.bit(29)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optMapVal() const&& { - return {static_cast(this->__fbthrift_field_optMapVal), __isset.at(29), __isset.bit(29)}; + template + FOLLY_ERASE ::apache::thrift::field_ref boolVal() const&& { + return {static_cast(this->__fbthrift_field_boolVal), __isset.at(29), __isset.bit(29)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optMapVal() & { - return {this->__fbthrift_field_optMapVal, __isset.at(29), __isset.bit(29)}; + template + FOLLY_ERASE ::apache::thrift::field_ref boolVal() & { + return {this->__fbthrift_field_boolVal, __isset.at(29), __isset.bit(29)}; } - template - FOLLY_ERASE ::apache::thrift::field_ref optMapVal() && { - return {static_cast(this->__fbthrift_field_optMapVal), __isset.at(29), __isset.bit(29)}; + template + FOLLY_ERASE ::apache::thrift::field_ref boolVal() && { + return {static_cast(this->__fbthrift_field_boolVal), __isset.at(29), __isset.bit(29)}; } template diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.tcc b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.tcc index 1ffa7a2b113..c73b7a71d3e 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.tcc +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_types.tcc @@ -4870,21 +4870,21 @@ void MyStructFieldPatchStruct::readNoXfer(Protocol_* iprot) { if (UNLIKELY(!_readState.advanceToNextField( iprot, 0, - -1, + -30, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_boolVal: +_readField_optMapVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::BoolPatchAdapter, folly::remove_cvref_t__fbthrift_field_boolVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::MapPatchAdapter, folly::remove_cvref_t__fbthrift_field_optMapVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_boolVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::MapPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optMapVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::BoolPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_boolVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::BoolPatchAdapter, -1>(::std::move(tvalue), *this); + ::test::fixtures::patch::MyStructFieldN30PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optMapVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::MapPatchAdapter, -30>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -4893,22 +4893,22 @@ _readField_boolVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -1, - -2, + -30, + -29, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_byteVal: +_readField_optSetVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_byteVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::SetPatchAdapter, folly::remove_cvref_t__fbthrift_field_optSetVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_byteVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::SetPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optSetVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::BytePatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_byteVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -2>(::std::move(tvalue), *this); + ::test::fixtures::patch::MyStructFieldN29PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optSetVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::SetPatchAdapter, -29>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -4917,22 +4917,22 @@ _readField_byteVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -2, - -3, + -29, + -28, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_i16Val: +_readField_optListVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_i16Val)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::ListPatchAdapter, folly::remove_cvref_t__fbthrift_field_optListVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_i16Val); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::ListPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optListVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::I16PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_i16Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -3>(::std::move(tvalue), *this); + ::test::fixtures::patch::MyStructFieldN28PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optListVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::ListPatchAdapter, -28>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -4941,22 +4941,22 @@ _readField_i16Val: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -3, - -4, + -28, + -27, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_i32Val: +_readField_optLateStructVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_i32Val)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StructPatchAdapter, folly::remove_cvref_t__fbthrift_field_optLateStructVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_i32Val); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optLateStructVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::I32PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_i32Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -4>(::std::move(tvalue), *this); + ::test::fixtures::patch::LateDefStructPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optLateStructVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StructPatchAdapter, -27>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -4965,22 +4965,22 @@ _readField_i32Val: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -4, - -5, + -27, + -26, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_i64Val: +_readField_optStructVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_i64Val)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StructPatchAdapter, folly::remove_cvref_t__fbthrift_field_optStructVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_i64Val); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optStructVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::I64PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_i64Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -5>(::std::move(tvalue), *this); + ::test::fixtures::patch::MyDataPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optStructVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StructPatchAdapter, -26>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -4989,22 +4989,22 @@ _readField_i64Val: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -5, - -6, + -26, + -25, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_floatVal: +_readField_optEnumVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_floatVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::AssignPatchAdapter, folly::remove_cvref_t__fbthrift_field_optEnumVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_floatVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optEnumVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::FloatPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_floatVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -6>(::std::move(tvalue), *this); + ::test::fixtures::patch::MyStructFieldN25PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optEnumVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::AssignPatchAdapter, -25>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5013,22 +5013,22 @@ _readField_floatVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -6, - -7, + -25, + -24, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_doubleVal: +_readField_optBinaryVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_doubleVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::BinaryPatchAdapter, folly::remove_cvref_t__fbthrift_field_optBinaryVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_doubleVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optBinaryVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::DoublePatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_doubleVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -7>(::std::move(tvalue), *this); + ::apache::thrift::op::BinaryPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optBinaryVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5037,22 +5037,22 @@ _readField_doubleVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -7, - -8, + -24, + -23, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_stringVal: +_readField_optStringVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StringPatchAdapter, folly::remove_cvref_t__fbthrift_field_stringVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StringPatchAdapter, folly::remove_cvref_t__fbthrift_field_optStringVal)>>::value; ::folly::if_constexpr( [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_stringVal); + [&](auto&) {})(this->__fbthrift_field_optStringVal); if (!hasInplaceToThrift) { ::apache::thrift::op::StringPatchStruct tvalue; ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_stringVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StringPatchAdapter, -8>(::std::move(tvalue), *this); + this->__fbthrift_field_optStringVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StringPatchAdapter, -23>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5061,22 +5061,22 @@ _readField_stringVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -8, - -9, + -23, + -22, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_binaryVal: +_readField_optDoubleVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::BinaryPatchAdapter, folly::remove_cvref_t__fbthrift_field_binaryVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optDoubleVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_binaryVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optDoubleVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::BinaryPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_binaryVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(::std::move(tvalue), *this); + ::apache::thrift::op::DoublePatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optDoubleVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -22>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5085,22 +5085,22 @@ _readField_binaryVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -9, - -10, + -22, + -21, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_enumVal: +_readField_optFloatVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::AssignPatchAdapter, folly::remove_cvref_t__fbthrift_field_enumVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optFloatVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_enumVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optFloatVal); if (!hasInplaceToThrift) { - ::test::fixtures::patch::MyStructFieldN10PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_enumVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::AssignPatchAdapter, -10>(::std::move(tvalue), *this); + ::apache::thrift::op::FloatPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optFloatVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -21>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5109,22 +5109,22 @@ _readField_enumVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -10, - -11, + -21, + -20, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_structVal: +_readField_optI64Val: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StructPatchAdapter, folly::remove_cvref_t__fbthrift_field_structVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optI64Val)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_structVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optI64Val); if (!hasInplaceToThrift) { - ::test::fixtures::patch::MyDataPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_structVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StructPatchAdapter, -11>(::std::move(tvalue), *this); + ::apache::thrift::op::I64PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optI64Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -20>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5133,22 +5133,22 @@ _readField_structVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -11, - -12, + -20, + -19, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_unionVal: +_readField_optI32Val: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::UnionPatchAdapter, folly::remove_cvref_t__fbthrift_field_unionVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optI32Val)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::UnionPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_unionVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optI32Val); if (!hasInplaceToThrift) { - ::test::fixtures::patch::MyUnionPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_unionVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::UnionPatchAdapter, -12>(::std::move(tvalue), *this); + ::apache::thrift::op::I32PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optI32Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -19>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5157,22 +5157,22 @@ _readField_unionVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -12, - -13, + -19, + -18, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_lateStructVal: +_readField_optI16Val: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StructPatchAdapter, folly::remove_cvref_t__fbthrift_field_lateStructVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optI16Val)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_lateStructVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optI16Val); if (!hasInplaceToThrift) { - ::test::fixtures::patch::LateDefStructPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_lateStructVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StructPatchAdapter, -13>(::std::move(tvalue), *this); + ::apache::thrift::op::I16PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optI16Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -18>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5181,22 +5181,22 @@ _readField_lateStructVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -13, - -14, + -18, + -17, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_durationVal: +_readField_optByteVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::AssignPatchAdapter, folly::remove_cvref_t__fbthrift_field_durationVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optByteVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::readWithContext(*iprot, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_durationVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optByteVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::DurationStructPatch tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_durationVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::AssignPatchAdapter, -14>(::std::move(tvalue), *this); + ::apache::thrift::op::BytePatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optByteVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -17>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5205,22 +5205,22 @@ _readField_durationVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -14, - -15, + -17, + -16, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_timeVal: +_readField_optBoolVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::AssignPatchAdapter, folly::remove_cvref_t__fbthrift_field_timeVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::BoolPatchAdapter, folly::remove_cvref_t__fbthrift_field_optBoolVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::readWithContext(*iprot, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_timeVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_optBoolVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::TimeStructPatch tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_timeVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::AssignPatchAdapter, -15>(::std::move(tvalue), *this); + ::apache::thrift::op::BoolPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_optBoolVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::BoolPatchAdapter, -16>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5229,22 +5229,22 @@ _readField_timeVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -15, -16, + -15, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optBoolVal: +_readField_timeVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::BoolPatchAdapter, folly::remove_cvref_t__fbthrift_field_optBoolVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::AssignPatchAdapter, folly::remove_cvref_t__fbthrift_field_timeVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optBoolVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::readWithContext(*iprot, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_timeVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::BoolPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optBoolVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::BoolPatchAdapter, -16>(::std::move(tvalue), *this); + ::apache::thrift::op::TimeStructPatch tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_timeVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::AssignPatchAdapter, -15>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5253,22 +5253,22 @@ _readField_optBoolVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -16, - -17, + -15, + -14, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optByteVal: +_readField_durationVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optByteVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::AssignPatchAdapter, folly::remove_cvref_t__fbthrift_field_durationVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optByteVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::readWithContext(*iprot, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_durationVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::BytePatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optByteVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -17>(::std::move(tvalue), *this); + ::apache::thrift::op::DurationStructPatch tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_durationVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::AssignPatchAdapter, -14>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5277,22 +5277,22 @@ _readField_optByteVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -17, - -18, + -14, + -13, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optI16Val: +_readField_lateStructVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optI16Val)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StructPatchAdapter, folly::remove_cvref_t__fbthrift_field_lateStructVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optI16Val); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_lateStructVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::I16PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optI16Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -18>(::std::move(tvalue), *this); + ::test::fixtures::patch::LateDefStructPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_lateStructVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StructPatchAdapter, -13>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5301,22 +5301,22 @@ _readField_optI16Val: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -18, - -19, + -13, + -12, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optI32Val: +_readField_unionVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optI32Val)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::UnionPatchAdapter, folly::remove_cvref_t__fbthrift_field_unionVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optI32Val); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::UnionPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_unionVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::I32PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optI32Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -19>(::std::move(tvalue), *this); + ::test::fixtures::patch::MyUnionPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_unionVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::UnionPatchAdapter, -12>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5325,22 +5325,22 @@ _readField_optI32Val: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -19, - -20, + -12, + -11, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optI64Val: +_readField_structVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optI64Val)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StructPatchAdapter, folly::remove_cvref_t__fbthrift_field_structVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optI64Val); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_structVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::I64PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optI64Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -20>(::std::move(tvalue), *this); + ::test::fixtures::patch::MyDataPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_structVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StructPatchAdapter, -11>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5349,22 +5349,22 @@ _readField_optI64Val: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -20, - -21, + -11, + -10, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optFloatVal: +_readField_enumVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optFloatVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::AssignPatchAdapter, folly::remove_cvref_t__fbthrift_field_enumVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optFloatVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_enumVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::FloatPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optFloatVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -21>(::std::move(tvalue), *this); + ::test::fixtures::patch::MyStructFieldN10PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_enumVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::AssignPatchAdapter, -10>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5373,22 +5373,22 @@ _readField_optFloatVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -21, - -22, + -10, + -9, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optDoubleVal: +_readField_binaryVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_optDoubleVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::BinaryPatchAdapter, folly::remove_cvref_t__fbthrift_field_binaryVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optDoubleVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_binaryVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::DoublePatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optDoubleVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -22>(::std::move(tvalue), *this); + ::apache::thrift::op::BinaryPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_binaryVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::BinaryPatchAdapter, -9>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5397,22 +5397,22 @@ _readField_optDoubleVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -22, - -23, + -9, + -8, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optStringVal: +_readField_stringVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StringPatchAdapter, folly::remove_cvref_t__fbthrift_field_optStringVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StringPatchAdapter, folly::remove_cvref_t__fbthrift_field_stringVal)>>::value; ::folly::if_constexpr( [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optStringVal); + [&](auto&) {})(this->__fbthrift_field_stringVal); if (!hasInplaceToThrift) { ::apache::thrift::op::StringPatchStruct tvalue; ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optStringVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StringPatchAdapter, -23>(::std::move(tvalue), *this); + this->__fbthrift_field_stringVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StringPatchAdapter, -8>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5421,22 +5421,22 @@ _readField_optStringVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -23, - -24, + -8, + -7, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optBinaryVal: +_readField_doubleVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::BinaryPatchAdapter, folly::remove_cvref_t__fbthrift_field_optBinaryVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_doubleVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optBinaryVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_doubleVal); if (!hasInplaceToThrift) { - ::apache::thrift::op::BinaryPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optBinaryVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::BinaryPatchAdapter, -24>(::std::move(tvalue), *this); + ::apache::thrift::op::DoublePatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_doubleVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -7>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5445,22 +5445,22 @@ _readField_optBinaryVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -24, - -25, + -7, + -6, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optEnumVal: +_readField_floatVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::AssignPatchAdapter, folly::remove_cvref_t__fbthrift_field_optEnumVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_floatVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optEnumVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_floatVal); if (!hasInplaceToThrift) { - ::test::fixtures::patch::MyStructFieldN25PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optEnumVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::AssignPatchAdapter, -25>(::std::move(tvalue), *this); + ::apache::thrift::op::FloatPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_floatVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -6>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5469,22 +5469,22 @@ _readField_optEnumVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -25, - -26, + -6, + -5, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optStructVal: +_readField_i64Val: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StructPatchAdapter, folly::remove_cvref_t__fbthrift_field_optStructVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_i64Val)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optStructVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_i64Val); if (!hasInplaceToThrift) { - ::test::fixtures::patch::MyDataPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optStructVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StructPatchAdapter, -26>(::std::move(tvalue), *this); + ::apache::thrift::op::I64PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_i64Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -5>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5493,22 +5493,22 @@ _readField_optStructVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -26, - -27, + -5, + -4, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optLateStructVal: +_readField_i32Val: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::StructPatchAdapter, folly::remove_cvref_t__fbthrift_field_optLateStructVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_i32Val)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optLateStructVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_i32Val); if (!hasInplaceToThrift) { - ::test::fixtures::patch::LateDefStructPatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optLateStructVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::StructPatchAdapter, -27>(::std::move(tvalue), *this); + ::apache::thrift::op::I32PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_i32Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -4>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5517,22 +5517,22 @@ _readField_optLateStructVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -27, - -28, + -4, + -3, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optListVal: +_readField_i16Val: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::ListPatchAdapter, folly::remove_cvref_t__fbthrift_field_optListVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_i16Val)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::ListPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optListVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_i16Val); if (!hasInplaceToThrift) { - ::test::fixtures::patch::MyStructFieldN28PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optListVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::ListPatchAdapter, -28>(::std::move(tvalue), *this); + ::apache::thrift::op::I16PatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_i16Val = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -3>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5541,22 +5541,22 @@ _readField_optListVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -28, - -29, + -3, + -2, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optSetVal: +_readField_byteVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::SetPatchAdapter, folly::remove_cvref_t__fbthrift_field_optSetVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::NumberPatchAdapter, folly::remove_cvref_t__fbthrift_field_byteVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::SetPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optSetVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_byteVal); if (!hasInplaceToThrift) { - ::test::fixtures::patch::MyStructFieldN29PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optSetVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::SetPatchAdapter, -29>(::std::move(tvalue), *this); + ::apache::thrift::op::BytePatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_byteVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::NumberPatchAdapter, -2>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5565,22 +5565,22 @@ _readField_optSetVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -29, - -30, + -2, + -1, apache::thrift::protocol::T_STRUCT))) { goto _loop; } -_readField_optMapVal: +_readField_boolVal: { _readState.beforeSubobject(iprot); - constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::MapPatchAdapter, folly::remove_cvref_t__fbthrift_field_optMapVal)>>::value; + constexpr bool hasInplaceToThrift = ::apache::thrift::adapt_detail::has_inplace_toThrift<::apache::thrift::op::detail::BoolPatchAdapter, folly::remove_cvref_t__fbthrift_field_boolVal)>>::value; ::folly::if_constexpr( - [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::MapPatchAdapter::toThrift(field), _readState); }, - [&](auto&) {})(this->__fbthrift_field_optMapVal); + [&](auto& field) { ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::readWithContext(*iprot, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(field), _readState); }, + [&](auto&) {})(this->__fbthrift_field_boolVal); if (!hasInplaceToThrift) { - ::test::fixtures::patch::MyStructFieldN30PatchStruct tvalue; - ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::readWithContext(*iprot, tvalue, _readState); - this->__fbthrift_field_optMapVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::MapPatchAdapter, -30>(::std::move(tvalue), *this); + ::apache::thrift::op::BoolPatchStruct tvalue; + ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::readWithContext(*iprot, tvalue, _readState); + this->__fbthrift_field_boolVal = ::apache::thrift::adapt_detail::fromThriftField<::apache::thrift::op::detail::BoolPatchAdapter, -1>(::std::move(tvalue), *this); } _readState.afterSubobject(iprot); @@ -5589,7 +5589,7 @@ _readField_optMapVal: if (UNLIKELY(!_readState.advanceToNextField( iprot, - -30, + -1, 0, apache::thrift::protocol::T_STOP))) { goto _loop; @@ -5610,242 +5610,242 @@ _loop: } switch (_readState.fieldId) { - case -1: + case -30: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_boolVal; + goto _readField_optMapVal; } else { goto _skip; } } - case -2: + case -29: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_byteVal; + goto _readField_optSetVal; } else { goto _skip; } } - case -3: + case -28: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_i16Val; + goto _readField_optListVal; } else { goto _skip; } } - case -4: + case -27: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_i32Val; + goto _readField_optLateStructVal; } else { goto _skip; } } - case -5: + case -26: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_i64Val; + goto _readField_optStructVal; } else { goto _skip; } } - case -6: + case -25: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_floatVal; + goto _readField_optEnumVal; } else { goto _skip; } } - case -7: + case -24: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_doubleVal; + goto _readField_optBinaryVal; } else { goto _skip; } } - case -8: + case -23: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_stringVal; + goto _readField_optStringVal; } else { goto _skip; } } - case -9: + case -22: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_binaryVal; + goto _readField_optDoubleVal; } else { goto _skip; } } - case -10: + case -21: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_enumVal; + goto _readField_optFloatVal; } else { goto _skip; } } - case -11: + case -20: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_structVal; + goto _readField_optI64Val; } else { goto _skip; } } - case -12: + case -19: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_unionVal; + goto _readField_optI32Val; } else { goto _skip; } } - case -13: + case -18: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_lateStructVal; + goto _readField_optI16Val; } else { goto _skip; } } - case -14: + case -17: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_durationVal; + goto _readField_optByteVal; } else { goto _skip; } } - case -15: + case -16: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_timeVal; + goto _readField_optBoolVal; } else { goto _skip; } } - case -16: + case -15: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optBoolVal; + goto _readField_timeVal; } else { goto _skip; } } - case -17: + case -14: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optByteVal; + goto _readField_durationVal; } else { goto _skip; } } - case -18: + case -13: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optI16Val; + goto _readField_lateStructVal; } else { goto _skip; } } - case -19: + case -12: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optI32Val; + goto _readField_unionVal; } else { goto _skip; } } - case -20: + case -11: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optI64Val; + goto _readField_structVal; } else { goto _skip; } } - case -21: + case -10: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optFloatVal; + goto _readField_enumVal; } else { goto _skip; } } - case -22: + case -9: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optDoubleVal; + goto _readField_binaryVal; } else { goto _skip; } } - case -23: + case -8: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optStringVal; + goto _readField_stringVal; } else { goto _skip; } } - case -24: + case -7: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optBinaryVal; + goto _readField_doubleVal; } else { goto _skip; } } - case -25: + case -6: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optEnumVal; + goto _readField_floatVal; } else { goto _skip; } } - case -26: + case -5: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optStructVal; + goto _readField_i64Val; } else { goto _skip; } } - case -27: + case -4: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optLateStructVal; + goto _readField_i32Val; } else { goto _skip; } } - case -28: + case -3: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optListVal; + goto _readField_i16Val; } else { goto _skip; } } - case -29: + case -2: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optSetVal; + goto _readField_byteVal; } else { goto _skip; } } - case -30: + case -1: { if (LIKELY(_readState.isCompatibleWithType(iprot, apache::thrift::protocol::T_STRUCT))) { - goto _readField_optMapVal; + goto _readField_boolVal; } else { goto _skip; } @@ -5866,124 +5866,124 @@ uint32_t MyStructFieldPatchStruct::serializedSize(Protocol_ const* prot_) const uint32_t xfer = 0; xfer += prot_->serializedStructSize("MyStructFieldPatch"); { - xfer += prot_->serializedFieldSize("boolVal", apache::thrift::protocol::T_STRUCT, -1); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_boolVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_boolVal));}); - } - { - xfer += prot_->serializedFieldSize("byteVal", apache::thrift::protocol::T_STRUCT, -2); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_byteVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_byteVal));}); + xfer += prot_->serializedFieldSize("optMapVal", apache::thrift::protocol::T_STRUCT, -30); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optMapVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::MapPatchAdapter::toThrift(this->__fbthrift_field_optMapVal));}); } { - xfer += prot_->serializedFieldSize("i16Val", apache::thrift::protocol::T_STRUCT, -3); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i16Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i16Val));}); + xfer += prot_->serializedFieldSize("optSetVal", apache::thrift::protocol::T_STRUCT, -29); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optSetVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::SetPatchAdapter::toThrift(this->__fbthrift_field_optSetVal));}); } { - xfer += prot_->serializedFieldSize("i32Val", apache::thrift::protocol::T_STRUCT, -4); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i32Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i32Val));}); + xfer += prot_->serializedFieldSize("optListVal", apache::thrift::protocol::T_STRUCT, -28); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optListVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::ListPatchAdapter::toThrift(this->__fbthrift_field_optListVal));}); } { - xfer += prot_->serializedFieldSize("i64Val", apache::thrift::protocol::T_STRUCT, -5); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i64Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i64Val));}); + xfer += prot_->serializedFieldSize("optLateStructVal", apache::thrift::protocol::T_STRUCT, -27); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optLateStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optLateStructVal));}); } { - xfer += prot_->serializedFieldSize("floatVal", apache::thrift::protocol::T_STRUCT, -6); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_floatVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_floatVal));}); + xfer += prot_->serializedFieldSize("optStructVal", apache::thrift::protocol::T_STRUCT, -26); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optStructVal));}); } { - xfer += prot_->serializedFieldSize("doubleVal", apache::thrift::protocol::T_STRUCT, -7); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_doubleVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_doubleVal));}); + xfer += prot_->serializedFieldSize("optEnumVal", apache::thrift::protocol::T_STRUCT, -25); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optEnumVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_optEnumVal));}); } { - xfer += prot_->serializedFieldSize("stringVal", apache::thrift::protocol::T_STRUCT, -8); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_stringVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_stringVal));}); + xfer += prot_->serializedFieldSize("optBinaryVal", apache::thrift::protocol::T_STRUCT, -24); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optBinaryVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_optBinaryVal));}); } { - xfer += prot_->serializedFieldSize("binaryVal", apache::thrift::protocol::T_STRUCT, -9); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_binaryVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_binaryVal));}); + xfer += prot_->serializedFieldSize("optStringVal", apache::thrift::protocol::T_STRUCT, -23); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optStringVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_optStringVal));}); } { - xfer += prot_->serializedFieldSize("enumVal", apache::thrift::protocol::T_STRUCT, -10); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_enumVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_enumVal));}); + xfer += prot_->serializedFieldSize("optDoubleVal", apache::thrift::protocol::T_STRUCT, -22); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optDoubleVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optDoubleVal));}); } { - xfer += prot_->serializedFieldSize("structVal", apache::thrift::protocol::T_STRUCT, -11); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_structVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_structVal));}); + xfer += prot_->serializedFieldSize("optFloatVal", apache::thrift::protocol::T_STRUCT, -21); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optFloatVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optFloatVal));}); } { - xfer += prot_->serializedFieldSize("unionVal", apache::thrift::protocol::T_STRUCT, -12); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_unionVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::UnionPatchAdapter::toThrift(this->__fbthrift_field_unionVal));}); + xfer += prot_->serializedFieldSize("optI64Val", apache::thrift::protocol::T_STRUCT, -20); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI64Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI64Val));}); } { - xfer += prot_->serializedFieldSize("lateStructVal", apache::thrift::protocol::T_STRUCT, -13); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_lateStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_lateStructVal));}); + xfer += prot_->serializedFieldSize("optI32Val", apache::thrift::protocol::T_STRUCT, -19); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI32Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI32Val));}); } { - xfer += prot_->serializedFieldSize("durationVal", apache::thrift::protocol::T_STRUCT, -14); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_durationVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_durationVal));}); + xfer += prot_->serializedFieldSize("optI16Val", apache::thrift::protocol::T_STRUCT, -18); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI16Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI16Val));}); } { - xfer += prot_->serializedFieldSize("timeVal", apache::thrift::protocol::T_STRUCT, -15); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_timeVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_timeVal));}); + xfer += prot_->serializedFieldSize("optByteVal", apache::thrift::protocol::T_STRUCT, -17); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optByteVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optByteVal));}); } { xfer += prot_->serializedFieldSize("optBoolVal", apache::thrift::protocol::T_STRUCT, -16); xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optBoolVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_optBoolVal));}); } { - xfer += prot_->serializedFieldSize("optByteVal", apache::thrift::protocol::T_STRUCT, -17); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optByteVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optByteVal));}); + xfer += prot_->serializedFieldSize("timeVal", apache::thrift::protocol::T_STRUCT, -15); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_timeVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_timeVal));}); } { - xfer += prot_->serializedFieldSize("optI16Val", apache::thrift::protocol::T_STRUCT, -18); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI16Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI16Val));}); + xfer += prot_->serializedFieldSize("durationVal", apache::thrift::protocol::T_STRUCT, -14); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_durationVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_durationVal));}); } { - xfer += prot_->serializedFieldSize("optI32Val", apache::thrift::protocol::T_STRUCT, -19); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI32Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI32Val));}); + xfer += prot_->serializedFieldSize("lateStructVal", apache::thrift::protocol::T_STRUCT, -13); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_lateStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_lateStructVal));}); } { - xfer += prot_->serializedFieldSize("optI64Val", apache::thrift::protocol::T_STRUCT, -20); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI64Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI64Val));}); + xfer += prot_->serializedFieldSize("unionVal", apache::thrift::protocol::T_STRUCT, -12); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_unionVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::UnionPatchAdapter::toThrift(this->__fbthrift_field_unionVal));}); } { - xfer += prot_->serializedFieldSize("optFloatVal", apache::thrift::protocol::T_STRUCT, -21); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optFloatVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optFloatVal));}); + xfer += prot_->serializedFieldSize("structVal", apache::thrift::protocol::T_STRUCT, -11); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_structVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_structVal));}); } { - xfer += prot_->serializedFieldSize("optDoubleVal", apache::thrift::protocol::T_STRUCT, -22); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optDoubleVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optDoubleVal));}); + xfer += prot_->serializedFieldSize("enumVal", apache::thrift::protocol::T_STRUCT, -10); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_enumVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_enumVal));}); } { - xfer += prot_->serializedFieldSize("optStringVal", apache::thrift::protocol::T_STRUCT, -23); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optStringVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_optStringVal));}); + xfer += prot_->serializedFieldSize("binaryVal", apache::thrift::protocol::T_STRUCT, -9); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_binaryVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_binaryVal));}); } { - xfer += prot_->serializedFieldSize("optBinaryVal", apache::thrift::protocol::T_STRUCT, -24); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optBinaryVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_optBinaryVal));}); + xfer += prot_->serializedFieldSize("stringVal", apache::thrift::protocol::T_STRUCT, -8); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_stringVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_stringVal));}); } { - xfer += prot_->serializedFieldSize("optEnumVal", apache::thrift::protocol::T_STRUCT, -25); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optEnumVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_optEnumVal));}); + xfer += prot_->serializedFieldSize("doubleVal", apache::thrift::protocol::T_STRUCT, -7); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_doubleVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_doubleVal));}); } { - xfer += prot_->serializedFieldSize("optStructVal", apache::thrift::protocol::T_STRUCT, -26); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optStructVal));}); + xfer += prot_->serializedFieldSize("floatVal", apache::thrift::protocol::T_STRUCT, -6); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_floatVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_floatVal));}); } { - xfer += prot_->serializedFieldSize("optLateStructVal", apache::thrift::protocol::T_STRUCT, -27); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optLateStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optLateStructVal));}); + xfer += prot_->serializedFieldSize("i64Val", apache::thrift::protocol::T_STRUCT, -5); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i64Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i64Val));}); } { - xfer += prot_->serializedFieldSize("optListVal", apache::thrift::protocol::T_STRUCT, -28); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optListVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::ListPatchAdapter::toThrift(this->__fbthrift_field_optListVal));}); + xfer += prot_->serializedFieldSize("i32Val", apache::thrift::protocol::T_STRUCT, -4); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i32Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i32Val));}); } { - xfer += prot_->serializedFieldSize("optSetVal", apache::thrift::protocol::T_STRUCT, -29); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optSetVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::SetPatchAdapter::toThrift(this->__fbthrift_field_optSetVal));}); + xfer += prot_->serializedFieldSize("i16Val", apache::thrift::protocol::T_STRUCT, -3); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i16Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i16Val));}); } { - xfer += prot_->serializedFieldSize("optMapVal", apache::thrift::protocol::T_STRUCT, -30); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optMapVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::MapPatchAdapter::toThrift(this->__fbthrift_field_optMapVal));}); + xfer += prot_->serializedFieldSize("byteVal", apache::thrift::protocol::T_STRUCT, -2); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_byteVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_byteVal));}); + } + { + xfer += prot_->serializedFieldSize("boolVal", apache::thrift::protocol::T_STRUCT, -1); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_boolVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_boolVal));}); } xfer += prot_->serializedSizeStop(); return xfer; @@ -5994,124 +5994,124 @@ uint32_t MyStructFieldPatchStruct::serializedSizeZC(Protocol_ const* prot_) cons uint32_t xfer = 0; xfer += prot_->serializedStructSize("MyStructFieldPatch"); { - xfer += prot_->serializedFieldSize("boolVal", apache::thrift::protocol::T_STRUCT, -1); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_boolVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_boolVal));}); - } - { - xfer += prot_->serializedFieldSize("byteVal", apache::thrift::protocol::T_STRUCT, -2); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_byteVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_byteVal));}); + xfer += prot_->serializedFieldSize("optMapVal", apache::thrift::protocol::T_STRUCT, -30); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optMapVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::MapPatchAdapter::toThrift(this->__fbthrift_field_optMapVal));}); } { - xfer += prot_->serializedFieldSize("i16Val", apache::thrift::protocol::T_STRUCT, -3); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i16Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i16Val));}); + xfer += prot_->serializedFieldSize("optSetVal", apache::thrift::protocol::T_STRUCT, -29); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optSetVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::SetPatchAdapter::toThrift(this->__fbthrift_field_optSetVal));}); } { - xfer += prot_->serializedFieldSize("i32Val", apache::thrift::protocol::T_STRUCT, -4); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i32Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i32Val));}); + xfer += prot_->serializedFieldSize("optListVal", apache::thrift::protocol::T_STRUCT, -28); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optListVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::ListPatchAdapter::toThrift(this->__fbthrift_field_optListVal));}); } { - xfer += prot_->serializedFieldSize("i64Val", apache::thrift::protocol::T_STRUCT, -5); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i64Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i64Val));}); + xfer += prot_->serializedFieldSize("optLateStructVal", apache::thrift::protocol::T_STRUCT, -27); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optLateStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optLateStructVal));}); } { - xfer += prot_->serializedFieldSize("floatVal", apache::thrift::protocol::T_STRUCT, -6); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_floatVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_floatVal));}); + xfer += prot_->serializedFieldSize("optStructVal", apache::thrift::protocol::T_STRUCT, -26); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optStructVal));}); } { - xfer += prot_->serializedFieldSize("doubleVal", apache::thrift::protocol::T_STRUCT, -7); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_doubleVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_doubleVal));}); + xfer += prot_->serializedFieldSize("optEnumVal", apache::thrift::protocol::T_STRUCT, -25); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optEnumVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_optEnumVal));}); } { - xfer += prot_->serializedFieldSize("stringVal", apache::thrift::protocol::T_STRUCT, -8); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_stringVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_stringVal));}); + xfer += prot_->serializedFieldSize("optBinaryVal", apache::thrift::protocol::T_STRUCT, -24); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optBinaryVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_optBinaryVal));}); } { - xfer += prot_->serializedFieldSize("binaryVal", apache::thrift::protocol::T_STRUCT, -9); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_binaryVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_binaryVal));}); + xfer += prot_->serializedFieldSize("optStringVal", apache::thrift::protocol::T_STRUCT, -23); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optStringVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_optStringVal));}); } { - xfer += prot_->serializedFieldSize("enumVal", apache::thrift::protocol::T_STRUCT, -10); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_enumVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_enumVal));}); + xfer += prot_->serializedFieldSize("optDoubleVal", apache::thrift::protocol::T_STRUCT, -22); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optDoubleVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optDoubleVal));}); } { - xfer += prot_->serializedFieldSize("structVal", apache::thrift::protocol::T_STRUCT, -11); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_structVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_structVal));}); + xfer += prot_->serializedFieldSize("optFloatVal", apache::thrift::protocol::T_STRUCT, -21); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optFloatVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optFloatVal));}); } { - xfer += prot_->serializedFieldSize("unionVal", apache::thrift::protocol::T_STRUCT, -12); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_unionVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::UnionPatchAdapter::toThrift(this->__fbthrift_field_unionVal));}); + xfer += prot_->serializedFieldSize("optI64Val", apache::thrift::protocol::T_STRUCT, -20); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI64Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI64Val));}); } { - xfer += prot_->serializedFieldSize("lateStructVal", apache::thrift::protocol::T_STRUCT, -13); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_lateStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_lateStructVal));}); + xfer += prot_->serializedFieldSize("optI32Val", apache::thrift::protocol::T_STRUCT, -19); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI32Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI32Val));}); } { - xfer += prot_->serializedFieldSize("durationVal", apache::thrift::protocol::T_STRUCT, -14); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_durationVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_durationVal));}); + xfer += prot_->serializedFieldSize("optI16Val", apache::thrift::protocol::T_STRUCT, -18); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI16Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI16Val));}); } { - xfer += prot_->serializedFieldSize("timeVal", apache::thrift::protocol::T_STRUCT, -15); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_timeVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_timeVal));}); + xfer += prot_->serializedFieldSize("optByteVal", apache::thrift::protocol::T_STRUCT, -17); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optByteVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optByteVal));}); } { xfer += prot_->serializedFieldSize("optBoolVal", apache::thrift::protocol::T_STRUCT, -16); xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optBoolVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_optBoolVal));}); } { - xfer += prot_->serializedFieldSize("optByteVal", apache::thrift::protocol::T_STRUCT, -17); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optByteVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optByteVal));}); + xfer += prot_->serializedFieldSize("timeVal", apache::thrift::protocol::T_STRUCT, -15); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_timeVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_timeVal));}); } { - xfer += prot_->serializedFieldSize("optI16Val", apache::thrift::protocol::T_STRUCT, -18); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI16Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI16Val));}); + xfer += prot_->serializedFieldSize("durationVal", apache::thrift::protocol::T_STRUCT, -14); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_durationVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_durationVal));}); } { - xfer += prot_->serializedFieldSize("optI32Val", apache::thrift::protocol::T_STRUCT, -19); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI32Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI32Val));}); + xfer += prot_->serializedFieldSize("lateStructVal", apache::thrift::protocol::T_STRUCT, -13); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_lateStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_lateStructVal));}); } { - xfer += prot_->serializedFieldSize("optI64Val", apache::thrift::protocol::T_STRUCT, -20); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optI64Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI64Val));}); + xfer += prot_->serializedFieldSize("unionVal", apache::thrift::protocol::T_STRUCT, -12); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_unionVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::UnionPatchAdapter::toThrift(this->__fbthrift_field_unionVal));}); } { - xfer += prot_->serializedFieldSize("optFloatVal", apache::thrift::protocol::T_STRUCT, -21); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optFloatVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optFloatVal));}); + xfer += prot_->serializedFieldSize("structVal", apache::thrift::protocol::T_STRUCT, -11); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_structVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_structVal));}); } { - xfer += prot_->serializedFieldSize("optDoubleVal", apache::thrift::protocol::T_STRUCT, -22); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optDoubleVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optDoubleVal));}); + xfer += prot_->serializedFieldSize("enumVal", apache::thrift::protocol::T_STRUCT, -10); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_enumVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_enumVal));}); } { - xfer += prot_->serializedFieldSize("optStringVal", apache::thrift::protocol::T_STRUCT, -23); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optStringVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_optStringVal));}); + xfer += prot_->serializedFieldSize("binaryVal", apache::thrift::protocol::T_STRUCT, -9); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_binaryVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_binaryVal));}); } { - xfer += prot_->serializedFieldSize("optBinaryVal", apache::thrift::protocol::T_STRUCT, -24); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optBinaryVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_optBinaryVal));}); + xfer += prot_->serializedFieldSize("stringVal", apache::thrift::protocol::T_STRUCT, -8); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_stringVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_stringVal));}); } { - xfer += prot_->serializedFieldSize("optEnumVal", apache::thrift::protocol::T_STRUCT, -25); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optEnumVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_optEnumVal));}); + xfer += prot_->serializedFieldSize("doubleVal", apache::thrift::protocol::T_STRUCT, -7); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_doubleVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_doubleVal));}); } { - xfer += prot_->serializedFieldSize("optStructVal", apache::thrift::protocol::T_STRUCT, -26); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optStructVal));}); + xfer += prot_->serializedFieldSize("floatVal", apache::thrift::protocol::T_STRUCT, -6); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_floatVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_floatVal));}); } { - xfer += prot_->serializedFieldSize("optLateStructVal", apache::thrift::protocol::T_STRUCT, -27); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optLateStructVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optLateStructVal));}); + xfer += prot_->serializedFieldSize("i64Val", apache::thrift::protocol::T_STRUCT, -5); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i64Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i64Val));}); } { - xfer += prot_->serializedFieldSize("optListVal", apache::thrift::protocol::T_STRUCT, -28); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optListVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::ListPatchAdapter::toThrift(this->__fbthrift_field_optListVal));}); + xfer += prot_->serializedFieldSize("i32Val", apache::thrift::protocol::T_STRUCT, -4); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i32Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i32Val));}); } { - xfer += prot_->serializedFieldSize("optSetVal", apache::thrift::protocol::T_STRUCT, -29); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optSetVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::SetPatchAdapter::toThrift(this->__fbthrift_field_optSetVal));}); + xfer += prot_->serializedFieldSize("i16Val", apache::thrift::protocol::T_STRUCT, -3); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_i16Val, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i16Val));}); } { - xfer += prot_->serializedFieldSize("optMapVal", apache::thrift::protocol::T_STRUCT, -30); - xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_optMapVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::MapPatchAdapter::toThrift(this->__fbthrift_field_optMapVal));}); + xfer += prot_->serializedFieldSize("byteVal", apache::thrift::protocol::T_STRUCT, -2); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_byteVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_byteVal));}); + } + { + xfer += prot_->serializedFieldSize("boolVal", apache::thrift::protocol::T_STRUCT, -1); + xfer += ::apache::thrift::adapt_detail::serializedSize(*prot_, this->__fbthrift_field_boolVal, [&] {return ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::serializedSize(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_boolVal));}); } xfer += prot_->serializedSizeStop(); return xfer; @@ -6124,212 +6124,212 @@ uint32_t MyStructFieldPatchStruct::write(Protocol_* prot_) const { bool previousFieldHasValue = true; { constexpr int16_t kPrevFieldId = 0; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "boolVal", previousFieldHasValue); + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optMapVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::write(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_boolVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::write(*prot_, ::apache::thrift::op::detail::MapPatchAdapter::toThrift(this->__fbthrift_field_optMapVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -1; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "byteVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -30; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optSetVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_byteVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::write(*prot_, ::apache::thrift::op::detail::SetPatchAdapter::toThrift(this->__fbthrift_field_optSetVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -2; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "i16Val", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -29; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optListVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i16Val)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::write(*prot_, ::apache::thrift::op::detail::ListPatchAdapter::toThrift(this->__fbthrift_field_optListVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -3; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "i32Val", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -28; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optLateStructVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i32Val)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optLateStructVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -4; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "i64Val", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -27; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optStructVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i64Val)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optStructVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -5; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "floatVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -26; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optEnumVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_floatVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::write(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_optEnumVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -6; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "doubleVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -25; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optBinaryVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_doubleVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::write(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_optBinaryVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -7; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "stringVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -24; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optStringVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_stringVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_optStringVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -8; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "binaryVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -23; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optDoubleVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::write(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_binaryVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optDoubleVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -9; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "enumVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -22; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optFloatVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::write(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_enumVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optFloatVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -10; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "structVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -21; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optI64Val", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_structVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI64Val)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -11; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "unionVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -20; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optI32Val", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::write(*prot_, ::apache::thrift::op::detail::UnionPatchAdapter::toThrift(this->__fbthrift_field_unionVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI32Val)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -12; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "lateStructVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -19; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optI16Val", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_lateStructVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI16Val)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -13; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "durationVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -18; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optByteVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::write(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_durationVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optByteVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -14; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "timeVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -17; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optBoolVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::write(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_timeVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::write(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_optBoolVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -15; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optBoolVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -16; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "timeVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::write(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_optBoolVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::TimeStructPatch>::write(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_timeVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -16; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optByteVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -15; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "durationVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optByteVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DurationStructPatch>::write(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_durationVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -17; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optI16Val", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -14; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "lateStructVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI16Val)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_lateStructVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -18; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optI32Val", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -13; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "unionVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI32Val)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyUnionPatchStruct>::write(*prot_, ::apache::thrift::op::detail::UnionPatchAdapter::toThrift(this->__fbthrift_field_unionVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -19; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optI64Val", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -12; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "structVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optI64Val)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_structVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -20; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optFloatVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -11; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "enumVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optFloatVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN10PatchStruct>::write(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_enumVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -21; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optDoubleVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -10; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "binaryVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_optDoubleVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::write(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_binaryVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -22; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optStringVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -9; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "stringVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_optStringVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::StringPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StringPatchAdapter::toThrift(this->__fbthrift_field_stringVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -23; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optBinaryVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -8; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "doubleVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BinaryPatchStruct>::write(*prot_, ::apache::thrift::op::detail::BinaryPatchAdapter::toThrift(this->__fbthrift_field_optBinaryVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::DoublePatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_doubleVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -24; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optEnumVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -7; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "floatVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN25PatchStruct>::write(*prot_, ::apache::thrift::op::detail::AssignPatchAdapter::toThrift(this->__fbthrift_field_optEnumVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::FloatPatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_floatVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -25; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optStructVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -6; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "i64Val", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyDataPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optStructVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I64PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i64Val)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -26; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optLateStructVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -5; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "i32Val", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::LateDefStructPatchStruct>::write(*prot_, ::apache::thrift::op::detail::StructPatchAdapter::toThrift(this->__fbthrift_field_optLateStructVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I32PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i32Val)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -27; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optListVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -4; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "i16Val", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN28PatchStruct>::write(*prot_, ::apache::thrift::op::detail::ListPatchAdapter::toThrift(this->__fbthrift_field_optListVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::I16PatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_i16Val)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -28; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optSetVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -3; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "byteVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN29PatchStruct>::write(*prot_, ::apache::thrift::op::detail::SetPatchAdapter::toThrift(this->__fbthrift_field_optSetVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BytePatchStruct>::write(*prot_, ::apache::thrift::op::detail::NumberPatchAdapter::toThrift(this->__fbthrift_field_byteVal)); xfer += prot_->writeFieldEnd(); } { - constexpr int16_t kPrevFieldId = -29; - xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "optMapVal", previousFieldHasValue); + constexpr int16_t kPrevFieldId = -2; + xfer += ::apache::thrift::detail::writeFieldBegin(*prot_, "boolVal", previousFieldHasValue); previousFieldHasValue = true; - xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::test::fixtures::patch::MyStructFieldN30PatchStruct>::write(*prot_, ::apache::thrift::op::detail::MapPatchAdapter::toThrift(this->__fbthrift_field_optMapVal)); + xfer += ::apache::thrift::detail::pm::protocol_methods<::apache::thrift::type_class::structure, ::apache::thrift::op::BoolPatchStruct>::write(*prot_, ::apache::thrift::op::detail::BoolPatchAdapter::toThrift(this->__fbthrift_field_boolVal)); xfer += prot_->writeFieldEnd(); } xfer += prot_->writeFieldStop(); diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_visit_by_thrift_field_metadata.h b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_visit_by_thrift_field_metadata.h index a931b87bb54..3c0565c299b 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_visit_by_thrift_field_metadata.h +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-cpp2/module_visit_by_thrift_field_metadata.h @@ -378,66 +378,66 @@ struct VisitByFieldId<::test::fixtures::patch::MyStructFieldPatchStruct> { template void operator()(FOLLY_MAYBE_UNUSED F&& f, int32_t fieldId, FOLLY_MAYBE_UNUSED T&& t) const { switch (fieldId) { - case -1: - return f(0, static_cast(t).boolVal_ref()); - case -2: - return f(1, static_cast(t).byteVal_ref()); - case -3: - return f(2, static_cast(t).i16Val_ref()); - case -4: - return f(3, static_cast(t).i32Val_ref()); - case -5: - return f(4, static_cast(t).i64Val_ref()); - case -6: - return f(5, static_cast(t).floatVal_ref()); - case -7: - return f(6, static_cast(t).doubleVal_ref()); - case -8: - return f(7, static_cast(t).stringVal_ref()); - case -9: - return f(8, static_cast(t).binaryVal_ref()); - case -10: - return f(9, static_cast(t).enumVal_ref()); - case -11: - return f(10, static_cast(t).structVal_ref()); - case -12: - return f(11, static_cast(t).unionVal_ref()); - case -13: - return f(12, static_cast(t).lateStructVal_ref()); - case -14: - return f(13, static_cast(t).durationVal_ref()); - case -15: - return f(14, static_cast(t).timeVal_ref()); - case -16: - return f(15, static_cast(t).optBoolVal_ref()); - case -17: - return f(16, static_cast(t).optByteVal_ref()); - case -18: - return f(17, static_cast(t).optI16Val_ref()); - case -19: - return f(18, static_cast(t).optI32Val_ref()); - case -20: - return f(19, static_cast(t).optI64Val_ref()); - case -21: - return f(20, static_cast(t).optFloatVal_ref()); - case -22: - return f(21, static_cast(t).optDoubleVal_ref()); - case -23: - return f(22, static_cast(t).optStringVal_ref()); - case -24: - return f(23, static_cast(t).optBinaryVal_ref()); - case -25: - return f(24, static_cast(t).optEnumVal_ref()); - case -26: - return f(25, static_cast(t).optStructVal_ref()); - case -27: - return f(26, static_cast(t).optLateStructVal_ref()); - case -28: - return f(27, static_cast(t).optListVal_ref()); - case -29: - return f(28, static_cast(t).optSetVal_ref()); case -30: - return f(29, static_cast(t).optMapVal_ref()); + return f(0, static_cast(t).optMapVal_ref()); + case -29: + return f(1, static_cast(t).optSetVal_ref()); + case -28: + return f(2, static_cast(t).optListVal_ref()); + case -27: + return f(3, static_cast(t).optLateStructVal_ref()); + case -26: + return f(4, static_cast(t).optStructVal_ref()); + case -25: + return f(5, static_cast(t).optEnumVal_ref()); + case -24: + return f(6, static_cast(t).optBinaryVal_ref()); + case -23: + return f(7, static_cast(t).optStringVal_ref()); + case -22: + return f(8, static_cast(t).optDoubleVal_ref()); + case -21: + return f(9, static_cast(t).optFloatVal_ref()); + case -20: + return f(10, static_cast(t).optI64Val_ref()); + case -19: + return f(11, static_cast(t).optI32Val_ref()); + case -18: + return f(12, static_cast(t).optI16Val_ref()); + case -17: + return f(13, static_cast(t).optByteVal_ref()); + case -16: + return f(14, static_cast(t).optBoolVal_ref()); + case -15: + return f(15, static_cast(t).timeVal_ref()); + case -14: + return f(16, static_cast(t).durationVal_ref()); + case -13: + return f(17, static_cast(t).lateStructVal_ref()); + case -12: + return f(18, static_cast(t).unionVal_ref()); + case -11: + return f(19, static_cast(t).structVal_ref()); + case -10: + return f(20, static_cast(t).enumVal_ref()); + case -9: + return f(21, static_cast(t).binaryVal_ref()); + case -8: + return f(22, static_cast(t).stringVal_ref()); + case -7: + return f(23, static_cast(t).doubleVal_ref()); + case -6: + return f(24, static_cast(t).floatVal_ref()); + case -5: + return f(25, static_cast(t).i64Val_ref()); + case -4: + return f(26, static_cast(t).i32Val_ref()); + case -3: + return f(27, static_cast(t).i16Val_ref()); + case -2: + return f(28, static_cast(t).byteVal_ref()); + case -1: + return f(29, static_cast(t).boolVal_ref()); default: throwInvalidThriftId(fieldId, "::test::fixtures::patch::MyStructFieldPatchStruct"); } diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-go/module/ttypes.go b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-go/module/ttypes.go index 8fff2312e1a..18fe603db54 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-go/module/ttypes.go +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-go/module/ttypes.go @@ -3855,780 +3855,473 @@ func (p *MyUnionPatch) String() string { } // Attributes: -// - BoolVal -// - ByteVal -// - I16Val -// - I32Val -// - I64Val -// - FloatVal -// - DoubleVal -// - StringVal -// - BinaryVal -// - EnumVal -// - StructVal -// - UnionVal -// - LateStructVal -// - DurationVal -// - TimeVal -// - OptBoolVal -// - OptByteVal -// - OptI16Val -// - OptI32Val -// - OptI64Val -// - OptFloatVal -// - OptDoubleVal -// - OptStringVal -// - OptBinaryVal -// - OptEnumVal -// - OptStructVal -// - OptLateStructVal -// - OptListVal -// - OptSetVal -// - OptMapVal -type MyStructFieldPatch struct { - BoolVal *patch1.BoolPatch - ByteVal *patch1.BytePatch - I16Val *patch1.I16Patch - I32Val *patch1.I32Patch - I64Val *patch1.I64Patch - FloatVal *patch1.FloatPatch - DoubleVal *patch1.DoublePatch - StringVal *patch1.StringPatch - BinaryVal *patch1.BinaryPatch - EnumVal *MyStructFieldN10Patch - StructVal *MyDataPatch - UnionVal *MyUnionPatch - LateStructVal *LateDefStructPatch - DurationVal *patch1.DurationPatch - TimeVal *patch1.TimePatch - OptBoolVal *patch1.BoolPatch - OptByteVal *patch1.BytePatch - OptI16Val *patch1.I16Patch - OptI32Val *patch1.I32Patch - OptI64Val *patch1.I64Patch - OptFloatVal *patch1.FloatPatch - OptDoubleVal *patch1.DoublePatch - OptStringVal *patch1.StringPatch - OptBinaryVal *patch1.BinaryPatch - OptEnumVal *MyStructFieldN25Patch - OptStructVal *MyDataPatch - OptLateStructVal *LateDefStructPatch - OptListVal *MyStructFieldN28Patch - OptSetVal *MyStructFieldN29Patch - OptMapVal *MyStructFieldN30Patch +// - Assign: Assigns a value. If set, all other operations are ignored. +// - Clear: Clears a value. Applies first. +type MyStructFieldN10Patch struct { + Assign *MyEnum `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` + Clear bool `thrift:"clear,2" db:"clear" json:"clear"` } -func NewMyStructFieldPatch() *MyStructFieldPatch { - return &MyStructFieldPatch{ - BoolVal: patch1.NewBoolPatch(), - ByteVal: patch1.NewBytePatch(), - I16Val: patch1.NewI16Patch(), - I32Val: patch1.NewI32Patch(), - I64Val: patch1.NewI64Patch(), - FloatVal: patch1.NewFloatPatch(), - DoubleVal: patch1.NewDoublePatch(), - StringVal: patch1.NewStringPatch(), - BinaryVal: patch1.NewBinaryPatch(), - EnumVal: NewMyStructFieldN10Patch(), - StructVal: NewMyDataPatch(), - UnionVal: NewMyUnionPatch(), - LateStructVal: NewLateDefStructPatch(), - DurationVal: patch1.NewDurationPatch(), - TimeVal: patch1.NewTimePatch(), - OptBoolVal: patch1.NewBoolPatch(), - OptByteVal: patch1.NewBytePatch(), - OptI16Val: patch1.NewI16Patch(), - OptI32Val: patch1.NewI32Patch(), - OptI64Val: patch1.NewI64Patch(), - OptFloatVal: patch1.NewFloatPatch(), - OptDoubleVal: patch1.NewDoublePatch(), - OptStringVal: patch1.NewStringPatch(), - OptBinaryVal: patch1.NewBinaryPatch(), - OptEnumVal: NewMyStructFieldN25Patch(), - OptStructVal: NewMyDataPatch(), - OptLateStructVal: NewLateDefStructPatch(), - OptListVal: NewMyStructFieldN28Patch(), - OptSetVal: NewMyStructFieldN29Patch(), - OptMapVal: NewMyStructFieldN30Patch(), - } +func NewMyStructFieldN10Patch() *MyStructFieldN10Patch { + return &MyStructFieldN10Patch{} } -var MyStructFieldPatch_BoolVal_DEFAULT *patch1.BoolPatch -func (p *MyStructFieldPatch) GetBoolVal() *patch1.BoolPatch { - if !p.IsSetBoolVal() { - return MyStructFieldPatch_BoolVal_DEFAULT +var MyStructFieldN10Patch_Assign_DEFAULT MyEnum +func (p *MyStructFieldN10Patch) GetAssign() MyEnum { + if !p.IsSetAssign() { + return MyStructFieldN10Patch_Assign_DEFAULT } -return p.BoolVal +return *p.Assign } -var MyStructFieldPatch_ByteVal_DEFAULT *patch1.BytePatch -func (p *MyStructFieldPatch) GetByteVal() *patch1.BytePatch { - if !p.IsSetByteVal() { - return MyStructFieldPatch_ByteVal_DEFAULT - } -return p.ByteVal + +func (p *MyStructFieldN10Patch) GetClear() bool { + return p.Clear } -var MyStructFieldPatch_I16Val_DEFAULT *patch1.I16Patch -func (p *MyStructFieldPatch) GetI16Val() *patch1.I16Patch { - if !p.IsSetI16Val() { - return MyStructFieldPatch_I16Val_DEFAULT - } -return p.I16Val +func (p *MyStructFieldN10Patch) IsSetAssign() bool { + return p != nil && p.Assign != nil } -var MyStructFieldPatch_I32Val_DEFAULT *patch1.I32Patch -func (p *MyStructFieldPatch) GetI32Val() *patch1.I32Patch { - if !p.IsSetI32Val() { - return MyStructFieldPatch_I32Val_DEFAULT - } -return p.I32Val + +type MyStructFieldN10PatchBuilder struct { + obj *MyStructFieldN10Patch } -var MyStructFieldPatch_I64Val_DEFAULT *patch1.I64Patch -func (p *MyStructFieldPatch) GetI64Val() *patch1.I64Patch { - if !p.IsSetI64Val() { - return MyStructFieldPatch_I64Val_DEFAULT + +func NewMyStructFieldN10PatchBuilder() *MyStructFieldN10PatchBuilder{ + return &MyStructFieldN10PatchBuilder{ + obj: NewMyStructFieldN10Patch(), } -return p.I64Val } -var MyStructFieldPatch_FloatVal_DEFAULT *patch1.FloatPatch -func (p *MyStructFieldPatch) GetFloatVal() *patch1.FloatPatch { - if !p.IsSetFloatVal() { - return MyStructFieldPatch_FloatVal_DEFAULT + +func (p MyStructFieldN10PatchBuilder) Emit() *MyStructFieldN10Patch{ + return &MyStructFieldN10Patch{ + Assign: p.obj.Assign, + Clear: p.obj.Clear, } -return p.FloatVal } -var MyStructFieldPatch_DoubleVal_DEFAULT *patch1.DoublePatch -func (p *MyStructFieldPatch) GetDoubleVal() *patch1.DoublePatch { - if !p.IsSetDoubleVal() { - return MyStructFieldPatch_DoubleVal_DEFAULT - } -return p.DoubleVal + +func (m *MyStructFieldN10PatchBuilder) Assign(assign *MyEnum) *MyStructFieldN10PatchBuilder { + m.obj.Assign = assign + return m } -var MyStructFieldPatch_StringVal_DEFAULT *patch1.StringPatch -func (p *MyStructFieldPatch) GetStringVal() *patch1.StringPatch { - if !p.IsSetStringVal() { - return MyStructFieldPatch_StringVal_DEFAULT - } -return p.StringVal + +func (m *MyStructFieldN10PatchBuilder) Clear(clear bool) *MyStructFieldN10PatchBuilder { + m.obj.Clear = clear + return m } -var MyStructFieldPatch_BinaryVal_DEFAULT *patch1.BinaryPatch -func (p *MyStructFieldPatch) GetBinaryVal() *patch1.BinaryPatch { - if !p.IsSetBinaryVal() { - return MyStructFieldPatch_BinaryVal_DEFAULT - } -return p.BinaryVal + +func (m *MyStructFieldN10Patch) SetAssign(assign *MyEnum) *MyStructFieldN10Patch { + m.Assign = assign + return m } -var MyStructFieldPatch_EnumVal_DEFAULT *MyStructFieldN10Patch -func (p *MyStructFieldPatch) GetEnumVal() *MyStructFieldN10Patch { - if !p.IsSetEnumVal() { - return MyStructFieldPatch_EnumVal_DEFAULT - } -return p.EnumVal + +func (m *MyStructFieldN10Patch) SetClear(clear bool) *MyStructFieldN10Patch { + m.Clear = clear + return m } -var MyStructFieldPatch_StructVal_DEFAULT *MyDataPatch -func (p *MyStructFieldPatch) GetStructVal() *MyDataPatch { - if !p.IsSetStructVal() { - return MyStructFieldPatch_StructVal_DEFAULT + +func (p *MyStructFieldN10Patch) Read(iprot thrift.Protocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } -return p.StructVal -} -var MyStructFieldPatch_UnionVal_DEFAULT *MyUnionPatch -func (p *MyStructFieldPatch) GetUnionVal() *MyUnionPatch { - if !p.IsSetUnionVal() { - return MyStructFieldPatch_UnionVal_DEFAULT + + + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } } -return p.UnionVal -} -var MyStructFieldPatch_LateStructVal_DEFAULT *LateDefStructPatch -func (p *MyStructFieldPatch) GetLateStructVal() *LateDefStructPatch { - if !p.IsSetLateStructVal() { - return MyStructFieldPatch_LateStructVal_DEFAULT + if err := iprot.ReadStructEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } -return p.LateStructVal + return nil } -var MyStructFieldPatch_DurationVal_DEFAULT *patch1.DurationPatch -func (p *MyStructFieldPatch) GetDurationVal() *patch1.DurationPatch { - if !p.IsSetDurationVal() { - return MyStructFieldPatch_DurationVal_DEFAULT + +func (p *MyStructFieldN10Patch) ReadField1(iprot thrift.Protocol) error { + if v, err := iprot.ReadI32(); err != nil { + return thrift.PrependError("error reading field 1: ", err) + } else { + temp := MyEnum(v) + p.Assign = &temp } -return p.DurationVal -} -var MyStructFieldPatch_TimeVal_DEFAULT *patch1.TimePatch -func (p *MyStructFieldPatch) GetTimeVal() *patch1.TimePatch { - if !p.IsSetTimeVal() { - return MyStructFieldPatch_TimeVal_DEFAULT - } -return p.TimeVal -} -var MyStructFieldPatch_OptBoolVal_DEFAULT *patch1.BoolPatch -func (p *MyStructFieldPatch) GetOptBoolVal() *patch1.BoolPatch { - if !p.IsSetOptBoolVal() { - return MyStructFieldPatch_OptBoolVal_DEFAULT - } -return p.OptBoolVal -} -var MyStructFieldPatch_OptByteVal_DEFAULT *patch1.BytePatch -func (p *MyStructFieldPatch) GetOptByteVal() *patch1.BytePatch { - if !p.IsSetOptByteVal() { - return MyStructFieldPatch_OptByteVal_DEFAULT - } -return p.OptByteVal -} -var MyStructFieldPatch_OptI16Val_DEFAULT *patch1.I16Patch -func (p *MyStructFieldPatch) GetOptI16Val() *patch1.I16Patch { - if !p.IsSetOptI16Val() { - return MyStructFieldPatch_OptI16Val_DEFAULT - } -return p.OptI16Val -} -var MyStructFieldPatch_OptI32Val_DEFAULT *patch1.I32Patch -func (p *MyStructFieldPatch) GetOptI32Val() *patch1.I32Patch { - if !p.IsSetOptI32Val() { - return MyStructFieldPatch_OptI32Val_DEFAULT - } -return p.OptI32Val -} -var MyStructFieldPatch_OptI64Val_DEFAULT *patch1.I64Patch -func (p *MyStructFieldPatch) GetOptI64Val() *patch1.I64Patch { - if !p.IsSetOptI64Val() { - return MyStructFieldPatch_OptI64Val_DEFAULT - } -return p.OptI64Val -} -var MyStructFieldPatch_OptFloatVal_DEFAULT *patch1.FloatPatch -func (p *MyStructFieldPatch) GetOptFloatVal() *patch1.FloatPatch { - if !p.IsSetOptFloatVal() { - return MyStructFieldPatch_OptFloatVal_DEFAULT - } -return p.OptFloatVal -} -var MyStructFieldPatch_OptDoubleVal_DEFAULT *patch1.DoublePatch -func (p *MyStructFieldPatch) GetOptDoubleVal() *patch1.DoublePatch { - if !p.IsSetOptDoubleVal() { - return MyStructFieldPatch_OptDoubleVal_DEFAULT - } -return p.OptDoubleVal -} -var MyStructFieldPatch_OptStringVal_DEFAULT *patch1.StringPatch -func (p *MyStructFieldPatch) GetOptStringVal() *patch1.StringPatch { - if !p.IsSetOptStringVal() { - return MyStructFieldPatch_OptStringVal_DEFAULT - } -return p.OptStringVal -} -var MyStructFieldPatch_OptBinaryVal_DEFAULT *patch1.BinaryPatch -func (p *MyStructFieldPatch) GetOptBinaryVal() *patch1.BinaryPatch { - if !p.IsSetOptBinaryVal() { - return MyStructFieldPatch_OptBinaryVal_DEFAULT - } -return p.OptBinaryVal -} -var MyStructFieldPatch_OptEnumVal_DEFAULT *MyStructFieldN25Patch -func (p *MyStructFieldPatch) GetOptEnumVal() *MyStructFieldN25Patch { - if !p.IsSetOptEnumVal() { - return MyStructFieldPatch_OptEnumVal_DEFAULT - } -return p.OptEnumVal -} -var MyStructFieldPatch_OptStructVal_DEFAULT *MyDataPatch -func (p *MyStructFieldPatch) GetOptStructVal() *MyDataPatch { - if !p.IsSetOptStructVal() { - return MyStructFieldPatch_OptStructVal_DEFAULT - } -return p.OptStructVal -} -var MyStructFieldPatch_OptLateStructVal_DEFAULT *LateDefStructPatch -func (p *MyStructFieldPatch) GetOptLateStructVal() *LateDefStructPatch { - if !p.IsSetOptLateStructVal() { - return MyStructFieldPatch_OptLateStructVal_DEFAULT - } -return p.OptLateStructVal -} -var MyStructFieldPatch_OptListVal_DEFAULT *MyStructFieldN28Patch -func (p *MyStructFieldPatch) GetOptListVal() *MyStructFieldN28Patch { - if !p.IsSetOptListVal() { - return MyStructFieldPatch_OptListVal_DEFAULT - } -return p.OptListVal -} -var MyStructFieldPatch_OptSetVal_DEFAULT *MyStructFieldN29Patch -func (p *MyStructFieldPatch) GetOptSetVal() *MyStructFieldN29Patch { - if !p.IsSetOptSetVal() { - return MyStructFieldPatch_OptSetVal_DEFAULT - } -return p.OptSetVal -} -var MyStructFieldPatch_OptMapVal_DEFAULT *MyStructFieldN30Patch -func (p *MyStructFieldPatch) GetOptMapVal() *MyStructFieldN30Patch { - if !p.IsSetOptMapVal() { - return MyStructFieldPatch_OptMapVal_DEFAULT - } -return p.OptMapVal -} -func (p *MyStructFieldPatch) IsSetBoolVal() bool { - return p != nil && p.BoolVal != nil + return nil } -func (p *MyStructFieldPatch) IsSetByteVal() bool { - return p != nil && p.ByteVal != nil +func (p *MyStructFieldN10Patch) ReadField2(iprot thrift.Protocol) error { + if v, err := iprot.ReadBool(); err != nil { + return thrift.PrependError("error reading field 2: ", err) + } else { + p.Clear = v + } + return nil } -func (p *MyStructFieldPatch) IsSetI16Val() bool { - return p != nil && p.I16Val != nil +func (p *MyStructFieldN10Patch) Write(oprot thrift.Protocol) error { + if err := oprot.WriteStructBegin("MyStructFieldN10Patch"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } + if err := oprot.WriteFieldStop(); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil } -func (p *MyStructFieldPatch) IsSetI32Val() bool { - return p != nil && p.I32Val != nil +func (p *MyStructFieldN10Patch) writeField1(oprot thrift.Protocol) (err error) { + if p.IsSetAssign() { + if err := oprot.WriteFieldBegin("assign", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assign: ", p), err) } + if err := oprot.WriteI32(int32(*p.Assign)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.assign (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assign: ", p), err) } + } + return err } -func (p *MyStructFieldPatch) IsSetI64Val() bool { - return p != nil && p.I64Val != nil +func (p *MyStructFieldN10Patch) writeField2(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("clear", thrift.BOOL, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clear: ", p), err) } + if err := oprot.WriteBool(bool(p.Clear)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.clear (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clear: ", p), err) } + return err } -func (p *MyStructFieldPatch) IsSetFloatVal() bool { - return p != nil && p.FloatVal != nil -} +func (p *MyStructFieldN10Patch) String() string { + if p == nil { + return "" + } -func (p *MyStructFieldPatch) IsSetDoubleVal() bool { - return p != nil && p.DoubleVal != nil + var assignVal string + if p.Assign == nil { + assignVal = "" + } else { + assignVal = fmt.Sprintf("%v", *p.Assign) + } + clearVal := fmt.Sprintf("%v", p.Clear) + return fmt.Sprintf("MyStructFieldN10Patch({Assign:%s Clear:%s})", assignVal, clearVal) } -func (p *MyStructFieldPatch) IsSetStringVal() bool { - return p != nil && p.StringVal != nil +// Attributes: +// - Assign: Assigns a value. If set, all other operations are ignored. +// - Clear: Clears a value. Applies first. +type MyStructFieldN25Patch struct { + Assign *MyEnum `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` + Clear bool `thrift:"clear,2" db:"clear" json:"clear"` } -func (p *MyStructFieldPatch) IsSetBinaryVal() bool { - return p != nil && p.BinaryVal != nil +func NewMyStructFieldN25Patch() *MyStructFieldN25Patch { + return &MyStructFieldN25Patch{} } -func (p *MyStructFieldPatch) IsSetEnumVal() bool { - return p != nil && p.EnumVal != nil +var MyStructFieldN25Patch_Assign_DEFAULT MyEnum +func (p *MyStructFieldN25Patch) GetAssign() MyEnum { + if !p.IsSetAssign() { + return MyStructFieldN25Patch_Assign_DEFAULT + } +return *p.Assign } -func (p *MyStructFieldPatch) IsSetStructVal() bool { - return p != nil && p.StructVal != nil +func (p *MyStructFieldN25Patch) GetClear() bool { + return p.Clear } - -func (p *MyStructFieldPatch) IsSetUnionVal() bool { - return p != nil && p.UnionVal != nil +func (p *MyStructFieldN25Patch) IsSetAssign() bool { + return p != nil && p.Assign != nil } -func (p *MyStructFieldPatch) IsSetLateStructVal() bool { - return p != nil && p.LateStructVal != nil +type MyStructFieldN25PatchBuilder struct { + obj *MyStructFieldN25Patch } -func (p *MyStructFieldPatch) IsSetDurationVal() bool { - return p != nil && p.DurationVal != nil +func NewMyStructFieldN25PatchBuilder() *MyStructFieldN25PatchBuilder{ + return &MyStructFieldN25PatchBuilder{ + obj: NewMyStructFieldN25Patch(), + } } -func (p *MyStructFieldPatch) IsSetTimeVal() bool { - return p != nil && p.TimeVal != nil +func (p MyStructFieldN25PatchBuilder) Emit() *MyStructFieldN25Patch{ + return &MyStructFieldN25Patch{ + Assign: p.obj.Assign, + Clear: p.obj.Clear, + } } -func (p *MyStructFieldPatch) IsSetOptBoolVal() bool { - return p != nil && p.OptBoolVal != nil +func (m *MyStructFieldN25PatchBuilder) Assign(assign *MyEnum) *MyStructFieldN25PatchBuilder { + m.obj.Assign = assign + return m } -func (p *MyStructFieldPatch) IsSetOptByteVal() bool { - return p != nil && p.OptByteVal != nil +func (m *MyStructFieldN25PatchBuilder) Clear(clear bool) *MyStructFieldN25PatchBuilder { + m.obj.Clear = clear + return m } -func (p *MyStructFieldPatch) IsSetOptI16Val() bool { - return p != nil && p.OptI16Val != nil +func (m *MyStructFieldN25Patch) SetAssign(assign *MyEnum) *MyStructFieldN25Patch { + m.Assign = assign + return m } -func (p *MyStructFieldPatch) IsSetOptI32Val() bool { - return p != nil && p.OptI32Val != nil +func (m *MyStructFieldN25Patch) SetClear(clear bool) *MyStructFieldN25Patch { + m.Clear = clear + return m } -func (p *MyStructFieldPatch) IsSetOptI64Val() bool { - return p != nil && p.OptI64Val != nil -} +func (p *MyStructFieldN25Patch) Read(iprot thrift.Protocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } -func (p *MyStructFieldPatch) IsSetOptFloatVal() bool { - return p != nil && p.OptFloatVal != nil -} -func (p *MyStructFieldPatch) IsSetOptDoubleVal() bool { - return p != nil && p.OptDoubleVal != nil -} + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } + } + if err := iprot.ReadStructEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) + } + return nil +} -func (p *MyStructFieldPatch) IsSetOptStringVal() bool { - return p != nil && p.OptStringVal != nil +func (p *MyStructFieldN25Patch) ReadField1(iprot thrift.Protocol) error { + if v, err := iprot.ReadI32(); err != nil { + return thrift.PrependError("error reading field 1: ", err) + } else { + temp := MyEnum(v) + p.Assign = &temp + } + return nil } -func (p *MyStructFieldPatch) IsSetOptBinaryVal() bool { - return p != nil && p.OptBinaryVal != nil +func (p *MyStructFieldN25Patch) ReadField2(iprot thrift.Protocol) error { + if v, err := iprot.ReadBool(); err != nil { + return thrift.PrependError("error reading field 2: ", err) + } else { + p.Clear = v + } + return nil } -func (p *MyStructFieldPatch) IsSetOptEnumVal() bool { - return p != nil && p.OptEnumVal != nil +func (p *MyStructFieldN25Patch) Write(oprot thrift.Protocol) error { + if err := oprot.WriteStructBegin("MyStructFieldN25Patch"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } + if err := oprot.WriteFieldStop(); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil } -func (p *MyStructFieldPatch) IsSetOptStructVal() bool { - return p != nil && p.OptStructVal != nil +func (p *MyStructFieldN25Patch) writeField1(oprot thrift.Protocol) (err error) { + if p.IsSetAssign() { + if err := oprot.WriteFieldBegin("assign", thrift.I32, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assign: ", p), err) } + if err := oprot.WriteI32(int32(*p.Assign)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.assign (1) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assign: ", p), err) } + } + return err } -func (p *MyStructFieldPatch) IsSetOptLateStructVal() bool { - return p != nil && p.OptLateStructVal != nil +func (p *MyStructFieldN25Patch) writeField2(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("clear", thrift.BOOL, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clear: ", p), err) } + if err := oprot.WriteBool(bool(p.Clear)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.clear (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clear: ", p), err) } + return err } -func (p *MyStructFieldPatch) IsSetOptListVal() bool { - return p != nil && p.OptListVal != nil +func (p *MyStructFieldN25Patch) String() string { + if p == nil { + return "" + } + + var assignVal string + if p.Assign == nil { + assignVal = "" + } else { + assignVal = fmt.Sprintf("%v", *p.Assign) + } + clearVal := fmt.Sprintf("%v", p.Clear) + return fmt.Sprintf("MyStructFieldN25Patch({Assign:%s Clear:%s})", assignVal, clearVal) } -func (p *MyStructFieldPatch) IsSetOptSetVal() bool { - return p != nil && p.OptSetVal != nil +// Attributes: +// - Assign: Assigns a value. If set, all other operations are ignored. +// - Clear: Clears a value. Applies first. +// - Patch: Patches list values by index. Applies second. +// - Remove: Removes entries, if present. Applies third. +// - Prepend: Prepends to the front of a given list. +// - Append: Appends to the back of a given list. +type MyStructFieldN28Patch struct { + Assign []int16 `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` + Clear bool `thrift:"clear,2" db:"clear" json:"clear"` + Patch map[int32]*patch1.I16Patch `thrift:"patch,3" db:"patch" json:"patch"` + // unused fields # 4 to 6 + Remove []int16 `thrift:"remove,7" db:"remove" json:"remove"` + Prepend []int16 `thrift:"prepend,8" db:"prepend" json:"prepend"` + Append []int16 `thrift:"append,9" db:"append" json:"append"` } -func (p *MyStructFieldPatch) IsSetOptMapVal() bool { - return p != nil && p.OptMapVal != nil +func NewMyStructFieldN28Patch() *MyStructFieldN28Patch { + return &MyStructFieldN28Patch{} } -type MyStructFieldPatchBuilder struct { - obj *MyStructFieldPatch +var MyStructFieldN28Patch_Assign_DEFAULT []int16 + +func (p *MyStructFieldN28Patch) GetAssign() []int16 { + return p.Assign } -func NewMyStructFieldPatchBuilder() *MyStructFieldPatchBuilder{ - return &MyStructFieldPatchBuilder{ - obj: NewMyStructFieldPatch(), - } +func (p *MyStructFieldN28Patch) GetClear() bool { + return p.Clear } -func (p MyStructFieldPatchBuilder) Emit() *MyStructFieldPatch{ - return &MyStructFieldPatch{ - BoolVal: p.obj.BoolVal, - ByteVal: p.obj.ByteVal, - I16Val: p.obj.I16Val, - I32Val: p.obj.I32Val, - I64Val: p.obj.I64Val, - FloatVal: p.obj.FloatVal, - DoubleVal: p.obj.DoubleVal, - StringVal: p.obj.StringVal, - BinaryVal: p.obj.BinaryVal, - EnumVal: p.obj.EnumVal, - StructVal: p.obj.StructVal, - UnionVal: p.obj.UnionVal, - LateStructVal: p.obj.LateStructVal, - DurationVal: p.obj.DurationVal, - TimeVal: p.obj.TimeVal, - OptBoolVal: p.obj.OptBoolVal, - OptByteVal: p.obj.OptByteVal, - OptI16Val: p.obj.OptI16Val, - OptI32Val: p.obj.OptI32Val, - OptI64Val: p.obj.OptI64Val, - OptFloatVal: p.obj.OptFloatVal, - OptDoubleVal: p.obj.OptDoubleVal, - OptStringVal: p.obj.OptStringVal, - OptBinaryVal: p.obj.OptBinaryVal, - OptEnumVal: p.obj.OptEnumVal, - OptStructVal: p.obj.OptStructVal, - OptLateStructVal: p.obj.OptLateStructVal, - OptListVal: p.obj.OptListVal, - OptSetVal: p.obj.OptSetVal, - OptMapVal: p.obj.OptMapVal, - } +func (p *MyStructFieldN28Patch) GetPatch() map[int32]*patch1.I16Patch { + return p.Patch } -func (m *MyStructFieldPatchBuilder) BoolVal(boolVal *patch1.BoolPatch) *MyStructFieldPatchBuilder { - m.obj.BoolVal = boolVal - return m +func (p *MyStructFieldN28Patch) GetRemove() []int16 { + return p.Remove } -func (m *MyStructFieldPatchBuilder) ByteVal(byteVal *patch1.BytePatch) *MyStructFieldPatchBuilder { - m.obj.ByteVal = byteVal - return m +func (p *MyStructFieldN28Patch) GetPrepend() []int16 { + return p.Prepend } -func (m *MyStructFieldPatchBuilder) I16Val(i16Val *patch1.I16Patch) *MyStructFieldPatchBuilder { - m.obj.I16Val = i16Val - return m +func (p *MyStructFieldN28Patch) GetAppend() []int16 { + return p.Append +} +func (p *MyStructFieldN28Patch) IsSetAssign() bool { + return p != nil && p.Assign != nil } -func (m *MyStructFieldPatchBuilder) I32Val(i32Val *patch1.I32Patch) *MyStructFieldPatchBuilder { - m.obj.I32Val = i32Val - return m +type MyStructFieldN28PatchBuilder struct { + obj *MyStructFieldN28Patch } -func (m *MyStructFieldPatchBuilder) I64Val(i64Val *patch1.I64Patch) *MyStructFieldPatchBuilder { - m.obj.I64Val = i64Val - return m +func NewMyStructFieldN28PatchBuilder() *MyStructFieldN28PatchBuilder{ + return &MyStructFieldN28PatchBuilder{ + obj: NewMyStructFieldN28Patch(), + } } -func (m *MyStructFieldPatchBuilder) FloatVal(floatVal *patch1.FloatPatch) *MyStructFieldPatchBuilder { - m.obj.FloatVal = floatVal - return m +func (p MyStructFieldN28PatchBuilder) Emit() *MyStructFieldN28Patch{ + return &MyStructFieldN28Patch{ + Assign: p.obj.Assign, + Clear: p.obj.Clear, + Patch: p.obj.Patch, + Remove: p.obj.Remove, + Prepend: p.obj.Prepend, + Append: p.obj.Append, + } } -func (m *MyStructFieldPatchBuilder) DoubleVal(doubleVal *patch1.DoublePatch) *MyStructFieldPatchBuilder { - m.obj.DoubleVal = doubleVal +func (m *MyStructFieldN28PatchBuilder) Assign(assign []int16) *MyStructFieldN28PatchBuilder { + m.obj.Assign = assign return m } -func (m *MyStructFieldPatchBuilder) StringVal(stringVal *patch1.StringPatch) *MyStructFieldPatchBuilder { - m.obj.StringVal = stringVal +func (m *MyStructFieldN28PatchBuilder) Clear(clear bool) *MyStructFieldN28PatchBuilder { + m.obj.Clear = clear return m } -func (m *MyStructFieldPatchBuilder) BinaryVal(binaryVal *patch1.BinaryPatch) *MyStructFieldPatchBuilder { - m.obj.BinaryVal = binaryVal +func (m *MyStructFieldN28PatchBuilder) Patch(patch map[int32]*patch1.I16Patch) *MyStructFieldN28PatchBuilder { + m.obj.Patch = patch return m } -func (m *MyStructFieldPatchBuilder) EnumVal(enumVal *MyStructFieldN10Patch) *MyStructFieldPatchBuilder { - m.obj.EnumVal = enumVal +func (m *MyStructFieldN28PatchBuilder) Remove(remove []int16) *MyStructFieldN28PatchBuilder { + m.obj.Remove = remove return m } -func (m *MyStructFieldPatchBuilder) StructVal(structVal *MyDataPatch) *MyStructFieldPatchBuilder { - m.obj.StructVal = structVal +func (m *MyStructFieldN28PatchBuilder) Prepend(prepend []int16) *MyStructFieldN28PatchBuilder { + m.obj.Prepend = prepend return m } -func (m *MyStructFieldPatchBuilder) UnionVal(unionVal *MyUnionPatch) *MyStructFieldPatchBuilder { - m.obj.UnionVal = unionVal +func (m *MyStructFieldN28PatchBuilder) Append(append []int16) *MyStructFieldN28PatchBuilder { + m.obj.Append = append return m } -func (m *MyStructFieldPatchBuilder) LateStructVal(lateStructVal *LateDefStructPatch) *MyStructFieldPatchBuilder { - m.obj.LateStructVal = lateStructVal +func (m *MyStructFieldN28Patch) SetAssign(assign []int16) *MyStructFieldN28Patch { + m.Assign = assign return m } -func (m *MyStructFieldPatchBuilder) DurationVal(durationVal *patch1.DurationPatch) *MyStructFieldPatchBuilder { - m.obj.DurationVal = durationVal +func (m *MyStructFieldN28Patch) SetClear(clear bool) *MyStructFieldN28Patch { + m.Clear = clear return m } -func (m *MyStructFieldPatchBuilder) TimeVal(timeVal *patch1.TimePatch) *MyStructFieldPatchBuilder { - m.obj.TimeVal = timeVal +func (m *MyStructFieldN28Patch) SetPatch(patch map[int32]*patch1.I16Patch) *MyStructFieldN28Patch { + m.Patch = patch return m } -func (m *MyStructFieldPatchBuilder) OptBoolVal(optBoolVal *patch1.BoolPatch) *MyStructFieldPatchBuilder { - m.obj.OptBoolVal = optBoolVal +func (m *MyStructFieldN28Patch) SetRemove(remove []int16) *MyStructFieldN28Patch { + m.Remove = remove return m } -func (m *MyStructFieldPatchBuilder) OptByteVal(optByteVal *patch1.BytePatch) *MyStructFieldPatchBuilder { - m.obj.OptByteVal = optByteVal +func (m *MyStructFieldN28Patch) SetPrepend(prepend []int16) *MyStructFieldN28Patch { + m.Prepend = prepend return m } -func (m *MyStructFieldPatchBuilder) OptI16Val(optI16Val *patch1.I16Patch) *MyStructFieldPatchBuilder { - m.obj.OptI16Val = optI16Val +func (m *MyStructFieldN28Patch) SetAppend(append []int16) *MyStructFieldN28Patch { + m.Append = append return m } -func (m *MyStructFieldPatchBuilder) OptI32Val(optI32Val *patch1.I32Patch) *MyStructFieldPatchBuilder { - m.obj.OptI32Val = optI32Val - return m -} - -func (m *MyStructFieldPatchBuilder) OptI64Val(optI64Val *patch1.I64Patch) *MyStructFieldPatchBuilder { - m.obj.OptI64Val = optI64Val - return m -} - -func (m *MyStructFieldPatchBuilder) OptFloatVal(optFloatVal *patch1.FloatPatch) *MyStructFieldPatchBuilder { - m.obj.OptFloatVal = optFloatVal - return m -} - -func (m *MyStructFieldPatchBuilder) OptDoubleVal(optDoubleVal *patch1.DoublePatch) *MyStructFieldPatchBuilder { - m.obj.OptDoubleVal = optDoubleVal - return m -} - -func (m *MyStructFieldPatchBuilder) OptStringVal(optStringVal *patch1.StringPatch) *MyStructFieldPatchBuilder { - m.obj.OptStringVal = optStringVal - return m -} - -func (m *MyStructFieldPatchBuilder) OptBinaryVal(optBinaryVal *patch1.BinaryPatch) *MyStructFieldPatchBuilder { - m.obj.OptBinaryVal = optBinaryVal - return m -} - -func (m *MyStructFieldPatchBuilder) OptEnumVal(optEnumVal *MyStructFieldN25Patch) *MyStructFieldPatchBuilder { - m.obj.OptEnumVal = optEnumVal - return m -} - -func (m *MyStructFieldPatchBuilder) OptStructVal(optStructVal *MyDataPatch) *MyStructFieldPatchBuilder { - m.obj.OptStructVal = optStructVal - return m -} - -func (m *MyStructFieldPatchBuilder) OptLateStructVal(optLateStructVal *LateDefStructPatch) *MyStructFieldPatchBuilder { - m.obj.OptLateStructVal = optLateStructVal - return m -} - -func (m *MyStructFieldPatchBuilder) OptListVal(optListVal *MyStructFieldN28Patch) *MyStructFieldPatchBuilder { - m.obj.OptListVal = optListVal - return m -} - -func (m *MyStructFieldPatchBuilder) OptSetVal(optSetVal *MyStructFieldN29Patch) *MyStructFieldPatchBuilder { - m.obj.OptSetVal = optSetVal - return m -} - -func (m *MyStructFieldPatchBuilder) OptMapVal(optMapVal *MyStructFieldN30Patch) *MyStructFieldPatchBuilder { - m.obj.OptMapVal = optMapVal - return m -} - -func (m *MyStructFieldPatch) SetBoolVal(boolVal *patch1.BoolPatch) *MyStructFieldPatch { - m.BoolVal = boolVal - return m -} - -func (m *MyStructFieldPatch) SetByteVal(byteVal *patch1.BytePatch) *MyStructFieldPatch { - m.ByteVal = byteVal - return m -} - -func (m *MyStructFieldPatch) SetI16Val(i16Val *patch1.I16Patch) *MyStructFieldPatch { - m.I16Val = i16Val - return m -} - -func (m *MyStructFieldPatch) SetI32Val(i32Val *patch1.I32Patch) *MyStructFieldPatch { - m.I32Val = i32Val - return m -} - -func (m *MyStructFieldPatch) SetI64Val(i64Val *patch1.I64Patch) *MyStructFieldPatch { - m.I64Val = i64Val - return m -} - -func (m *MyStructFieldPatch) SetFloatVal(floatVal *patch1.FloatPatch) *MyStructFieldPatch { - m.FloatVal = floatVal - return m -} - -func (m *MyStructFieldPatch) SetDoubleVal(doubleVal *patch1.DoublePatch) *MyStructFieldPatch { - m.DoubleVal = doubleVal - return m -} - -func (m *MyStructFieldPatch) SetStringVal(stringVal *patch1.StringPatch) *MyStructFieldPatch { - m.StringVal = stringVal - return m -} - -func (m *MyStructFieldPatch) SetBinaryVal(binaryVal *patch1.BinaryPatch) *MyStructFieldPatch { - m.BinaryVal = binaryVal - return m -} - -func (m *MyStructFieldPatch) SetEnumVal(enumVal *MyStructFieldN10Patch) *MyStructFieldPatch { - m.EnumVal = enumVal - return m -} - -func (m *MyStructFieldPatch) SetStructVal(structVal *MyDataPatch) *MyStructFieldPatch { - m.StructVal = structVal - return m -} - -func (m *MyStructFieldPatch) SetUnionVal(unionVal *MyUnionPatch) *MyStructFieldPatch { - m.UnionVal = unionVal - return m -} - -func (m *MyStructFieldPatch) SetLateStructVal(lateStructVal *LateDefStructPatch) *MyStructFieldPatch { - m.LateStructVal = lateStructVal - return m -} - -func (m *MyStructFieldPatch) SetDurationVal(durationVal *patch1.DurationPatch) *MyStructFieldPatch { - m.DurationVal = durationVal - return m -} - -func (m *MyStructFieldPatch) SetTimeVal(timeVal *patch1.TimePatch) *MyStructFieldPatch { - m.TimeVal = timeVal - return m -} - -func (m *MyStructFieldPatch) SetOptBoolVal(optBoolVal *patch1.BoolPatch) *MyStructFieldPatch { - m.OptBoolVal = optBoolVal - return m -} - -func (m *MyStructFieldPatch) SetOptByteVal(optByteVal *patch1.BytePatch) *MyStructFieldPatch { - m.OptByteVal = optByteVal - return m -} - -func (m *MyStructFieldPatch) SetOptI16Val(optI16Val *patch1.I16Patch) *MyStructFieldPatch { - m.OptI16Val = optI16Val - return m -} - -func (m *MyStructFieldPatch) SetOptI32Val(optI32Val *patch1.I32Patch) *MyStructFieldPatch { - m.OptI32Val = optI32Val - return m -} - -func (m *MyStructFieldPatch) SetOptI64Val(optI64Val *patch1.I64Patch) *MyStructFieldPatch { - m.OptI64Val = optI64Val - return m -} - -func (m *MyStructFieldPatch) SetOptFloatVal(optFloatVal *patch1.FloatPatch) *MyStructFieldPatch { - m.OptFloatVal = optFloatVal - return m -} - -func (m *MyStructFieldPatch) SetOptDoubleVal(optDoubleVal *patch1.DoublePatch) *MyStructFieldPatch { - m.OptDoubleVal = optDoubleVal - return m -} - -func (m *MyStructFieldPatch) SetOptStringVal(optStringVal *patch1.StringPatch) *MyStructFieldPatch { - m.OptStringVal = optStringVal - return m -} - -func (m *MyStructFieldPatch) SetOptBinaryVal(optBinaryVal *patch1.BinaryPatch) *MyStructFieldPatch { - m.OptBinaryVal = optBinaryVal - return m -} - -func (m *MyStructFieldPatch) SetOptEnumVal(optEnumVal *MyStructFieldN25Patch) *MyStructFieldPatch { - m.OptEnumVal = optEnumVal - return m -} - -func (m *MyStructFieldPatch) SetOptStructVal(optStructVal *MyDataPatch) *MyStructFieldPatch { - m.OptStructVal = optStructVal - return m -} - -func (m *MyStructFieldPatch) SetOptLateStructVal(optLateStructVal *LateDefStructPatch) *MyStructFieldPatch { - m.OptLateStructVal = optLateStructVal - return m -} - -func (m *MyStructFieldPatch) SetOptListVal(optListVal *MyStructFieldN28Patch) *MyStructFieldPatch { - m.OptListVal = optListVal - return m -} - -func (m *MyStructFieldPatch) SetOptSetVal(optSetVal *MyStructFieldN29Patch) *MyStructFieldPatch { - m.OptSetVal = optSetVal - return m -} - -func (m *MyStructFieldPatch) SetOptMapVal(optMapVal *MyStructFieldN30Patch) *MyStructFieldPatch { - m.OptMapVal = optMapVal - return m -} - -func (p *MyStructFieldPatch) Read(iprot thrift.Protocol) error { +func (p *MyStructFieldN28Patch) Read(iprot thrift.Protocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -4641,128 +4334,32 @@ func (p *MyStructFieldPatch) Read(iprot thrift.Protocol) error { } if fieldTypeId == thrift.STOP { break; } switch fieldId { - case -1: - if err := p.ReadField_1(iprot); err != nil { - return err - } - case -2: - if err := p.ReadField_2(iprot); err != nil { - return err - } - case -3: - if err := p.ReadField_3(iprot); err != nil { - return err - } - case -4: - if err := p.ReadField_4(iprot); err != nil { - return err - } - case -5: - if err := p.ReadField_5(iprot); err != nil { + case 1: + if err := p.ReadField1(iprot); err != nil { return err } - case -6: - if err := p.ReadField_6(iprot); err != nil { + case 2: + if err := p.ReadField2(iprot); err != nil { return err } - case -7: - if err := p.ReadField_7(iprot); err != nil { + case 3: + if err := p.ReadField3(iprot); err != nil { return err } - case -8: - if err := p.ReadField_8(iprot); err != nil { + case 7: + if err := p.ReadField7(iprot); err != nil { return err } - case -9: - if err := p.ReadField_9(iprot); err != nil { + case 8: + if err := p.ReadField8(iprot); err != nil { return err } - case -10: - if err := p.ReadField_10(iprot); err != nil { + case 9: + if err := p.ReadField9(iprot); err != nil { return err } - case -11: - if err := p.ReadField_11(iprot); err != nil { - return err - } - case -12: - if err := p.ReadField_12(iprot); err != nil { - return err - } - case -13: - if err := p.ReadField_13(iprot); err != nil { - return err - } - case -14: - if err := p.ReadField_14(iprot); err != nil { - return err - } - case -15: - if err := p.ReadField_15(iprot); err != nil { - return err - } - case -16: - if err := p.ReadField_16(iprot); err != nil { - return err - } - case -17: - if err := p.ReadField_17(iprot); err != nil { - return err - } - case -18: - if err := p.ReadField_18(iprot); err != nil { - return err - } - case -19: - if err := p.ReadField_19(iprot); err != nil { - return err - } - case -20: - if err := p.ReadField_20(iprot); err != nil { - return err - } - case -21: - if err := p.ReadField_21(iprot); err != nil { - return err - } - case -22: - if err := p.ReadField_22(iprot); err != nil { - return err - } - case -23: - if err := p.ReadField_23(iprot); err != nil { - return err - } - case -24: - if err := p.ReadField_24(iprot); err != nil { - return err - } - case -25: - if err := p.ReadField_25(iprot); err != nil { - return err - } - case -26: - if err := p.ReadField_26(iprot); err != nil { - return err - } - case -27: - if err := p.ReadField_27(iprot); err != nil { - return err - } - case -28: - if err := p.ReadField_28(iprot); err != nil { - return err - } - case -29: - if err := p.ReadField_29(iprot); err != nil { - return err - } - case -30: - if err := p.ReadField_30(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { + default: + if err := iprot.Skip(fieldTypeId); err != nil { return err } } @@ -4776,872 +4373,713 @@ func (p *MyStructFieldPatch) Read(iprot thrift.Protocol) error { return nil } -func (p *MyStructFieldPatch) ReadField_1(iprot thrift.Protocol) error { - p.BoolVal = patch1.NewBoolPatch() - if err := p.BoolVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.BoolVal), err) +func (p *MyStructFieldN28Patch) ReadField1(iprot thrift.Protocol) error { + _, size, err := iprot.ReadListBegin() + if err != nil { + return thrift.PrependError("error reading list begin: ", err) } - return nil -} - -func (p *MyStructFieldPatch) ReadField_2(iprot thrift.Protocol) error { - p.ByteVal = patch1.NewBytePatch() - if err := p.ByteVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ByteVal), err) + tSlice := make([]int16, 0, size) + p.Assign = tSlice + for i := 0; i < size; i ++ { + var _elem7 int16 + if v, err := iprot.ReadI16(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _elem7 = v + } + p.Assign = append(p.Assign, _elem7) } - return nil -} - -func (p *MyStructFieldPatch) ReadField_3(iprot thrift.Protocol) error { - p.I16Val = patch1.NewI16Patch() - if err := p.I16Val.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.I16Val), err) + if err := iprot.ReadListEnd(); err != nil { + return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *MyStructFieldPatch) ReadField_4(iprot thrift.Protocol) error { - p.I32Val = patch1.NewI32Patch() - if err := p.I32Val.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.I32Val), err) +func (p *MyStructFieldN28Patch) ReadField2(iprot thrift.Protocol) error { + if v, err := iprot.ReadBool(); err != nil { + return thrift.PrependError("error reading field 2: ", err) + } else { + p.Clear = v } return nil } -func (p *MyStructFieldPatch) ReadField_5(iprot thrift.Protocol) error { - p.I64Val = patch1.NewI64Patch() - if err := p.I64Val.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.I64Val), err) +func (p *MyStructFieldN28Patch) ReadField3(iprot thrift.Protocol) error { + _, _, size, err := iprot.ReadMapBegin() + if err != nil { + return thrift.PrependError("error reading map begin: ", err) } - return nil -} - -func (p *MyStructFieldPatch) ReadField_6(iprot thrift.Protocol) error { - p.FloatVal = patch1.NewFloatPatch() - if err := p.FloatVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FloatVal), err) + tMap := make(map[int32]*patch1.I16Patch, size) + p.Patch = tMap + for i := 0; i < size; i ++ { + var _key8 int32 + if v, err := iprot.ReadI32(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _key8 = v + } + _val9 := patch1.NewI16Patch() + if err := _val9.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _val9), err) + } + p.Patch[_key8] = _val9 } - return nil -} - -func (p *MyStructFieldPatch) ReadField_7(iprot thrift.Protocol) error { - p.DoubleVal = patch1.NewDoublePatch() - if err := p.DoubleVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DoubleVal), err) + if err := iprot.ReadMapEnd(); err != nil { + return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *MyStructFieldPatch) ReadField_8(iprot thrift.Protocol) error { - p.StringVal = patch1.NewStringPatch() - if err := p.StringVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.StringVal), err) +func (p *MyStructFieldN28Patch) ReadField7(iprot thrift.Protocol) error { + _, size, err := iprot.ReadListBegin() + if err != nil { + return thrift.PrependError("error reading list begin: ", err) } - return nil -} - -func (p *MyStructFieldPatch) ReadField_9(iprot thrift.Protocol) error { - p.BinaryVal = patch1.NewBinaryPatch() - if err := p.BinaryVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.BinaryVal), err) + tSlice := make([]int16, 0, size) + p.Remove = tSlice + for i := 0; i < size; i ++ { + var _elem10 int16 + if v, err := iprot.ReadI16(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _elem10 = v + } + p.Remove = append(p.Remove, _elem10) } - return nil -} - -func (p *MyStructFieldPatch) ReadField_10(iprot thrift.Protocol) error { - p.EnumVal = NewMyStructFieldN10Patch() - if err := p.EnumVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.EnumVal), err) + if err := iprot.ReadListEnd(); err != nil { + return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *MyStructFieldPatch) ReadField_11(iprot thrift.Protocol) error { - p.StructVal = NewMyDataPatch() - if err := p.StructVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.StructVal), err) +func (p *MyStructFieldN28Patch) ReadField8(iprot thrift.Protocol) error { + _, size, err := iprot.ReadListBegin() + if err != nil { + return thrift.PrependError("error reading list begin: ", err) } - return nil -} - -func (p *MyStructFieldPatch) ReadField_12(iprot thrift.Protocol) error { - p.UnionVal = NewMyUnionPatch() - if err := p.UnionVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.UnionVal), err) + tSlice := make([]int16, 0, size) + p.Prepend = tSlice + for i := 0; i < size; i ++ { + var _elem11 int16 + if v, err := iprot.ReadI16(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _elem11 = v + } + p.Prepend = append(p.Prepend, _elem11) } - return nil -} - -func (p *MyStructFieldPatch) ReadField_13(iprot thrift.Protocol) error { - p.LateStructVal = NewLateDefStructPatch() - if err := p.LateStructVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LateStructVal), err) + if err := iprot.ReadListEnd(); err != nil { + return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *MyStructFieldPatch) ReadField_14(iprot thrift.Protocol) error { - p.DurationVal = patch1.NewDurationPatch() - if err := p.DurationVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DurationVal), err) +func (p *MyStructFieldN28Patch) ReadField9(iprot thrift.Protocol) error { + _, size, err := iprot.ReadListBegin() + if err != nil { + return thrift.PrependError("error reading list begin: ", err) } - return nil -} - -func (p *MyStructFieldPatch) ReadField_15(iprot thrift.Protocol) error { - p.TimeVal = patch1.NewTimePatch() - if err := p.TimeVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimeVal), err) + tSlice := make([]int16, 0, size) + p.Append = tSlice + for i := 0; i < size; i ++ { + var _elem12 int16 + if v, err := iprot.ReadI16(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _elem12 = v + } + p.Append = append(p.Append, _elem12) + } + if err := iprot.ReadListEnd(); err != nil { + return thrift.PrependError("error reading list end: ", err) } return nil } -func (p *MyStructFieldPatch) ReadField_16(iprot thrift.Protocol) error { - p.OptBoolVal = patch1.NewBoolPatch() - if err := p.OptBoolVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptBoolVal), err) - } +func (p *MyStructFieldN28Patch) Write(oprot thrift.Protocol) error { + if err := oprot.WriteStructBegin("MyStructFieldN28Patch"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField3(oprot); err != nil { return err } + if err := p.writeField7(oprot); err != nil { return err } + if err := p.writeField8(oprot); err != nil { return err } + if err := p.writeField9(oprot); err != nil { return err } + if err := oprot.WriteFieldStop(); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(); err != nil { + return thrift.PrependError("write struct stop error: ", err) } return nil } -func (p *MyStructFieldPatch) ReadField_17(iprot thrift.Protocol) error { - p.OptByteVal = patch1.NewBytePatch() - if err := p.OptByteVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptByteVal), err) +func (p *MyStructFieldN28Patch) writeField1(oprot thrift.Protocol) (err error) { + if p.IsSetAssign() { + if err := oprot.WriteFieldBegin("assign", thrift.LIST, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assign: ", p), err) } + if err := oprot.WriteListBegin(thrift.I16, len(p.Assign)); err != nil { + return thrift.PrependError("error writing list begin: ", err) + } + for _, v := range p.Assign { + if err := oprot.WriteI16(int16(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assign: ", p), err) } } - return nil + return err } -func (p *MyStructFieldPatch) ReadField_18(iprot thrift.Protocol) error { - p.OptI16Val = patch1.NewI16Patch() - if err := p.OptI16Val.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptI16Val), err) - } - return nil +func (p *MyStructFieldN28Patch) writeField2(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("clear", thrift.BOOL, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clear: ", p), err) } + if err := oprot.WriteBool(bool(p.Clear)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.clear (2) field write error: ", p), err) } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clear: ", p), err) } + return err } -func (p *MyStructFieldPatch) ReadField_19(iprot thrift.Protocol) error { - p.OptI32Val = patch1.NewI32Patch() - if err := p.OptI32Val.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptI32Val), err) +func (p *MyStructFieldN28Patch) writeField3(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("patch", thrift.MAP, 3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:patch: ", p), err) } + if err := oprot.WriteMapBegin(thrift.I32, thrift.STRUCT, len(p.Patch)); err != nil { + return thrift.PrependError("error writing map begin: ", err) } - return nil + for k, v := range p.Patch { + if err := oprot.WriteI32(int32(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := v.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) + } + } + if err := oprot.WriteMapEnd(); err != nil { + return thrift.PrependError("error writing map end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 3:patch: ", p), err) } + return err } -func (p *MyStructFieldPatch) ReadField_20(iprot thrift.Protocol) error { - p.OptI64Val = patch1.NewI64Patch() - if err := p.OptI64Val.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptI64Val), err) +func (p *MyStructFieldN28Patch) writeField7(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("remove", thrift.LIST, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:remove: ", p), err) } + if err := oprot.WriteListBegin(thrift.I16, len(p.Remove)); err != nil { + return thrift.PrependError("error writing list begin: ", err) } - return nil + for _, v := range p.Remove { + if err := oprot.WriteI16(int16(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:remove: ", p), err) } + return err } -func (p *MyStructFieldPatch) ReadField_21(iprot thrift.Protocol) error { - p.OptFloatVal = patch1.NewFloatPatch() - if err := p.OptFloatVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptFloatVal), err) +func (p *MyStructFieldN28Patch) writeField8(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("prepend", thrift.LIST, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:prepend: ", p), err) } + if err := oprot.WriteListBegin(thrift.I16, len(p.Prepend)); err != nil { + return thrift.PrependError("error writing list begin: ", err) } - return nil + for _, v := range p.Prepend { + if err := oprot.WriteI16(int16(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:prepend: ", p), err) } + return err } -func (p *MyStructFieldPatch) ReadField_22(iprot thrift.Protocol) error { - p.OptDoubleVal = patch1.NewDoublePatch() - if err := p.OptDoubleVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptDoubleVal), err) +func (p *MyStructFieldN28Patch) writeField9(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("append", thrift.LIST, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:append: ", p), err) } + if err := oprot.WriteListBegin(thrift.I16, len(p.Append)); err != nil { + return thrift.PrependError("error writing list begin: ", err) } - return nil + for _, v := range p.Append { + if err := oprot.WriteI16(int16(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteListEnd(); err != nil { + return thrift.PrependError("error writing list end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:append: ", p), err) } + return err } -func (p *MyStructFieldPatch) ReadField_23(iprot thrift.Protocol) error { - p.OptStringVal = patch1.NewStringPatch() - if err := p.OptStringVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptStringVal), err) +func (p *MyStructFieldN28Patch) String() string { + if p == nil { + return "" } - return nil + + assignVal := fmt.Sprintf("%v", p.Assign) + clearVal := fmt.Sprintf("%v", p.Clear) + patchVal := fmt.Sprintf("%v", p.Patch) + removeVal := fmt.Sprintf("%v", p.Remove) + prependVal := fmt.Sprintf("%v", p.Prepend) + appendVal := fmt.Sprintf("%v", p.Append) + return fmt.Sprintf("MyStructFieldN28Patch({Assign:%s Clear:%s Patch:%s Remove:%s Prepend:%s Append:%s})", assignVal, clearVal, patchVal, removeVal, prependVal, appendVal) } -func (p *MyStructFieldPatch) ReadField_24(iprot thrift.Protocol) error { - p.OptBinaryVal = patch1.NewBinaryPatch() - if err := p.OptBinaryVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptBinaryVal), err) - } - return nil +// Attributes: +// - Assign: Assigns a value. If set, all other operations are ignored. +// - Clear: Clears a value. Applies first. +// - Remove: Removes entries, if present. Applies third. +// - Add: Adds entries, if not already present. Applies fourth. +type MyStructFieldN29Patch struct { + Assign []string `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` + Clear bool `thrift:"clear,2" db:"clear" json:"clear"` + // unused fields # 3 to 6 + Remove []string `thrift:"remove,7" db:"remove" json:"remove"` + Add []string `thrift:"add,8" db:"add" json:"add"` } -func (p *MyStructFieldPatch) ReadField_25(iprot thrift.Protocol) error { - p.OptEnumVal = NewMyStructFieldN25Patch() - if err := p.OptEnumVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptEnumVal), err) - } - return nil +func NewMyStructFieldN29Patch() *MyStructFieldN29Patch { + return &MyStructFieldN29Patch{} } -func (p *MyStructFieldPatch) ReadField_26(iprot thrift.Protocol) error { - p.OptStructVal = NewMyDataPatch() - if err := p.OptStructVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptStructVal), err) - } - return nil +var MyStructFieldN29Patch_Assign_DEFAULT []string + +func (p *MyStructFieldN29Patch) GetAssign() []string { + return p.Assign } -func (p *MyStructFieldPatch) ReadField_27(iprot thrift.Protocol) error { - p.OptLateStructVal = NewLateDefStructPatch() - if err := p.OptLateStructVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptLateStructVal), err) - } - return nil +func (p *MyStructFieldN29Patch) GetClear() bool { + return p.Clear } -func (p *MyStructFieldPatch) ReadField_28(iprot thrift.Protocol) error { - p.OptListVal = NewMyStructFieldN28Patch() - if err := p.OptListVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptListVal), err) - } - return nil +func (p *MyStructFieldN29Patch) GetRemove() []string { + return p.Remove } -func (p *MyStructFieldPatch) ReadField_29(iprot thrift.Protocol) error { - p.OptSetVal = NewMyStructFieldN29Patch() - if err := p.OptSetVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptSetVal), err) +func (p *MyStructFieldN29Patch) GetAdd() []string { + return p.Add +} +func (p *MyStructFieldN29Patch) IsSetAssign() bool { + return p != nil && p.Assign != nil +} + +type MyStructFieldN29PatchBuilder struct { + obj *MyStructFieldN29Patch +} + +func NewMyStructFieldN29PatchBuilder() *MyStructFieldN29PatchBuilder{ + return &MyStructFieldN29PatchBuilder{ + obj: NewMyStructFieldN29Patch(), } - return nil } -func (p *MyStructFieldPatch) ReadField_30(iprot thrift.Protocol) error { - p.OptMapVal = NewMyStructFieldN30Patch() - if err := p.OptMapVal.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptMapVal), err) +func (p MyStructFieldN29PatchBuilder) Emit() *MyStructFieldN29Patch{ + return &MyStructFieldN29Patch{ + Assign: p.obj.Assign, + Clear: p.obj.Clear, + Remove: p.obj.Remove, + Add: p.obj.Add, } - return nil } -func (p *MyStructFieldPatch) Write(oprot thrift.Protocol) error { - if err := oprot.WriteStructBegin("MyStructFieldPatch"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } - if err := p.writeField_30(oprot); err != nil { return err } - if err := p.writeField_29(oprot); err != nil { return err } - if err := p.writeField_28(oprot); err != nil { return err } - if err := p.writeField_27(oprot); err != nil { return err } - if err := p.writeField_26(oprot); err != nil { return err } - if err := p.writeField_25(oprot); err != nil { return err } - if err := p.writeField_24(oprot); err != nil { return err } - if err := p.writeField_23(oprot); err != nil { return err } - if err := p.writeField_22(oprot); err != nil { return err } - if err := p.writeField_21(oprot); err != nil { return err } - if err := p.writeField_20(oprot); err != nil { return err } - if err := p.writeField_19(oprot); err != nil { return err } - if err := p.writeField_18(oprot); err != nil { return err } - if err := p.writeField_17(oprot); err != nil { return err } - if err := p.writeField_16(oprot); err != nil { return err } - if err := p.writeField_15(oprot); err != nil { return err } - if err := p.writeField_14(oprot); err != nil { return err } - if err := p.writeField_13(oprot); err != nil { return err } - if err := p.writeField_12(oprot); err != nil { return err } - if err := p.writeField_11(oprot); err != nil { return err } - if err := p.writeField_10(oprot); err != nil { return err } - if err := p.writeField_9(oprot); err != nil { return err } - if err := p.writeField_8(oprot); err != nil { return err } - if err := p.writeField_7(oprot); err != nil { return err } - if err := p.writeField_6(oprot); err != nil { return err } - if err := p.writeField_5(oprot); err != nil { return err } - if err := p.writeField_4(oprot); err != nil { return err } - if err := p.writeField_3(oprot); err != nil { return err } - if err := p.writeField_2(oprot); err != nil { return err } - if err := p.writeField_1(oprot); err != nil { return err } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) } - return nil +func (m *MyStructFieldN29PatchBuilder) Assign(assign []string) *MyStructFieldN29PatchBuilder { + m.obj.Assign = assign + return m } -func (p *MyStructFieldPatch) writeField_30(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optMapVal", thrift.STRUCT, -30); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -30:optMapVal: ", p), err) } - if err := p.OptMapVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptMapVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -30:optMapVal: ", p), err) } - return err +func (m *MyStructFieldN29PatchBuilder) Clear(clear bool) *MyStructFieldN29PatchBuilder { + m.obj.Clear = clear + return m } -func (p *MyStructFieldPatch) writeField_29(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optSetVal", thrift.STRUCT, -29); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -29:optSetVal: ", p), err) } - if err := p.OptSetVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptSetVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -29:optSetVal: ", p), err) } - return err +func (m *MyStructFieldN29PatchBuilder) Remove(remove []string) *MyStructFieldN29PatchBuilder { + m.obj.Remove = remove + return m } -func (p *MyStructFieldPatch) writeField_28(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optListVal", thrift.STRUCT, -28); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -28:optListVal: ", p), err) } - if err := p.OptListVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptListVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -28:optListVal: ", p), err) } - return err +func (m *MyStructFieldN29PatchBuilder) Add(add []string) *MyStructFieldN29PatchBuilder { + m.obj.Add = add + return m } -func (p *MyStructFieldPatch) writeField_27(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optLateStructVal", thrift.STRUCT, -27); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -27:optLateStructVal: ", p), err) } - if err := p.OptLateStructVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptLateStructVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -27:optLateStructVal: ", p), err) } - return err +func (m *MyStructFieldN29Patch) SetAssign(assign []string) *MyStructFieldN29Patch { + m.Assign = assign + return m } -func (p *MyStructFieldPatch) writeField_26(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optStructVal", thrift.STRUCT, -26); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -26:optStructVal: ", p), err) } - if err := p.OptStructVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptStructVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -26:optStructVal: ", p), err) } - return err +func (m *MyStructFieldN29Patch) SetClear(clear bool) *MyStructFieldN29Patch { + m.Clear = clear + return m } -func (p *MyStructFieldPatch) writeField_25(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optEnumVal", thrift.STRUCT, -25); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -25:optEnumVal: ", p), err) } - if err := p.OptEnumVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptEnumVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -25:optEnumVal: ", p), err) } - return err +func (m *MyStructFieldN29Patch) SetRemove(remove []string) *MyStructFieldN29Patch { + m.Remove = remove + return m } -func (p *MyStructFieldPatch) writeField_24(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optBinaryVal", thrift.STRUCT, -24); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -24:optBinaryVal: ", p), err) } - if err := p.OptBinaryVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptBinaryVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -24:optBinaryVal: ", p), err) } - return err +func (m *MyStructFieldN29Patch) SetAdd(add []string) *MyStructFieldN29Patch { + m.Add = add + return m } -func (p *MyStructFieldPatch) writeField_23(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optStringVal", thrift.STRUCT, -23); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -23:optStringVal: ", p), err) } - if err := p.OptStringVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptStringVal), err) +func (p *MyStructFieldN29Patch) Read(iprot thrift.Protocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -23:optStringVal: ", p), err) } - return err -} -func (p *MyStructFieldPatch) writeField_22(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optDoubleVal", thrift.STRUCT, -22); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -22:optDoubleVal: ", p), err) } - if err := p.OptDoubleVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptDoubleVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -22:optDoubleVal: ", p), err) } - return err -} -func (p *MyStructFieldPatch) writeField_21(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optFloatVal", thrift.STRUCT, -21); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -21:optFloatVal: ", p), err) } - if err := p.OptFloatVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptFloatVal), err) + for { + _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() + if err != nil { + return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) + } + if fieldTypeId == thrift.STOP { break; } + switch fieldId { + case 1: + if err := p.ReadField1(iprot); err != nil { + return err + } + case 2: + if err := p.ReadField2(iprot); err != nil { + return err + } + case 7: + if err := p.ReadField7(iprot); err != nil { + return err + } + case 8: + if err := p.ReadField8(iprot); err != nil { + return err + } + default: + if err := iprot.Skip(fieldTypeId); err != nil { + return err + } + } + if err := iprot.ReadFieldEnd(); err != nil { + return err + } } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -21:optFloatVal: ", p), err) } - return err -} - -func (p *MyStructFieldPatch) writeField_20(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optI64Val", thrift.STRUCT, -20); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -20:optI64Val: ", p), err) } - if err := p.OptI64Val.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptI64Val), err) + if err := iprot.ReadStructEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -20:optI64Val: ", p), err) } - return err + return nil } -func (p *MyStructFieldPatch) writeField_19(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optI32Val", thrift.STRUCT, -19); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -19:optI32Val: ", p), err) } - if err := p.OptI32Val.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptI32Val), err) +func (p *MyStructFieldN29Patch) ReadField1(iprot thrift.Protocol) error { + _, size, err := iprot.ReadSetBegin() + if err != nil { + return thrift.PrependError("error reading set begin: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -19:optI32Val: ", p), err) } - return err -} - -func (p *MyStructFieldPatch) writeField_18(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optI16Val", thrift.STRUCT, -18); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -18:optI16Val: ", p), err) } - if err := p.OptI16Val.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptI16Val), err) + tSet := make([]string, 0, size) + p.Assign = tSet + for i := 0; i < size; i ++ { + var _elem13 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _elem13 = v + } + p.Assign = append(p.Assign, _elem13) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -18:optI16Val: ", p), err) } - return err + if err := iprot.ReadSetEnd(); err != nil { + return thrift.PrependError("error reading set end: ", err) + } + return nil } -func (p *MyStructFieldPatch) writeField_17(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optByteVal", thrift.STRUCT, -17); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -17:optByteVal: ", p), err) } - if err := p.OptByteVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptByteVal), err) +func (p *MyStructFieldN29Patch) ReadField2(iprot thrift.Protocol) error { + if v, err := iprot.ReadBool(); err != nil { + return thrift.PrependError("error reading field 2: ", err) + } else { + p.Clear = v } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -17:optByteVal: ", p), err) } - return err + return nil } -func (p *MyStructFieldPatch) writeField_16(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("optBoolVal", thrift.STRUCT, -16); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -16:optBoolVal: ", p), err) } - if err := p.OptBoolVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptBoolVal), err) +func (p *MyStructFieldN29Patch) ReadField7(iprot thrift.Protocol) error { + _, size, err := iprot.ReadSetBegin() + if err != nil { + return thrift.PrependError("error reading set begin: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -16:optBoolVal: ", p), err) } - return err + tSet := make([]string, 0, size) + p.Remove = tSet + for i := 0; i < size; i ++ { + var _elem14 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _elem14 = v + } + p.Remove = append(p.Remove, _elem14) + } + if err := iprot.ReadSetEnd(); err != nil { + return thrift.PrependError("error reading set end: ", err) + } + return nil } -func (p *MyStructFieldPatch) writeField_15(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("timeVal", thrift.STRUCT, -15); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -15:timeVal: ", p), err) } - if err := p.TimeVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimeVal), err) +func (p *MyStructFieldN29Patch) ReadField8(iprot thrift.Protocol) error { + _, size, err := iprot.ReadSetBegin() + if err != nil { + return thrift.PrependError("error reading set begin: ", err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -15:timeVal: ", p), err) } - return err + tSet := make([]string, 0, size) + p.Add = tSet + for i := 0; i < size; i ++ { + var _elem15 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _elem15 = v + } + p.Add = append(p.Add, _elem15) + } + if err := iprot.ReadSetEnd(); err != nil { + return thrift.PrependError("error reading set end: ", err) + } + return nil } -func (p *MyStructFieldPatch) writeField_14(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("durationVal", thrift.STRUCT, -14); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -14:durationVal: ", p), err) } - if err := p.DurationVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DurationVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -14:durationVal: ", p), err) } - return err +func (p *MyStructFieldN29Patch) Write(oprot thrift.Protocol) error { + if err := oprot.WriteStructBegin("MyStructFieldN29Patch"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if err := p.writeField1(oprot); err != nil { return err } + if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField7(oprot); err != nil { return err } + if err := p.writeField8(oprot); err != nil { return err } + if err := oprot.WriteFieldStop(); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil } -func (p *MyStructFieldPatch) writeField_13(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("lateStructVal", thrift.STRUCT, -13); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -13:lateStructVal: ", p), err) } - if err := p.LateStructVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LateStructVal), err) +func (p *MyStructFieldN29Patch) writeField1(oprot thrift.Protocol) (err error) { + if p.IsSetAssign() { + if err := oprot.WriteFieldBegin("assign", thrift.SET, 1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assign: ", p), err) } + if err := oprot.WriteSetBegin(thrift.STRING, len(p.Assign)); err != nil { + return thrift.PrependError("error writing set begin: ", err) + } + set := make(map[string]bool, len(p.Assign)) + for _, v := range p.Assign { + if ok := set[v]; ok { + return thrift.PrependError("", fmt.Errorf("%T error writing set field: slice is not unique", v)) + } + set[v] = true + } + for _, v := range p.Assign { + if err := oprot.WriteString(string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteSetEnd(); err != nil { + return thrift.PrependError("error writing set end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assign: ", p), err) } } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -13:lateStructVal: ", p), err) } return err } -func (p *MyStructFieldPatch) writeField_12(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("unionVal", thrift.STRUCT, -12); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -12:unionVal: ", p), err) } - if err := p.UnionVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.UnionVal), err) - } +func (p *MyStructFieldN29Patch) writeField2(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("clear", thrift.BOOL, 2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clear: ", p), err) } + if err := oprot.WriteBool(bool(p.Clear)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T.clear (2) field write error: ", p), err) } if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -12:unionVal: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clear: ", p), err) } return err } -func (p *MyStructFieldPatch) writeField_11(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("structVal", thrift.STRUCT, -11); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -11:structVal: ", p), err) } - if err := p.StructVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.StructVal), err) +func (p *MyStructFieldN29Patch) writeField7(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("remove", thrift.SET, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:remove: ", p), err) } + if err := oprot.WriteSetBegin(thrift.STRING, len(p.Remove)); err != nil { + return thrift.PrependError("error writing set begin: ", err) + } + set := make(map[string]bool, len(p.Remove)) + for _, v := range p.Remove { + if ok := set[v]; ok { + return thrift.PrependError("", fmt.Errorf("%T error writing set field: slice is not unique", v)) + } + set[v] = true + } + for _, v := range p.Remove { + if err := oprot.WriteString(string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteSetEnd(); err != nil { + return thrift.PrependError("error writing set end: ", err) } if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -11:structVal: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:remove: ", p), err) } return err } -func (p *MyStructFieldPatch) writeField_10(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("enumVal", thrift.STRUCT, -10); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -10:enumVal: ", p), err) } - if err := p.EnumVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.EnumVal), err) +func (p *MyStructFieldN29Patch) writeField8(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("add", thrift.SET, 8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:add: ", p), err) } + if err := oprot.WriteSetBegin(thrift.STRING, len(p.Add)); err != nil { + return thrift.PrependError("error writing set begin: ", err) + } + set := make(map[string]bool, len(p.Add)) + for _, v := range p.Add { + if ok := set[v]; ok { + return thrift.PrependError("", fmt.Errorf("%T error writing set field: slice is not unique", v)) + } + set[v] = true + } + for _, v := range p.Add { + if err := oprot.WriteString(string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteSetEnd(); err != nil { + return thrift.PrependError("error writing set end: ", err) } if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -10:enumVal: ", p), err) } + return thrift.PrependError(fmt.Sprintf("%T write field end error 8:add: ", p), err) } return err } -func (p *MyStructFieldPatch) writeField_9(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("binaryVal", thrift.STRUCT, -9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -9:binaryVal: ", p), err) } - if err := p.BinaryVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.BinaryVal), err) +func (p *MyStructFieldN29Patch) String() string { + if p == nil { + return "" } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -9:binaryVal: ", p), err) } - return err + + assignVal := fmt.Sprintf("%v", p.Assign) + clearVal := fmt.Sprintf("%v", p.Clear) + removeVal := fmt.Sprintf("%v", p.Remove) + addVal := fmt.Sprintf("%v", p.Add) + return fmt.Sprintf("MyStructFieldN29Patch({Assign:%s Clear:%s Remove:%s Add:%s})", assignVal, clearVal, removeVal, addVal) } -func (p *MyStructFieldPatch) writeField_8(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("stringVal", thrift.STRUCT, -8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -8:stringVal: ", p), err) } - if err := p.StringVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.StringVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -8:stringVal: ", p), err) } - return err +// Attributes: +// - Assign: Assigns a value. If set, all other operations are ignored. +// - Clear: Clears a value. Applies first. +// - Add: Add the given values, if the keys are not already present. Applies forth. +// - Remove: Removes entries, if present. Applies third. +// - Put: Adds or replaces the given key/value pairs. Applies fifth. +type MyStructFieldN30Patch struct { + Assign map[string]string `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` + Clear bool `thrift:"clear,2" db:"clear" json:"clear"` + // unused fields # 3 to 4 + Add map[string]string `thrift:"add,5" db:"add" json:"add"` + // unused field # 6 + Remove []string `thrift:"remove,7" db:"remove" json:"remove"` + // unused field # 8 + Put map[string]string `thrift:"put,9" db:"put" json:"put"` } -func (p *MyStructFieldPatch) writeField_7(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("doubleVal", thrift.STRUCT, -7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -7:doubleVal: ", p), err) } - if err := p.DoubleVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DoubleVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -7:doubleVal: ", p), err) } - return err +func NewMyStructFieldN30Patch() *MyStructFieldN30Patch { + return &MyStructFieldN30Patch{} } -func (p *MyStructFieldPatch) writeField_6(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("floatVal", thrift.STRUCT, -6); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -6:floatVal: ", p), err) } - if err := p.FloatVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FloatVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -6:floatVal: ", p), err) } - return err +var MyStructFieldN30Patch_Assign_DEFAULT map[string]string + +func (p *MyStructFieldN30Patch) GetAssign() map[string]string { + return p.Assign } -func (p *MyStructFieldPatch) writeField_5(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("i64Val", thrift.STRUCT, -5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -5:i64Val: ", p), err) } - if err := p.I64Val.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.I64Val), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -5:i64Val: ", p), err) } - return err +func (p *MyStructFieldN30Patch) GetClear() bool { + return p.Clear } -func (p *MyStructFieldPatch) writeField_4(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("i32Val", thrift.STRUCT, -4); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -4:i32Val: ", p), err) } - if err := p.I32Val.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.I32Val), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -4:i32Val: ", p), err) } - return err +func (p *MyStructFieldN30Patch) GetAdd() map[string]string { + return p.Add } -func (p *MyStructFieldPatch) writeField_3(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("i16Val", thrift.STRUCT, -3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -3:i16Val: ", p), err) } - if err := p.I16Val.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.I16Val), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -3:i16Val: ", p), err) } - return err +func (p *MyStructFieldN30Patch) GetRemove() []string { + return p.Remove } -func (p *MyStructFieldPatch) writeField_2(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("byteVal", thrift.STRUCT, -2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -2:byteVal: ", p), err) } - if err := p.ByteVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ByteVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -2:byteVal: ", p), err) } - return err +func (p *MyStructFieldN30Patch) GetPut() map[string]string { + return p.Put +} +func (p *MyStructFieldN30Patch) IsSetAssign() bool { + return p != nil && p.Assign != nil } -func (p *MyStructFieldPatch) writeField_1(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("boolVal", thrift.STRUCT, -1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error -1:boolVal: ", p), err) } - if err := p.BoolVal.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.BoolVal), err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error -1:boolVal: ", p), err) } - return err -} - -func (p *MyStructFieldPatch) String() string { - if p == nil { - return "" - } - - var optMapValVal string - if p.OptMapVal == nil { - optMapValVal = "" - } else { - optMapValVal = fmt.Sprintf("%v", p.OptMapVal) - } - var optSetValVal string - if p.OptSetVal == nil { - optSetValVal = "" - } else { - optSetValVal = fmt.Sprintf("%v", p.OptSetVal) - } - var optListValVal string - if p.OptListVal == nil { - optListValVal = "" - } else { - optListValVal = fmt.Sprintf("%v", p.OptListVal) - } - var optLateStructValVal string - if p.OptLateStructVal == nil { - optLateStructValVal = "" - } else { - optLateStructValVal = fmt.Sprintf("%v", p.OptLateStructVal) - } - var optStructValVal string - if p.OptStructVal == nil { - optStructValVal = "" - } else { - optStructValVal = fmt.Sprintf("%v", p.OptStructVal) - } - var optEnumValVal string - if p.OptEnumVal == nil { - optEnumValVal = "" - } else { - optEnumValVal = fmt.Sprintf("%v", p.OptEnumVal) - } - var optBinaryValVal string - if p.OptBinaryVal == nil { - optBinaryValVal = "" - } else { - optBinaryValVal = fmt.Sprintf("%v", p.OptBinaryVal) - } - var optStringValVal string - if p.OptStringVal == nil { - optStringValVal = "" - } else { - optStringValVal = fmt.Sprintf("%v", p.OptStringVal) - } - var optDoubleValVal string - if p.OptDoubleVal == nil { - optDoubleValVal = "" - } else { - optDoubleValVal = fmt.Sprintf("%v", p.OptDoubleVal) - } - var optFloatValVal string - if p.OptFloatVal == nil { - optFloatValVal = "" - } else { - optFloatValVal = fmt.Sprintf("%v", p.OptFloatVal) - } - var optI64ValVal string - if p.OptI64Val == nil { - optI64ValVal = "" - } else { - optI64ValVal = fmt.Sprintf("%v", p.OptI64Val) - } - var optI32ValVal string - if p.OptI32Val == nil { - optI32ValVal = "" - } else { - optI32ValVal = fmt.Sprintf("%v", p.OptI32Val) - } - var optI16ValVal string - if p.OptI16Val == nil { - optI16ValVal = "" - } else { - optI16ValVal = fmt.Sprintf("%v", p.OptI16Val) - } - var optByteValVal string - if p.OptByteVal == nil { - optByteValVal = "" - } else { - optByteValVal = fmt.Sprintf("%v", p.OptByteVal) - } - var optBoolValVal string - if p.OptBoolVal == nil { - optBoolValVal = "" - } else { - optBoolValVal = fmt.Sprintf("%v", p.OptBoolVal) - } - var timeValVal string - if p.TimeVal == nil { - timeValVal = "" - } else { - timeValVal = fmt.Sprintf("%v", p.TimeVal) - } - var durationValVal string - if p.DurationVal == nil { - durationValVal = "" - } else { - durationValVal = fmt.Sprintf("%v", p.DurationVal) - } - var lateStructValVal string - if p.LateStructVal == nil { - lateStructValVal = "" - } else { - lateStructValVal = fmt.Sprintf("%v", p.LateStructVal) - } - var unionValVal string - if p.UnionVal == nil { - unionValVal = "" - } else { - unionValVal = fmt.Sprintf("%v", p.UnionVal) - } - var structValVal string - if p.StructVal == nil { - structValVal = "" - } else { - structValVal = fmt.Sprintf("%v", p.StructVal) - } - var enumValVal string - if p.EnumVal == nil { - enumValVal = "" - } else { - enumValVal = fmt.Sprintf("%v", p.EnumVal) - } - var binaryValVal string - if p.BinaryVal == nil { - binaryValVal = "" - } else { - binaryValVal = fmt.Sprintf("%v", p.BinaryVal) - } - var stringValVal string - if p.StringVal == nil { - stringValVal = "" - } else { - stringValVal = fmt.Sprintf("%v", p.StringVal) - } - var doubleValVal string - if p.DoubleVal == nil { - doubleValVal = "" - } else { - doubleValVal = fmt.Sprintf("%v", p.DoubleVal) - } - var floatValVal string - if p.FloatVal == nil { - floatValVal = "" - } else { - floatValVal = fmt.Sprintf("%v", p.FloatVal) - } - var i64ValVal string - if p.I64Val == nil { - i64ValVal = "" - } else { - i64ValVal = fmt.Sprintf("%v", p.I64Val) - } - var i32ValVal string - if p.I32Val == nil { - i32ValVal = "" - } else { - i32ValVal = fmt.Sprintf("%v", p.I32Val) - } - var i16ValVal string - if p.I16Val == nil { - i16ValVal = "" - } else { - i16ValVal = fmt.Sprintf("%v", p.I16Val) - } - var byteValVal string - if p.ByteVal == nil { - byteValVal = "" - } else { - byteValVal = fmt.Sprintf("%v", p.ByteVal) - } - var boolValVal string - if p.BoolVal == nil { - boolValVal = "" - } else { - boolValVal = fmt.Sprintf("%v", p.BoolVal) - } - return fmt.Sprintf("MyStructFieldPatch({OptMapVal:%s OptSetVal:%s OptListVal:%s OptLateStructVal:%s OptStructVal:%s OptEnumVal:%s OptBinaryVal:%s OptStringVal:%s OptDoubleVal:%s OptFloatVal:%s OptI64Val:%s OptI32Val:%s OptI16Val:%s OptByteVal:%s OptBoolVal:%s TimeVal:%s DurationVal:%s LateStructVal:%s UnionVal:%s StructVal:%s EnumVal:%s BinaryVal:%s StringVal:%s DoubleVal:%s FloatVal:%s I64Val:%s I32Val:%s I16Val:%s ByteVal:%s BoolVal:%s})", optMapValVal, optSetValVal, optListValVal, optLateStructValVal, optStructValVal, optEnumValVal, optBinaryValVal, optStringValVal, optDoubleValVal, optFloatValVal, optI64ValVal, optI32ValVal, optI16ValVal, optByteValVal, optBoolValVal, timeValVal, durationValVal, lateStructValVal, unionValVal, structValVal, enumValVal, binaryValVal, stringValVal, doubleValVal, floatValVal, i64ValVal, i32ValVal, i16ValVal, byteValVal, boolValVal) -} - -// Attributes: -// - Assign: Assigns a value. If set, all other operations are ignored. -// - Clear: Clears a value. Applies first. -type MyStructFieldN10Patch struct { - Assign *MyEnum `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` - Clear bool `thrift:"clear,2" db:"clear" json:"clear"` -} - -func NewMyStructFieldN10Patch() *MyStructFieldN10Patch { - return &MyStructFieldN10Patch{} -} - -var MyStructFieldN10Patch_Assign_DEFAULT MyEnum -func (p *MyStructFieldN10Patch) GetAssign() MyEnum { - if !p.IsSetAssign() { - return MyStructFieldN10Patch_Assign_DEFAULT - } -return *p.Assign -} - -func (p *MyStructFieldN10Patch) GetClear() bool { - return p.Clear -} -func (p *MyStructFieldN10Patch) IsSetAssign() bool { - return p != nil && p.Assign != nil -} - -type MyStructFieldN10PatchBuilder struct { - obj *MyStructFieldN10Patch +type MyStructFieldN30PatchBuilder struct { + obj *MyStructFieldN30Patch } -func NewMyStructFieldN10PatchBuilder() *MyStructFieldN10PatchBuilder{ - return &MyStructFieldN10PatchBuilder{ - obj: NewMyStructFieldN10Patch(), +func NewMyStructFieldN30PatchBuilder() *MyStructFieldN30PatchBuilder{ + return &MyStructFieldN30PatchBuilder{ + obj: NewMyStructFieldN30Patch(), } } -func (p MyStructFieldN10PatchBuilder) Emit() *MyStructFieldN10Patch{ - return &MyStructFieldN10Patch{ +func (p MyStructFieldN30PatchBuilder) Emit() *MyStructFieldN30Patch{ + return &MyStructFieldN30Patch{ Assign: p.obj.Assign, Clear: p.obj.Clear, + Add: p.obj.Add, + Remove: p.obj.Remove, + Put: p.obj.Put, } } -func (m *MyStructFieldN10PatchBuilder) Assign(assign *MyEnum) *MyStructFieldN10PatchBuilder { +func (m *MyStructFieldN30PatchBuilder) Assign(assign map[string]string) *MyStructFieldN30PatchBuilder { m.obj.Assign = assign return m } -func (m *MyStructFieldN10PatchBuilder) Clear(clear bool) *MyStructFieldN10PatchBuilder { +func (m *MyStructFieldN30PatchBuilder) Clear(clear bool) *MyStructFieldN30PatchBuilder { m.obj.Clear = clear return m } -func (m *MyStructFieldN10Patch) SetAssign(assign *MyEnum) *MyStructFieldN10Patch { - m.Assign = assign +func (m *MyStructFieldN30PatchBuilder) Add(add map[string]string) *MyStructFieldN30PatchBuilder { + m.obj.Add = add return m } -func (m *MyStructFieldN10Patch) SetClear(clear bool) *MyStructFieldN10Patch { - m.Clear = clear +func (m *MyStructFieldN30PatchBuilder) Remove(remove []string) *MyStructFieldN30PatchBuilder { + m.obj.Remove = remove return m } -func (p *MyStructFieldN10Patch) Read(iprot thrift.Protocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } +func (m *MyStructFieldN30PatchBuilder) Put(put map[string]string) *MyStructFieldN30PatchBuilder { + m.obj.Put = put + return m +} + +func (m *MyStructFieldN30Patch) SetAssign(assign map[string]string) *MyStructFieldN30Patch { + m.Assign = assign + return m +} + +func (m *MyStructFieldN30Patch) SetClear(clear bool) *MyStructFieldN30Patch { + m.Clear = clear + return m +} + +func (m *MyStructFieldN30Patch) SetAdd(add map[string]string) *MyStructFieldN30Patch { + m.Add = add + return m +} + +func (m *MyStructFieldN30Patch) SetRemove(remove []string) *MyStructFieldN30Patch { + m.Remove = remove + return m +} + +func (m *MyStructFieldN30Patch) SetPut(put map[string]string) *MyStructFieldN30Patch { + m.Put = put + return m +} + +func (p *MyStructFieldN30Patch) Read(iprot thrift.Protocol) error { + if _, err := iprot.ReadStructBegin(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) + } for { @@ -5659,6 +5097,18 @@ func (p *MyStructFieldN10Patch) Read(iprot thrift.Protocol) error { if err := p.ReadField2(iprot); err != nil { return err } + case 5: + if err := p.ReadField5(iprot); err != nil { + return err + } + case 7: + if err := p.ReadField7(iprot); err != nil { + return err + } + case 9: + if err := p.ReadField9(iprot); err != nil { + return err + } default: if err := iprot.Skip(fieldTypeId); err != nil { return err @@ -5674,17 +5124,35 @@ func (p *MyStructFieldN10Patch) Read(iprot thrift.Protocol) error { return nil } -func (p *MyStructFieldN10Patch) ReadField1(iprot thrift.Protocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - temp := MyEnum(v) - p.Assign = &temp +func (p *MyStructFieldN30Patch) ReadField1(iprot thrift.Protocol) error { + _, _, size, err := iprot.ReadMapBegin() + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.Assign = tMap + for i := 0; i < size; i ++ { + var _key16 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _key16 = v + } + var _val17 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _val17 = v + } + p.Assign[_key16] = _val17 + } + if err := iprot.ReadMapEnd(); err != nil { + return thrift.PrependError("error reading map end: ", err) } return nil } -func (p *MyStructFieldN10Patch) ReadField2(iprot thrift.Protocol) error { +func (p *MyStructFieldN30Patch) ReadField2(iprot thrift.Protocol) error { if v, err := iprot.ReadBool(); err != nil { return thrift.PrependError("error reading field 2: ", err) } else { @@ -5693,11 +5161,92 @@ func (p *MyStructFieldN10Patch) ReadField2(iprot thrift.Protocol) error { return nil } -func (p *MyStructFieldN10Patch) Write(oprot thrift.Protocol) error { - if err := oprot.WriteStructBegin("MyStructFieldN10Patch"); err != nil { +func (p *MyStructFieldN30Patch) ReadField5(iprot thrift.Protocol) error { + _, _, size, err := iprot.ReadMapBegin() + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.Add = tMap + for i := 0; i < size; i ++ { + var _key18 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _key18 = v + } + var _val19 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _val19 = v + } + p.Add[_key18] = _val19 + } + if err := iprot.ReadMapEnd(); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *MyStructFieldN30Patch) ReadField7(iprot thrift.Protocol) error { + _, size, err := iprot.ReadSetBegin() + if err != nil { + return thrift.PrependError("error reading set begin: ", err) + } + tSet := make([]string, 0, size) + p.Remove = tSet + for i := 0; i < size; i ++ { + var _elem20 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _elem20 = v + } + p.Remove = append(p.Remove, _elem20) + } + if err := iprot.ReadSetEnd(); err != nil { + return thrift.PrependError("error reading set end: ", err) + } + return nil +} + +func (p *MyStructFieldN30Patch) ReadField9(iprot thrift.Protocol) error { + _, _, size, err := iprot.ReadMapBegin() + if err != nil { + return thrift.PrependError("error reading map begin: ", err) + } + tMap := make(map[string]string, size) + p.Put = tMap + for i := 0; i < size; i ++ { + var _key21 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _key21 = v + } + var _val22 string + if v, err := iprot.ReadString(); err != nil { + return thrift.PrependError("error reading field 0: ", err) + } else { + _val22 = v + } + p.Put[_key21] = _val22 + } + if err := iprot.ReadMapEnd(); err != nil { + return thrift.PrependError("error reading map end: ", err) + } + return nil +} + +func (p *MyStructFieldN30Patch) Write(oprot thrift.Protocol) error { + if err := oprot.WriteStructBegin("MyStructFieldN30Patch"); err != nil { return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } if err := p.writeField1(oprot); err != nil { return err } if err := p.writeField2(oprot); err != nil { return err } + if err := p.writeField5(oprot); err != nil { return err } + if err := p.writeField7(oprot); err != nil { return err } + if err := p.writeField9(oprot); err != nil { return err } if err := oprot.WriteFieldStop(); err != nil { return thrift.PrependError("write field stop error: ", err) } if err := oprot.WriteStructEnd(); err != nil { @@ -5705,19 +5254,29 @@ func (p *MyStructFieldN10Patch) Write(oprot thrift.Protocol) error { return nil } -func (p *MyStructFieldN10Patch) writeField1(oprot thrift.Protocol) (err error) { +func (p *MyStructFieldN30Patch) writeField1(oprot thrift.Protocol) (err error) { if p.IsSetAssign() { - if err := oprot.WriteFieldBegin("assign", thrift.I32, 1); err != nil { + if err := oprot.WriteFieldBegin("assign", thrift.MAP, 1); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assign: ", p), err) } - if err := oprot.WriteI32(int32(*p.Assign)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.assign (1) field write error: ", p), err) } + if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Assign)); err != nil { + return thrift.PrependError("error writing map begin: ", err) + } + for k, v := range p.Assign { + if err := oprot.WriteString(string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(); err != nil { + return thrift.PrependError("error writing map end: ", err) + } if err := oprot.WriteFieldEnd(); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assign: ", p), err) } } return err } -func (p *MyStructFieldN10Patch) writeField2(oprot thrift.Protocol) (err error) { +func (p *MyStructFieldN30Patch) writeField2(oprot thrift.Protocol) (err error) { if err := oprot.WriteFieldBegin("clear", thrift.BOOL, 2); err != nil { return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clear: ", p), err) } if err := oprot.WriteBool(bool(p.Clear)); err != nil { @@ -5727,1076 +5286,859 @@ func (p *MyStructFieldN10Patch) writeField2(oprot thrift.Protocol) (err error) { return err } -func (p *MyStructFieldN10Patch) String() string { - if p == nil { - return "" +func (p *MyStructFieldN30Patch) writeField5(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("add", thrift.MAP, 5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:add: ", p), err) } + if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Add)); err != nil { + return thrift.PrependError("error writing map begin: ", err) } - - var assignVal string - if p.Assign == nil { - assignVal = "" - } else { - assignVal = fmt.Sprintf("%v", *p.Assign) + for k, v := range p.Add { + if err := oprot.WriteString(string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } } - clearVal := fmt.Sprintf("%v", p.Clear) - return fmt.Sprintf("MyStructFieldN10Patch({Assign:%s Clear:%s})", assignVal, clearVal) -} - -// Attributes: -// - Assign: Assigns a value. If set, all other operations are ignored. -// - Clear: Clears a value. Applies first. -type MyStructFieldN25Patch struct { - Assign *MyEnum `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` - Clear bool `thrift:"clear,2" db:"clear" json:"clear"` -} - -func NewMyStructFieldN25Patch() *MyStructFieldN25Patch { - return &MyStructFieldN25Patch{} -} - -var MyStructFieldN25Patch_Assign_DEFAULT MyEnum -func (p *MyStructFieldN25Patch) GetAssign() MyEnum { - if !p.IsSetAssign() { - return MyStructFieldN25Patch_Assign_DEFAULT + if err := oprot.WriteMapEnd(); err != nil { + return thrift.PrependError("error writing map end: ", err) } -return *p.Assign + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 5:add: ", p), err) } + return err } -func (p *MyStructFieldN25Patch) GetClear() bool { - return p.Clear -} -func (p *MyStructFieldN25Patch) IsSetAssign() bool { - return p != nil && p.Assign != nil +func (p *MyStructFieldN30Patch) writeField7(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("remove", thrift.SET, 7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:remove: ", p), err) } + if err := oprot.WriteSetBegin(thrift.STRING, len(p.Remove)); err != nil { + return thrift.PrependError("error writing set begin: ", err) + } + set := make(map[string]bool, len(p.Remove)) + for _, v := range p.Remove { + if ok := set[v]; ok { + return thrift.PrependError("", fmt.Errorf("%T error writing set field: slice is not unique", v)) + } + set[v] = true + } + for _, v := range p.Remove { + if err := oprot.WriteString(string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteSetEnd(); err != nil { + return thrift.PrependError("error writing set end: ", err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 7:remove: ", p), err) } + return err } -type MyStructFieldN25PatchBuilder struct { - obj *MyStructFieldN25Patch -} - -func NewMyStructFieldN25PatchBuilder() *MyStructFieldN25PatchBuilder{ - return &MyStructFieldN25PatchBuilder{ - obj: NewMyStructFieldN25Patch(), +func (p *MyStructFieldN30Patch) writeField9(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("put", thrift.MAP, 9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:put: ", p), err) } + if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Put)); err != nil { + return thrift.PrependError("error writing map begin: ", err) } -} - -func (p MyStructFieldN25PatchBuilder) Emit() *MyStructFieldN25Patch{ - return &MyStructFieldN25Patch{ - Assign: p.obj.Assign, - Clear: p.obj.Clear, + for k, v := range p.Put { + if err := oprot.WriteString(string(k)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + if err := oprot.WriteString(string(v)); err != nil { + return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + } + if err := oprot.WriteMapEnd(); err != nil { + return thrift.PrependError("error writing map end: ", err) } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error 9:put: ", p), err) } + return err } -func (m *MyStructFieldN25PatchBuilder) Assign(assign *MyEnum) *MyStructFieldN25PatchBuilder { - m.obj.Assign = assign - return m -} +func (p *MyStructFieldN30Patch) String() string { + if p == nil { + return "" + } -func (m *MyStructFieldN25PatchBuilder) Clear(clear bool) *MyStructFieldN25PatchBuilder { - m.obj.Clear = clear - return m + assignVal := fmt.Sprintf("%v", p.Assign) + clearVal := fmt.Sprintf("%v", p.Clear) + addVal := fmt.Sprintf("%v", p.Add) + removeVal := fmt.Sprintf("%v", p.Remove) + putVal := fmt.Sprintf("%v", p.Put) + return fmt.Sprintf("MyStructFieldN30Patch({Assign:%s Clear:%s Add:%s Remove:%s Put:%s})", assignVal, clearVal, addVal, removeVal, putVal) } -func (m *MyStructFieldN25Patch) SetAssign(assign *MyEnum) *MyStructFieldN25Patch { - m.Assign = assign - return m +// Attributes: +// - OptMapVal +// - OptSetVal +// - OptListVal +// - OptLateStructVal +// - OptStructVal +// - OptEnumVal +// - OptBinaryVal +// - OptStringVal +// - OptDoubleVal +// - OptFloatVal +// - OptI64Val +// - OptI32Val +// - OptI16Val +// - OptByteVal +// - OptBoolVal +// - TimeVal +// - DurationVal +// - LateStructVal +// - UnionVal +// - StructVal +// - EnumVal +// - BinaryVal +// - StringVal +// - DoubleVal +// - FloatVal +// - I64Val +// - I32Val +// - I16Val +// - ByteVal +// - BoolVal +type MyStructFieldPatch struct { + OptMapVal *MyStructFieldN30Patch + OptSetVal *MyStructFieldN29Patch + OptListVal *MyStructFieldN28Patch + OptLateStructVal *LateDefStructPatch + OptStructVal *MyDataPatch + OptEnumVal *MyStructFieldN25Patch + OptBinaryVal *patch1.BinaryPatch + OptStringVal *patch1.StringPatch + OptDoubleVal *patch1.DoublePatch + OptFloatVal *patch1.FloatPatch + OptI64Val *patch1.I64Patch + OptI32Val *patch1.I32Patch + OptI16Val *patch1.I16Patch + OptByteVal *patch1.BytePatch + OptBoolVal *patch1.BoolPatch + TimeVal *patch1.TimePatch + DurationVal *patch1.DurationPatch + LateStructVal *LateDefStructPatch + UnionVal *MyUnionPatch + StructVal *MyDataPatch + EnumVal *MyStructFieldN10Patch + BinaryVal *patch1.BinaryPatch + StringVal *patch1.StringPatch + DoubleVal *patch1.DoublePatch + FloatVal *patch1.FloatPatch + I64Val *patch1.I64Patch + I32Val *patch1.I32Patch + I16Val *patch1.I16Patch + ByteVal *patch1.BytePatch + BoolVal *patch1.BoolPatch } -func (m *MyStructFieldN25Patch) SetClear(clear bool) *MyStructFieldN25Patch { - m.Clear = clear - return m +func NewMyStructFieldPatch() *MyStructFieldPatch { + return &MyStructFieldPatch{ + OptMapVal: NewMyStructFieldN30Patch(), + OptSetVal: NewMyStructFieldN29Patch(), + OptListVal: NewMyStructFieldN28Patch(), + OptLateStructVal: NewLateDefStructPatch(), + OptStructVal: NewMyDataPatch(), + OptEnumVal: NewMyStructFieldN25Patch(), + OptBinaryVal: patch1.NewBinaryPatch(), + OptStringVal: patch1.NewStringPatch(), + OptDoubleVal: patch1.NewDoublePatch(), + OptFloatVal: patch1.NewFloatPatch(), + OptI64Val: patch1.NewI64Patch(), + OptI32Val: patch1.NewI32Patch(), + OptI16Val: patch1.NewI16Patch(), + OptByteVal: patch1.NewBytePatch(), + OptBoolVal: patch1.NewBoolPatch(), + TimeVal: patch1.NewTimePatch(), + DurationVal: patch1.NewDurationPatch(), + LateStructVal: NewLateDefStructPatch(), + UnionVal: NewMyUnionPatch(), + StructVal: NewMyDataPatch(), + EnumVal: NewMyStructFieldN10Patch(), + BinaryVal: patch1.NewBinaryPatch(), + StringVal: patch1.NewStringPatch(), + DoubleVal: patch1.NewDoublePatch(), + FloatVal: patch1.NewFloatPatch(), + I64Val: patch1.NewI64Patch(), + I32Val: patch1.NewI32Patch(), + I16Val: patch1.NewI16Patch(), + ByteVal: patch1.NewBytePatch(), + BoolVal: patch1.NewBoolPatch(), + } } -func (p *MyStructFieldN25Patch) Read(iprot thrift.Protocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) +var MyStructFieldPatch_OptMapVal_DEFAULT *MyStructFieldN30Patch +func (p *MyStructFieldPatch) GetOptMapVal() *MyStructFieldN30Patch { + if !p.IsSetOptMapVal() { + return MyStructFieldPatch_OptMapVal_DEFAULT } - - - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { break; } - switch fieldId { - case 1: - if err := p.ReadField1(iprot); err != nil { - return err - } - case 2: - if err := p.ReadField2(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } +return p.OptMapVal +} +var MyStructFieldPatch_OptSetVal_DEFAULT *MyStructFieldN29Patch +func (p *MyStructFieldPatch) GetOptSetVal() *MyStructFieldN29Patch { + if !p.IsSetOptSetVal() { + return MyStructFieldPatch_OptSetVal_DEFAULT } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) +return p.OptSetVal +} +var MyStructFieldPatch_OptListVal_DEFAULT *MyStructFieldN28Patch +func (p *MyStructFieldPatch) GetOptListVal() *MyStructFieldN28Patch { + if !p.IsSetOptListVal() { + return MyStructFieldPatch_OptListVal_DEFAULT } - return nil +return p.OptListVal } - -func (p *MyStructFieldN25Patch) ReadField1(iprot thrift.Protocol) error { - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 1: ", err) - } else { - temp := MyEnum(v) - p.Assign = &temp +var MyStructFieldPatch_OptLateStructVal_DEFAULT *LateDefStructPatch +func (p *MyStructFieldPatch) GetOptLateStructVal() *LateDefStructPatch { + if !p.IsSetOptLateStructVal() { + return MyStructFieldPatch_OptLateStructVal_DEFAULT } - return nil +return p.OptLateStructVal } - -func (p *MyStructFieldN25Patch) ReadField2(iprot thrift.Protocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Clear = v +var MyStructFieldPatch_OptStructVal_DEFAULT *MyDataPatch +func (p *MyStructFieldPatch) GetOptStructVal() *MyDataPatch { + if !p.IsSetOptStructVal() { + return MyStructFieldPatch_OptStructVal_DEFAULT } - return nil +return p.OptStructVal } - -func (p *MyStructFieldN25Patch) Write(oprot thrift.Protocol) error { - if err := oprot.WriteStructBegin("MyStructFieldN25Patch"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) } - return nil +var MyStructFieldPatch_OptEnumVal_DEFAULT *MyStructFieldN25Patch +func (p *MyStructFieldPatch) GetOptEnumVal() *MyStructFieldN25Patch { + if !p.IsSetOptEnumVal() { + return MyStructFieldPatch_OptEnumVal_DEFAULT + } +return p.OptEnumVal } - -func (p *MyStructFieldN25Patch) writeField1(oprot thrift.Protocol) (err error) { - if p.IsSetAssign() { - if err := oprot.WriteFieldBegin("assign", thrift.I32, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assign: ", p), err) } - if err := oprot.WriteI32(int32(*p.Assign)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.assign (1) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assign: ", p), err) } +var MyStructFieldPatch_OptBinaryVal_DEFAULT *patch1.BinaryPatch +func (p *MyStructFieldPatch) GetOptBinaryVal() *patch1.BinaryPatch { + if !p.IsSetOptBinaryVal() { + return MyStructFieldPatch_OptBinaryVal_DEFAULT } - return err +return p.OptBinaryVal } - -func (p *MyStructFieldN25Patch) writeField2(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("clear", thrift.BOOL, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clear: ", p), err) } - if err := oprot.WriteBool(bool(p.Clear)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.clear (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clear: ", p), err) } - return err +var MyStructFieldPatch_OptStringVal_DEFAULT *patch1.StringPatch +func (p *MyStructFieldPatch) GetOptStringVal() *patch1.StringPatch { + if !p.IsSetOptStringVal() { + return MyStructFieldPatch_OptStringVal_DEFAULT + } +return p.OptStringVal } - -func (p *MyStructFieldN25Patch) String() string { - if p == nil { - return "" +var MyStructFieldPatch_OptDoubleVal_DEFAULT *patch1.DoublePatch +func (p *MyStructFieldPatch) GetOptDoubleVal() *patch1.DoublePatch { + if !p.IsSetOptDoubleVal() { + return MyStructFieldPatch_OptDoubleVal_DEFAULT } - - var assignVal string - if p.Assign == nil { - assignVal = "" - } else { - assignVal = fmt.Sprintf("%v", *p.Assign) +return p.OptDoubleVal +} +var MyStructFieldPatch_OptFloatVal_DEFAULT *patch1.FloatPatch +func (p *MyStructFieldPatch) GetOptFloatVal() *patch1.FloatPatch { + if !p.IsSetOptFloatVal() { + return MyStructFieldPatch_OptFloatVal_DEFAULT } - clearVal := fmt.Sprintf("%v", p.Clear) - return fmt.Sprintf("MyStructFieldN25Patch({Assign:%s Clear:%s})", assignVal, clearVal) +return p.OptFloatVal } - -// Attributes: -// - Assign: Assigns a value. If set, all other operations are ignored. -// - Clear: Clears a value. Applies first. -// - Patch: Patches list values by index. Applies second. -// - Remove: Removes entries, if present. Applies third. -// - Prepend: Prepends to the front of a given list. -// - Append: Appends to the back of a given list. -type MyStructFieldN28Patch struct { - Assign []int16 `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` - Clear bool `thrift:"clear,2" db:"clear" json:"clear"` - Patch map[int32]*patch1.I16Patch `thrift:"patch,3" db:"patch" json:"patch"` - // unused fields # 4 to 6 - Remove []int16 `thrift:"remove,7" db:"remove" json:"remove"` - Prepend []int16 `thrift:"prepend,8" db:"prepend" json:"prepend"` - Append []int16 `thrift:"append,9" db:"append" json:"append"` +var MyStructFieldPatch_OptI64Val_DEFAULT *patch1.I64Patch +func (p *MyStructFieldPatch) GetOptI64Val() *patch1.I64Patch { + if !p.IsSetOptI64Val() { + return MyStructFieldPatch_OptI64Val_DEFAULT + } +return p.OptI64Val } - -func NewMyStructFieldN28Patch() *MyStructFieldN28Patch { - return &MyStructFieldN28Patch{} +var MyStructFieldPatch_OptI32Val_DEFAULT *patch1.I32Patch +func (p *MyStructFieldPatch) GetOptI32Val() *patch1.I32Patch { + if !p.IsSetOptI32Val() { + return MyStructFieldPatch_OptI32Val_DEFAULT + } +return p.OptI32Val } - -var MyStructFieldN28Patch_Assign_DEFAULT []int16 - -func (p *MyStructFieldN28Patch) GetAssign() []int16 { - return p.Assign +var MyStructFieldPatch_OptI16Val_DEFAULT *patch1.I16Patch +func (p *MyStructFieldPatch) GetOptI16Val() *patch1.I16Patch { + if !p.IsSetOptI16Val() { + return MyStructFieldPatch_OptI16Val_DEFAULT + } +return p.OptI16Val } - -func (p *MyStructFieldN28Patch) GetClear() bool { - return p.Clear +var MyStructFieldPatch_OptByteVal_DEFAULT *patch1.BytePatch +func (p *MyStructFieldPatch) GetOptByteVal() *patch1.BytePatch { + if !p.IsSetOptByteVal() { + return MyStructFieldPatch_OptByteVal_DEFAULT + } +return p.OptByteVal } - -func (p *MyStructFieldN28Patch) GetPatch() map[int32]*patch1.I16Patch { - return p.Patch +var MyStructFieldPatch_OptBoolVal_DEFAULT *patch1.BoolPatch +func (p *MyStructFieldPatch) GetOptBoolVal() *patch1.BoolPatch { + if !p.IsSetOptBoolVal() { + return MyStructFieldPatch_OptBoolVal_DEFAULT + } +return p.OptBoolVal } - -func (p *MyStructFieldN28Patch) GetRemove() []int16 { - return p.Remove +var MyStructFieldPatch_TimeVal_DEFAULT *patch1.TimePatch +func (p *MyStructFieldPatch) GetTimeVal() *patch1.TimePatch { + if !p.IsSetTimeVal() { + return MyStructFieldPatch_TimeVal_DEFAULT + } +return p.TimeVal } - -func (p *MyStructFieldN28Patch) GetPrepend() []int16 { - return p.Prepend +var MyStructFieldPatch_DurationVal_DEFAULT *patch1.DurationPatch +func (p *MyStructFieldPatch) GetDurationVal() *patch1.DurationPatch { + if !p.IsSetDurationVal() { + return MyStructFieldPatch_DurationVal_DEFAULT + } +return p.DurationVal } - -func (p *MyStructFieldN28Patch) GetAppend() []int16 { - return p.Append +var MyStructFieldPatch_LateStructVal_DEFAULT *LateDefStructPatch +func (p *MyStructFieldPatch) GetLateStructVal() *LateDefStructPatch { + if !p.IsSetLateStructVal() { + return MyStructFieldPatch_LateStructVal_DEFAULT + } +return p.LateStructVal } -func (p *MyStructFieldN28Patch) IsSetAssign() bool { - return p != nil && p.Assign != nil +var MyStructFieldPatch_UnionVal_DEFAULT *MyUnionPatch +func (p *MyStructFieldPatch) GetUnionVal() *MyUnionPatch { + if !p.IsSetUnionVal() { + return MyStructFieldPatch_UnionVal_DEFAULT + } +return p.UnionVal } - -type MyStructFieldN28PatchBuilder struct { - obj *MyStructFieldN28Patch +var MyStructFieldPatch_StructVal_DEFAULT *MyDataPatch +func (p *MyStructFieldPatch) GetStructVal() *MyDataPatch { + if !p.IsSetStructVal() { + return MyStructFieldPatch_StructVal_DEFAULT + } +return p.StructVal } - -func NewMyStructFieldN28PatchBuilder() *MyStructFieldN28PatchBuilder{ - return &MyStructFieldN28PatchBuilder{ - obj: NewMyStructFieldN28Patch(), +var MyStructFieldPatch_EnumVal_DEFAULT *MyStructFieldN10Patch +func (p *MyStructFieldPatch) GetEnumVal() *MyStructFieldN10Patch { + if !p.IsSetEnumVal() { + return MyStructFieldPatch_EnumVal_DEFAULT } +return p.EnumVal } - -func (p MyStructFieldN28PatchBuilder) Emit() *MyStructFieldN28Patch{ - return &MyStructFieldN28Patch{ - Assign: p.obj.Assign, - Clear: p.obj.Clear, - Patch: p.obj.Patch, - Remove: p.obj.Remove, - Prepend: p.obj.Prepend, - Append: p.obj.Append, +var MyStructFieldPatch_BinaryVal_DEFAULT *patch1.BinaryPatch +func (p *MyStructFieldPatch) GetBinaryVal() *patch1.BinaryPatch { + if !p.IsSetBinaryVal() { + return MyStructFieldPatch_BinaryVal_DEFAULT } +return p.BinaryVal } - -func (m *MyStructFieldN28PatchBuilder) Assign(assign []int16) *MyStructFieldN28PatchBuilder { - m.obj.Assign = assign - return m +var MyStructFieldPatch_StringVal_DEFAULT *patch1.StringPatch +func (p *MyStructFieldPatch) GetStringVal() *patch1.StringPatch { + if !p.IsSetStringVal() { + return MyStructFieldPatch_StringVal_DEFAULT + } +return p.StringVal } - -func (m *MyStructFieldN28PatchBuilder) Clear(clear bool) *MyStructFieldN28PatchBuilder { - m.obj.Clear = clear - return m +var MyStructFieldPatch_DoubleVal_DEFAULT *patch1.DoublePatch +func (p *MyStructFieldPatch) GetDoubleVal() *patch1.DoublePatch { + if !p.IsSetDoubleVal() { + return MyStructFieldPatch_DoubleVal_DEFAULT + } +return p.DoubleVal +} +var MyStructFieldPatch_FloatVal_DEFAULT *patch1.FloatPatch +func (p *MyStructFieldPatch) GetFloatVal() *patch1.FloatPatch { + if !p.IsSetFloatVal() { + return MyStructFieldPatch_FloatVal_DEFAULT + } +return p.FloatVal +} +var MyStructFieldPatch_I64Val_DEFAULT *patch1.I64Patch +func (p *MyStructFieldPatch) GetI64Val() *patch1.I64Patch { + if !p.IsSetI64Val() { + return MyStructFieldPatch_I64Val_DEFAULT + } +return p.I64Val +} +var MyStructFieldPatch_I32Val_DEFAULT *patch1.I32Patch +func (p *MyStructFieldPatch) GetI32Val() *patch1.I32Patch { + if !p.IsSetI32Val() { + return MyStructFieldPatch_I32Val_DEFAULT + } +return p.I32Val +} +var MyStructFieldPatch_I16Val_DEFAULT *patch1.I16Patch +func (p *MyStructFieldPatch) GetI16Val() *patch1.I16Patch { + if !p.IsSetI16Val() { + return MyStructFieldPatch_I16Val_DEFAULT + } +return p.I16Val +} +var MyStructFieldPatch_ByteVal_DEFAULT *patch1.BytePatch +func (p *MyStructFieldPatch) GetByteVal() *patch1.BytePatch { + if !p.IsSetByteVal() { + return MyStructFieldPatch_ByteVal_DEFAULT + } +return p.ByteVal +} +var MyStructFieldPatch_BoolVal_DEFAULT *patch1.BoolPatch +func (p *MyStructFieldPatch) GetBoolVal() *patch1.BoolPatch { + if !p.IsSetBoolVal() { + return MyStructFieldPatch_BoolVal_DEFAULT + } +return p.BoolVal +} +func (p *MyStructFieldPatch) IsSetOptMapVal() bool { + return p != nil && p.OptMapVal != nil } -func (m *MyStructFieldN28PatchBuilder) Patch(patch map[int32]*patch1.I16Patch) *MyStructFieldN28PatchBuilder { - m.obj.Patch = patch - return m +func (p *MyStructFieldPatch) IsSetOptSetVal() bool { + return p != nil && p.OptSetVal != nil } -func (m *MyStructFieldN28PatchBuilder) Remove(remove []int16) *MyStructFieldN28PatchBuilder { - m.obj.Remove = remove - return m +func (p *MyStructFieldPatch) IsSetOptListVal() bool { + return p != nil && p.OptListVal != nil } -func (m *MyStructFieldN28PatchBuilder) Prepend(prepend []int16) *MyStructFieldN28PatchBuilder { - m.obj.Prepend = prepend - return m +func (p *MyStructFieldPatch) IsSetOptLateStructVal() bool { + return p != nil && p.OptLateStructVal != nil } -func (m *MyStructFieldN28PatchBuilder) Append(append []int16) *MyStructFieldN28PatchBuilder { - m.obj.Append = append - return m +func (p *MyStructFieldPatch) IsSetOptStructVal() bool { + return p != nil && p.OptStructVal != nil } -func (m *MyStructFieldN28Patch) SetAssign(assign []int16) *MyStructFieldN28Patch { - m.Assign = assign - return m +func (p *MyStructFieldPatch) IsSetOptEnumVal() bool { + return p != nil && p.OptEnumVal != nil } -func (m *MyStructFieldN28Patch) SetClear(clear bool) *MyStructFieldN28Patch { - m.Clear = clear - return m +func (p *MyStructFieldPatch) IsSetOptBinaryVal() bool { + return p != nil && p.OptBinaryVal != nil } -func (m *MyStructFieldN28Patch) SetPatch(patch map[int32]*patch1.I16Patch) *MyStructFieldN28Patch { - m.Patch = patch - return m +func (p *MyStructFieldPatch) IsSetOptStringVal() bool { + return p != nil && p.OptStringVal != nil } -func (m *MyStructFieldN28Patch) SetRemove(remove []int16) *MyStructFieldN28Patch { - m.Remove = remove - return m +func (p *MyStructFieldPatch) IsSetOptDoubleVal() bool { + return p != nil && p.OptDoubleVal != nil } -func (m *MyStructFieldN28Patch) SetPrepend(prepend []int16) *MyStructFieldN28Patch { - m.Prepend = prepend - return m +func (p *MyStructFieldPatch) IsSetOptFloatVal() bool { + return p != nil && p.OptFloatVal != nil } -func (m *MyStructFieldN28Patch) SetAppend(append []int16) *MyStructFieldN28Patch { - m.Append = append - return m +func (p *MyStructFieldPatch) IsSetOptI64Val() bool { + return p != nil && p.OptI64Val != nil } -func (p *MyStructFieldN28Patch) Read(iprot thrift.Protocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } +func (p *MyStructFieldPatch) IsSetOptI32Val() bool { + return p != nil && p.OptI32Val != nil +} +func (p *MyStructFieldPatch) IsSetOptI16Val() bool { + return p != nil && p.OptI16Val != nil +} - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { break; } - switch fieldId { - case 1: - if err := p.ReadField1(iprot); err != nil { - return err - } - case 2: - if err := p.ReadField2(iprot); err != nil { - return err - } - case 3: - if err := p.ReadField3(iprot); err != nil { - return err - } - case 7: - if err := p.ReadField7(iprot); err != nil { - return err - } - case 8: - if err := p.ReadField8(iprot); err != nil { - return err - } - case 9: - if err := p.ReadField9(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil +func (p *MyStructFieldPatch) IsSetOptByteVal() bool { + return p != nil && p.OptByteVal != nil } -func (p *MyStructFieldN28Patch) ReadField1(iprot thrift.Protocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int16, 0, size) - p.Assign = tSlice - for i := 0; i < size; i ++ { - var _elem7 int16 - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem7 = v - } - p.Assign = append(p.Assign, _elem7) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil +func (p *MyStructFieldPatch) IsSetOptBoolVal() bool { + return p != nil && p.OptBoolVal != nil } -func (p *MyStructFieldN28Patch) ReadField2(iprot thrift.Protocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Clear = v - } - return nil +func (p *MyStructFieldPatch) IsSetTimeVal() bool { + return p != nil && p.TimeVal != nil } -func (p *MyStructFieldN28Patch) ReadField3(iprot thrift.Protocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[int32]*patch1.I16Patch, size) - p.Patch = tMap - for i := 0; i < size; i ++ { - var _key8 int32 - if v, err := iprot.ReadI32(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key8 = v - } - _val9 := patch1.NewI16Patch() - if err := _val9.Read(iprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _val9), err) - } - p.Patch[_key8] = _val9 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) - } - return nil +func (p *MyStructFieldPatch) IsSetDurationVal() bool { + return p != nil && p.DurationVal != nil } -func (p *MyStructFieldN28Patch) ReadField7(iprot thrift.Protocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int16, 0, size) - p.Remove = tSlice - for i := 0; i < size; i ++ { - var _elem10 int16 - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem10 = v - } - p.Remove = append(p.Remove, _elem10) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil +func (p *MyStructFieldPatch) IsSetLateStructVal() bool { + return p != nil && p.LateStructVal != nil } -func (p *MyStructFieldN28Patch) ReadField8(iprot thrift.Protocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int16, 0, size) - p.Prepend = tSlice - for i := 0; i < size; i ++ { - var _elem11 int16 - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem11 = v - } - p.Prepend = append(p.Prepend, _elem11) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil +func (p *MyStructFieldPatch) IsSetUnionVal() bool { + return p != nil && p.UnionVal != nil } -func (p *MyStructFieldN28Patch) ReadField9(iprot thrift.Protocol) error { - _, size, err := iprot.ReadListBegin() - if err != nil { - return thrift.PrependError("error reading list begin: ", err) - } - tSlice := make([]int16, 0, size) - p.Append = tSlice - for i := 0; i < size; i ++ { - var _elem12 int16 - if v, err := iprot.ReadI16(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem12 = v - } - p.Append = append(p.Append, _elem12) - } - if err := iprot.ReadListEnd(); err != nil { - return thrift.PrependError("error reading list end: ", err) - } - return nil +func (p *MyStructFieldPatch) IsSetStructVal() bool { + return p != nil && p.StructVal != nil } -func (p *MyStructFieldN28Patch) Write(oprot thrift.Protocol) error { - if err := oprot.WriteStructBegin("MyStructFieldN28Patch"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField3(oprot); err != nil { return err } - if err := p.writeField7(oprot); err != nil { return err } - if err := p.writeField8(oprot); err != nil { return err } - if err := p.writeField9(oprot); err != nil { return err } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) } - return nil +func (p *MyStructFieldPatch) IsSetEnumVal() bool { + return p != nil && p.EnumVal != nil } -func (p *MyStructFieldN28Patch) writeField1(oprot thrift.Protocol) (err error) { - if p.IsSetAssign() { - if err := oprot.WriteFieldBegin("assign", thrift.LIST, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assign: ", p), err) } - if err := oprot.WriteListBegin(thrift.I16, len(p.Assign)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Assign { - if err := oprot.WriteI16(int16(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assign: ", p), err) } - } - return err +func (p *MyStructFieldPatch) IsSetBinaryVal() bool { + return p != nil && p.BinaryVal != nil } -func (p *MyStructFieldN28Patch) writeField2(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("clear", thrift.BOOL, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clear: ", p), err) } - if err := oprot.WriteBool(bool(p.Clear)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.clear (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clear: ", p), err) } - return err +func (p *MyStructFieldPatch) IsSetStringVal() bool { + return p != nil && p.StringVal != nil } -func (p *MyStructFieldN28Patch) writeField3(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("patch", thrift.MAP, 3); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:patch: ", p), err) } - if err := oprot.WriteMapBegin(thrift.I32, thrift.STRUCT, len(p.Patch)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Patch { - if err := oprot.WriteI32(int32(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := v.Write(oprot); err != nil { - return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", v), err) - } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 3:patch: ", p), err) } - return err +func (p *MyStructFieldPatch) IsSetDoubleVal() bool { + return p != nil && p.DoubleVal != nil } -func (p *MyStructFieldN28Patch) writeField7(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("remove", thrift.LIST, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:remove: ", p), err) } - if err := oprot.WriteListBegin(thrift.I16, len(p.Remove)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Remove { - if err := oprot.WriteI16(int16(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:remove: ", p), err) } - return err +func (p *MyStructFieldPatch) IsSetFloatVal() bool { + return p != nil && p.FloatVal != nil } -func (p *MyStructFieldN28Patch) writeField8(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("prepend", thrift.LIST, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:prepend: ", p), err) } - if err := oprot.WriteListBegin(thrift.I16, len(p.Prepend)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Prepend { - if err := oprot.WriteI16(int16(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:prepend: ", p), err) } - return err +func (p *MyStructFieldPatch) IsSetI64Val() bool { + return p != nil && p.I64Val != nil } -func (p *MyStructFieldN28Patch) writeField9(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("append", thrift.LIST, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:append: ", p), err) } - if err := oprot.WriteListBegin(thrift.I16, len(p.Append)); err != nil { - return thrift.PrependError("error writing list begin: ", err) - } - for _, v := range p.Append { - if err := oprot.WriteI16(int16(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteListEnd(); err != nil { - return thrift.PrependError("error writing list end: ", err) +func (p *MyStructFieldPatch) IsSetI32Val() bool { + return p != nil && p.I32Val != nil +} + +func (p *MyStructFieldPatch) IsSetI16Val() bool { + return p != nil && p.I16Val != nil +} + +func (p *MyStructFieldPatch) IsSetByteVal() bool { + return p != nil && p.ByteVal != nil +} + +func (p *MyStructFieldPatch) IsSetBoolVal() bool { + return p != nil && p.BoolVal != nil +} + +type MyStructFieldPatchBuilder struct { + obj *MyStructFieldPatch +} + +func NewMyStructFieldPatchBuilder() *MyStructFieldPatchBuilder{ + return &MyStructFieldPatchBuilder{ + obj: NewMyStructFieldPatch(), } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:append: ", p), err) } - return err } -func (p *MyStructFieldN28Patch) String() string { - if p == nil { - return "" +func (p MyStructFieldPatchBuilder) Emit() *MyStructFieldPatch{ + return &MyStructFieldPatch{ + OptMapVal: p.obj.OptMapVal, + OptSetVal: p.obj.OptSetVal, + OptListVal: p.obj.OptListVal, + OptLateStructVal: p.obj.OptLateStructVal, + OptStructVal: p.obj.OptStructVal, + OptEnumVal: p.obj.OptEnumVal, + OptBinaryVal: p.obj.OptBinaryVal, + OptStringVal: p.obj.OptStringVal, + OptDoubleVal: p.obj.OptDoubleVal, + OptFloatVal: p.obj.OptFloatVal, + OptI64Val: p.obj.OptI64Val, + OptI32Val: p.obj.OptI32Val, + OptI16Val: p.obj.OptI16Val, + OptByteVal: p.obj.OptByteVal, + OptBoolVal: p.obj.OptBoolVal, + TimeVal: p.obj.TimeVal, + DurationVal: p.obj.DurationVal, + LateStructVal: p.obj.LateStructVal, + UnionVal: p.obj.UnionVal, + StructVal: p.obj.StructVal, + EnumVal: p.obj.EnumVal, + BinaryVal: p.obj.BinaryVal, + StringVal: p.obj.StringVal, + DoubleVal: p.obj.DoubleVal, + FloatVal: p.obj.FloatVal, + I64Val: p.obj.I64Val, + I32Val: p.obj.I32Val, + I16Val: p.obj.I16Val, + ByteVal: p.obj.ByteVal, + BoolVal: p.obj.BoolVal, } +} - assignVal := fmt.Sprintf("%v", p.Assign) - clearVal := fmt.Sprintf("%v", p.Clear) - patchVal := fmt.Sprintf("%v", p.Patch) - removeVal := fmt.Sprintf("%v", p.Remove) - prependVal := fmt.Sprintf("%v", p.Prepend) - appendVal := fmt.Sprintf("%v", p.Append) - return fmt.Sprintf("MyStructFieldN28Patch({Assign:%s Clear:%s Patch:%s Remove:%s Prepend:%s Append:%s})", assignVal, clearVal, patchVal, removeVal, prependVal, appendVal) +func (m *MyStructFieldPatchBuilder) OptMapVal(optMapVal *MyStructFieldN30Patch) *MyStructFieldPatchBuilder { + m.obj.OptMapVal = optMapVal + return m } -// Attributes: -// - Assign: Assigns a value. If set, all other operations are ignored. -// - Clear: Clears a value. Applies first. -// - Remove: Removes entries, if present. Applies third. -// - Add: Adds entries, if not already present. Applies fourth. -type MyStructFieldN29Patch struct { - Assign []string `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` - Clear bool `thrift:"clear,2" db:"clear" json:"clear"` - // unused fields # 3 to 6 - Remove []string `thrift:"remove,7" db:"remove" json:"remove"` - Add []string `thrift:"add,8" db:"add" json:"add"` +func (m *MyStructFieldPatchBuilder) OptSetVal(optSetVal *MyStructFieldN29Patch) *MyStructFieldPatchBuilder { + m.obj.OptSetVal = optSetVal + return m } -func NewMyStructFieldN29Patch() *MyStructFieldN29Patch { - return &MyStructFieldN29Patch{} +func (m *MyStructFieldPatchBuilder) OptListVal(optListVal *MyStructFieldN28Patch) *MyStructFieldPatchBuilder { + m.obj.OptListVal = optListVal + return m } -var MyStructFieldN29Patch_Assign_DEFAULT []string +func (m *MyStructFieldPatchBuilder) OptLateStructVal(optLateStructVal *LateDefStructPatch) *MyStructFieldPatchBuilder { + m.obj.OptLateStructVal = optLateStructVal + return m +} -func (p *MyStructFieldN29Patch) GetAssign() []string { - return p.Assign +func (m *MyStructFieldPatchBuilder) OptStructVal(optStructVal *MyDataPatch) *MyStructFieldPatchBuilder { + m.obj.OptStructVal = optStructVal + return m } -func (p *MyStructFieldN29Patch) GetClear() bool { - return p.Clear +func (m *MyStructFieldPatchBuilder) OptEnumVal(optEnumVal *MyStructFieldN25Patch) *MyStructFieldPatchBuilder { + m.obj.OptEnumVal = optEnumVal + return m } -func (p *MyStructFieldN29Patch) GetRemove() []string { - return p.Remove +func (m *MyStructFieldPatchBuilder) OptBinaryVal(optBinaryVal *patch1.BinaryPatch) *MyStructFieldPatchBuilder { + m.obj.OptBinaryVal = optBinaryVal + return m } -func (p *MyStructFieldN29Patch) GetAdd() []string { - return p.Add +func (m *MyStructFieldPatchBuilder) OptStringVal(optStringVal *patch1.StringPatch) *MyStructFieldPatchBuilder { + m.obj.OptStringVal = optStringVal + return m } -func (p *MyStructFieldN29Patch) IsSetAssign() bool { - return p != nil && p.Assign != nil + +func (m *MyStructFieldPatchBuilder) OptDoubleVal(optDoubleVal *patch1.DoublePatch) *MyStructFieldPatchBuilder { + m.obj.OptDoubleVal = optDoubleVal + return m } -type MyStructFieldN29PatchBuilder struct { - obj *MyStructFieldN29Patch +func (m *MyStructFieldPatchBuilder) OptFloatVal(optFloatVal *patch1.FloatPatch) *MyStructFieldPatchBuilder { + m.obj.OptFloatVal = optFloatVal + return m } -func NewMyStructFieldN29PatchBuilder() *MyStructFieldN29PatchBuilder{ - return &MyStructFieldN29PatchBuilder{ - obj: NewMyStructFieldN29Patch(), - } +func (m *MyStructFieldPatchBuilder) OptI64Val(optI64Val *patch1.I64Patch) *MyStructFieldPatchBuilder { + m.obj.OptI64Val = optI64Val + return m } -func (p MyStructFieldN29PatchBuilder) Emit() *MyStructFieldN29Patch{ - return &MyStructFieldN29Patch{ - Assign: p.obj.Assign, - Clear: p.obj.Clear, - Remove: p.obj.Remove, - Add: p.obj.Add, - } +func (m *MyStructFieldPatchBuilder) OptI32Val(optI32Val *patch1.I32Patch) *MyStructFieldPatchBuilder { + m.obj.OptI32Val = optI32Val + return m } -func (m *MyStructFieldN29PatchBuilder) Assign(assign []string) *MyStructFieldN29PatchBuilder { - m.obj.Assign = assign +func (m *MyStructFieldPatchBuilder) OptI16Val(optI16Val *patch1.I16Patch) *MyStructFieldPatchBuilder { + m.obj.OptI16Val = optI16Val return m } -func (m *MyStructFieldN29PatchBuilder) Clear(clear bool) *MyStructFieldN29PatchBuilder { - m.obj.Clear = clear +func (m *MyStructFieldPatchBuilder) OptByteVal(optByteVal *patch1.BytePatch) *MyStructFieldPatchBuilder { + m.obj.OptByteVal = optByteVal return m } -func (m *MyStructFieldN29PatchBuilder) Remove(remove []string) *MyStructFieldN29PatchBuilder { - m.obj.Remove = remove +func (m *MyStructFieldPatchBuilder) OptBoolVal(optBoolVal *patch1.BoolPatch) *MyStructFieldPatchBuilder { + m.obj.OptBoolVal = optBoolVal return m } -func (m *MyStructFieldN29PatchBuilder) Add(add []string) *MyStructFieldN29PatchBuilder { - m.obj.Add = add +func (m *MyStructFieldPatchBuilder) TimeVal(timeVal *patch1.TimePatch) *MyStructFieldPatchBuilder { + m.obj.TimeVal = timeVal return m } -func (m *MyStructFieldN29Patch) SetAssign(assign []string) *MyStructFieldN29Patch { - m.Assign = assign +func (m *MyStructFieldPatchBuilder) DurationVal(durationVal *patch1.DurationPatch) *MyStructFieldPatchBuilder { + m.obj.DurationVal = durationVal return m } -func (m *MyStructFieldN29Patch) SetClear(clear bool) *MyStructFieldN29Patch { - m.Clear = clear +func (m *MyStructFieldPatchBuilder) LateStructVal(lateStructVal *LateDefStructPatch) *MyStructFieldPatchBuilder { + m.obj.LateStructVal = lateStructVal return m } -func (m *MyStructFieldN29Patch) SetRemove(remove []string) *MyStructFieldN29Patch { - m.Remove = remove +func (m *MyStructFieldPatchBuilder) UnionVal(unionVal *MyUnionPatch) *MyStructFieldPatchBuilder { + m.obj.UnionVal = unionVal return m } -func (m *MyStructFieldN29Patch) SetAdd(add []string) *MyStructFieldN29Patch { - m.Add = add +func (m *MyStructFieldPatchBuilder) StructVal(structVal *MyDataPatch) *MyStructFieldPatchBuilder { + m.obj.StructVal = structVal return m } -func (p *MyStructFieldN29Patch) Read(iprot thrift.Protocol) error { - if _, err := iprot.ReadStructBegin(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) - } +func (m *MyStructFieldPatchBuilder) EnumVal(enumVal *MyStructFieldN10Patch) *MyStructFieldPatchBuilder { + m.obj.EnumVal = enumVal + return m +} +func (m *MyStructFieldPatchBuilder) BinaryVal(binaryVal *patch1.BinaryPatch) *MyStructFieldPatchBuilder { + m.obj.BinaryVal = binaryVal + return m +} - for { - _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() - if err != nil { - return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) - } - if fieldTypeId == thrift.STOP { break; } - switch fieldId { - case 1: - if err := p.ReadField1(iprot); err != nil { - return err - } - case 2: - if err := p.ReadField2(iprot); err != nil { - return err - } - case 7: - if err := p.ReadField7(iprot); err != nil { - return err - } - case 8: - if err := p.ReadField8(iprot); err != nil { - return err - } - default: - if err := iprot.Skip(fieldTypeId); err != nil { - return err - } - } - if err := iprot.ReadFieldEnd(); err != nil { - return err - } - } - if err := iprot.ReadStructEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err) - } - return nil +func (m *MyStructFieldPatchBuilder) StringVal(stringVal *patch1.StringPatch) *MyStructFieldPatchBuilder { + m.obj.StringVal = stringVal + return m } -func (p *MyStructFieldN29Patch) ReadField1(iprot thrift.Protocol) error { - _, size, err := iprot.ReadSetBegin() - if err != nil { - return thrift.PrependError("error reading set begin: ", err) - } - tSet := make([]string, 0, size) - p.Assign = tSet - for i := 0; i < size; i ++ { - var _elem13 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem13 = v - } - p.Assign = append(p.Assign, _elem13) - } - if err := iprot.ReadSetEnd(); err != nil { - return thrift.PrependError("error reading set end: ", err) - } - return nil +func (m *MyStructFieldPatchBuilder) DoubleVal(doubleVal *patch1.DoublePatch) *MyStructFieldPatchBuilder { + m.obj.DoubleVal = doubleVal + return m } -func (p *MyStructFieldN29Patch) ReadField2(iprot thrift.Protocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Clear = v - } - return nil +func (m *MyStructFieldPatchBuilder) FloatVal(floatVal *patch1.FloatPatch) *MyStructFieldPatchBuilder { + m.obj.FloatVal = floatVal + return m } -func (p *MyStructFieldN29Patch) ReadField7(iprot thrift.Protocol) error { - _, size, err := iprot.ReadSetBegin() - if err != nil { - return thrift.PrependError("error reading set begin: ", err) - } - tSet := make([]string, 0, size) - p.Remove = tSet - for i := 0; i < size; i ++ { - var _elem14 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem14 = v - } - p.Remove = append(p.Remove, _elem14) - } - if err := iprot.ReadSetEnd(); err != nil { - return thrift.PrependError("error reading set end: ", err) - } - return nil +func (m *MyStructFieldPatchBuilder) I64Val(i64Val *patch1.I64Patch) *MyStructFieldPatchBuilder { + m.obj.I64Val = i64Val + return m } -func (p *MyStructFieldN29Patch) ReadField8(iprot thrift.Protocol) error { - _, size, err := iprot.ReadSetBegin() - if err != nil { - return thrift.PrependError("error reading set begin: ", err) - } - tSet := make([]string, 0, size) - p.Add = tSet - for i := 0; i < size; i ++ { - var _elem15 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem15 = v - } - p.Add = append(p.Add, _elem15) - } - if err := iprot.ReadSetEnd(); err != nil { - return thrift.PrependError("error reading set end: ", err) - } - return nil +func (m *MyStructFieldPatchBuilder) I32Val(i32Val *patch1.I32Patch) *MyStructFieldPatchBuilder { + m.obj.I32Val = i32Val + return m } -func (p *MyStructFieldN29Patch) Write(oprot thrift.Protocol) error { - if err := oprot.WriteStructBegin("MyStructFieldN29Patch"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField7(oprot); err != nil { return err } - if err := p.writeField8(oprot); err != nil { return err } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) } - return nil +func (m *MyStructFieldPatchBuilder) I16Val(i16Val *patch1.I16Patch) *MyStructFieldPatchBuilder { + m.obj.I16Val = i16Val + return m } -func (p *MyStructFieldN29Patch) writeField1(oprot thrift.Protocol) (err error) { - if p.IsSetAssign() { - if err := oprot.WriteFieldBegin("assign", thrift.SET, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assign: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRING, len(p.Assign)); err != nil { - return thrift.PrependError("error writing set begin: ", err) - } - set := make(map[string]bool, len(p.Assign)) - for _, v := range p.Assign { - if ok := set[v]; ok { - return thrift.PrependError("", fmt.Errorf("%T error writing set field: slice is not unique", v)) - } - set[v] = true - } - for _, v := range p.Assign { - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteSetEnd(); err != nil { - return thrift.PrependError("error writing set end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assign: ", p), err) } - } - return err +func (m *MyStructFieldPatchBuilder) ByteVal(byteVal *patch1.BytePatch) *MyStructFieldPatchBuilder { + m.obj.ByteVal = byteVal + return m } -func (p *MyStructFieldN29Patch) writeField2(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("clear", thrift.BOOL, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clear: ", p), err) } - if err := oprot.WriteBool(bool(p.Clear)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.clear (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clear: ", p), err) } - return err +func (m *MyStructFieldPatchBuilder) BoolVal(boolVal *patch1.BoolPatch) *MyStructFieldPatchBuilder { + m.obj.BoolVal = boolVal + return m } -func (p *MyStructFieldN29Patch) writeField7(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("remove", thrift.SET, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:remove: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRING, len(p.Remove)); err != nil { - return thrift.PrependError("error writing set begin: ", err) - } - set := make(map[string]bool, len(p.Remove)) - for _, v := range p.Remove { - if ok := set[v]; ok { - return thrift.PrependError("", fmt.Errorf("%T error writing set field: slice is not unique", v)) - } - set[v] = true - } - for _, v := range p.Remove { - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteSetEnd(); err != nil { - return thrift.PrependError("error writing set end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:remove: ", p), err) } - return err +func (m *MyStructFieldPatch) SetOptMapVal(optMapVal *MyStructFieldN30Patch) *MyStructFieldPatch { + m.OptMapVal = optMapVal + return m } -func (p *MyStructFieldN29Patch) writeField8(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("add", thrift.SET, 8); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 8:add: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRING, len(p.Add)); err != nil { - return thrift.PrependError("error writing set begin: ", err) - } - set := make(map[string]bool, len(p.Add)) - for _, v := range p.Add { - if ok := set[v]; ok { - return thrift.PrependError("", fmt.Errorf("%T error writing set field: slice is not unique", v)) - } - set[v] = true - } - for _, v := range p.Add { - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteSetEnd(); err != nil { - return thrift.PrependError("error writing set end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 8:add: ", p), err) } - return err +func (m *MyStructFieldPatch) SetOptSetVal(optSetVal *MyStructFieldN29Patch) *MyStructFieldPatch { + m.OptSetVal = optSetVal + return m } -func (p *MyStructFieldN29Patch) String() string { - if p == nil { - return "" - } - - assignVal := fmt.Sprintf("%v", p.Assign) - clearVal := fmt.Sprintf("%v", p.Clear) - removeVal := fmt.Sprintf("%v", p.Remove) - addVal := fmt.Sprintf("%v", p.Add) - return fmt.Sprintf("MyStructFieldN29Patch({Assign:%s Clear:%s Remove:%s Add:%s})", assignVal, clearVal, removeVal, addVal) +func (m *MyStructFieldPatch) SetOptListVal(optListVal *MyStructFieldN28Patch) *MyStructFieldPatch { + m.OptListVal = optListVal + return m } -// Attributes: -// - Assign: Assigns a value. If set, all other operations are ignored. -// - Clear: Clears a value. Applies first. -// - Add: Add the given values, if the keys are not already present. Applies forth. -// - Remove: Removes entries, if present. Applies third. -// - Put: Adds or replaces the given key/value pairs. Applies fifth. -type MyStructFieldN30Patch struct { - Assign map[string]string `thrift:"assign,1,optional" db:"assign" json:"assign,omitempty"` - Clear bool `thrift:"clear,2" db:"clear" json:"clear"` - // unused fields # 3 to 4 - Add map[string]string `thrift:"add,5" db:"add" json:"add"` - // unused field # 6 - Remove []string `thrift:"remove,7" db:"remove" json:"remove"` - // unused field # 8 - Put map[string]string `thrift:"put,9" db:"put" json:"put"` +func (m *MyStructFieldPatch) SetOptLateStructVal(optLateStructVal *LateDefStructPatch) *MyStructFieldPatch { + m.OptLateStructVal = optLateStructVal + return m } -func NewMyStructFieldN30Patch() *MyStructFieldN30Patch { - return &MyStructFieldN30Patch{} +func (m *MyStructFieldPatch) SetOptStructVal(optStructVal *MyDataPatch) *MyStructFieldPatch { + m.OptStructVal = optStructVal + return m } -var MyStructFieldN30Patch_Assign_DEFAULT map[string]string +func (m *MyStructFieldPatch) SetOptEnumVal(optEnumVal *MyStructFieldN25Patch) *MyStructFieldPatch { + m.OptEnumVal = optEnumVal + return m +} -func (p *MyStructFieldN30Patch) GetAssign() map[string]string { - return p.Assign +func (m *MyStructFieldPatch) SetOptBinaryVal(optBinaryVal *patch1.BinaryPatch) *MyStructFieldPatch { + m.OptBinaryVal = optBinaryVal + return m } -func (p *MyStructFieldN30Patch) GetClear() bool { - return p.Clear +func (m *MyStructFieldPatch) SetOptStringVal(optStringVal *patch1.StringPatch) *MyStructFieldPatch { + m.OptStringVal = optStringVal + return m } -func (p *MyStructFieldN30Patch) GetAdd() map[string]string { - return p.Add +func (m *MyStructFieldPatch) SetOptDoubleVal(optDoubleVal *patch1.DoublePatch) *MyStructFieldPatch { + m.OptDoubleVal = optDoubleVal + return m } -func (p *MyStructFieldN30Patch) GetRemove() []string { - return p.Remove +func (m *MyStructFieldPatch) SetOptFloatVal(optFloatVal *patch1.FloatPatch) *MyStructFieldPatch { + m.OptFloatVal = optFloatVal + return m } -func (p *MyStructFieldN30Patch) GetPut() map[string]string { - return p.Put +func (m *MyStructFieldPatch) SetOptI64Val(optI64Val *patch1.I64Patch) *MyStructFieldPatch { + m.OptI64Val = optI64Val + return m } -func (p *MyStructFieldN30Patch) IsSetAssign() bool { - return p != nil && p.Assign != nil + +func (m *MyStructFieldPatch) SetOptI32Val(optI32Val *patch1.I32Patch) *MyStructFieldPatch { + m.OptI32Val = optI32Val + return m } -type MyStructFieldN30PatchBuilder struct { - obj *MyStructFieldN30Patch +func (m *MyStructFieldPatch) SetOptI16Val(optI16Val *patch1.I16Patch) *MyStructFieldPatch { + m.OptI16Val = optI16Val + return m } -func NewMyStructFieldN30PatchBuilder() *MyStructFieldN30PatchBuilder{ - return &MyStructFieldN30PatchBuilder{ - obj: NewMyStructFieldN30Patch(), - } +func (m *MyStructFieldPatch) SetOptByteVal(optByteVal *patch1.BytePatch) *MyStructFieldPatch { + m.OptByteVal = optByteVal + return m } -func (p MyStructFieldN30PatchBuilder) Emit() *MyStructFieldN30Patch{ - return &MyStructFieldN30Patch{ - Assign: p.obj.Assign, - Clear: p.obj.Clear, - Add: p.obj.Add, - Remove: p.obj.Remove, - Put: p.obj.Put, - } +func (m *MyStructFieldPatch) SetOptBoolVal(optBoolVal *patch1.BoolPatch) *MyStructFieldPatch { + m.OptBoolVal = optBoolVal + return m } -func (m *MyStructFieldN30PatchBuilder) Assign(assign map[string]string) *MyStructFieldN30PatchBuilder { - m.obj.Assign = assign +func (m *MyStructFieldPatch) SetTimeVal(timeVal *patch1.TimePatch) *MyStructFieldPatch { + m.TimeVal = timeVal return m } -func (m *MyStructFieldN30PatchBuilder) Clear(clear bool) *MyStructFieldN30PatchBuilder { - m.obj.Clear = clear +func (m *MyStructFieldPatch) SetDurationVal(durationVal *patch1.DurationPatch) *MyStructFieldPatch { + m.DurationVal = durationVal return m } -func (m *MyStructFieldN30PatchBuilder) Add(add map[string]string) *MyStructFieldN30PatchBuilder { - m.obj.Add = add +func (m *MyStructFieldPatch) SetLateStructVal(lateStructVal *LateDefStructPatch) *MyStructFieldPatch { + m.LateStructVal = lateStructVal return m } -func (m *MyStructFieldN30PatchBuilder) Remove(remove []string) *MyStructFieldN30PatchBuilder { - m.obj.Remove = remove +func (m *MyStructFieldPatch) SetUnionVal(unionVal *MyUnionPatch) *MyStructFieldPatch { + m.UnionVal = unionVal return m } -func (m *MyStructFieldN30PatchBuilder) Put(put map[string]string) *MyStructFieldN30PatchBuilder { - m.obj.Put = put +func (m *MyStructFieldPatch) SetStructVal(structVal *MyDataPatch) *MyStructFieldPatch { + m.StructVal = structVal return m } -func (m *MyStructFieldN30Patch) SetAssign(assign map[string]string) *MyStructFieldN30Patch { - m.Assign = assign +func (m *MyStructFieldPatch) SetEnumVal(enumVal *MyStructFieldN10Patch) *MyStructFieldPatch { + m.EnumVal = enumVal return m } -func (m *MyStructFieldN30Patch) SetClear(clear bool) *MyStructFieldN30Patch { - m.Clear = clear +func (m *MyStructFieldPatch) SetBinaryVal(binaryVal *patch1.BinaryPatch) *MyStructFieldPatch { + m.BinaryVal = binaryVal return m } -func (m *MyStructFieldN30Patch) SetAdd(add map[string]string) *MyStructFieldN30Patch { - m.Add = add +func (m *MyStructFieldPatch) SetStringVal(stringVal *patch1.StringPatch) *MyStructFieldPatch { + m.StringVal = stringVal return m } -func (m *MyStructFieldN30Patch) SetRemove(remove []string) *MyStructFieldN30Patch { - m.Remove = remove +func (m *MyStructFieldPatch) SetDoubleVal(doubleVal *patch1.DoublePatch) *MyStructFieldPatch { + m.DoubleVal = doubleVal return m } -func (m *MyStructFieldN30Patch) SetPut(put map[string]string) *MyStructFieldN30Patch { - m.Put = put +func (m *MyStructFieldPatch) SetFloatVal(floatVal *patch1.FloatPatch) *MyStructFieldPatch { + m.FloatVal = floatVal return m } -func (p *MyStructFieldN30Patch) Read(iprot thrift.Protocol) error { +func (m *MyStructFieldPatch) SetI64Val(i64Val *patch1.I64Patch) *MyStructFieldPatch { + m.I64Val = i64Val + return m +} + +func (m *MyStructFieldPatch) SetI32Val(i32Val *patch1.I32Patch) *MyStructFieldPatch { + m.I32Val = i32Val + return m +} + +func (m *MyStructFieldPatch) SetI16Val(i16Val *patch1.I16Patch) *MyStructFieldPatch { + m.I16Val = i16Val + return m +} + +func (m *MyStructFieldPatch) SetByteVal(byteVal *patch1.BytePatch) *MyStructFieldPatch { + m.ByteVal = byteVal + return m +} + +func (m *MyStructFieldPatch) SetBoolVal(boolVal *patch1.BoolPatch) *MyStructFieldPatch { + m.BoolVal = boolVal + return m +} + +func (p *MyStructFieldPatch) Read(iprot thrift.Protocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) } @@ -6809,24 +6151,124 @@ func (p *MyStructFieldN30Patch) Read(iprot thrift.Protocol) error { } if fieldTypeId == thrift.STOP { break; } switch fieldId { - case 1: - if err := p.ReadField1(iprot); err != nil { + case -30: + if err := p.ReadField_30(iprot); err != nil { return err } - case 2: - if err := p.ReadField2(iprot); err != nil { + case -29: + if err := p.ReadField_29(iprot); err != nil { return err } - case 5: - if err := p.ReadField5(iprot); err != nil { + case -28: + if err := p.ReadField_28(iprot); err != nil { return err } - case 7: - if err := p.ReadField7(iprot); err != nil { + case -27: + if err := p.ReadField_27(iprot); err != nil { return err } - case 9: - if err := p.ReadField9(iprot); err != nil { + case -26: + if err := p.ReadField_26(iprot); err != nil { + return err + } + case -25: + if err := p.ReadField_25(iprot); err != nil { + return err + } + case -24: + if err := p.ReadField_24(iprot); err != nil { + return err + } + case -23: + if err := p.ReadField_23(iprot); err != nil { + return err + } + case -22: + if err := p.ReadField_22(iprot); err != nil { + return err + } + case -21: + if err := p.ReadField_21(iprot); err != nil { + return err + } + case -20: + if err := p.ReadField_20(iprot); err != nil { + return err + } + case -19: + if err := p.ReadField_19(iprot); err != nil { + return err + } + case -18: + if err := p.ReadField_18(iprot); err != nil { + return err + } + case -17: + if err := p.ReadField_17(iprot); err != nil { + return err + } + case -16: + if err := p.ReadField_16(iprot); err != nil { + return err + } + case -15: + if err := p.ReadField_15(iprot); err != nil { + return err + } + case -14: + if err := p.ReadField_14(iprot); err != nil { + return err + } + case -13: + if err := p.ReadField_13(iprot); err != nil { + return err + } + case -12: + if err := p.ReadField_12(iprot); err != nil { + return err + } + case -11: + if err := p.ReadField_11(iprot); err != nil { + return err + } + case -10: + if err := p.ReadField_10(iprot); err != nil { + return err + } + case -9: + if err := p.ReadField_9(iprot); err != nil { + return err + } + case -8: + if err := p.ReadField_8(iprot); err != nil { + return err + } + case -7: + if err := p.ReadField_7(iprot); err != nil { + return err + } + case -6: + if err := p.ReadField_6(iprot); err != nil { + return err + } + case -5: + if err := p.ReadField_5(iprot); err != nil { + return err + } + case -4: + if err := p.ReadField_4(iprot); err != nil { + return err + } + case -3: + if err := p.ReadField_3(iprot); err != nil { + return err + } + case -2: + if err := p.ReadField_2(iprot); err != nil { + return err + } + case -1: + if err := p.ReadField_1(iprot); err != nil { return err } default: @@ -6844,244 +6286,802 @@ func (p *MyStructFieldN30Patch) Read(iprot thrift.Protocol) error { return nil } -func (p *MyStructFieldN30Patch) ReadField1(iprot thrift.Protocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.Assign = tMap - for i := 0; i < size; i ++ { - var _key16 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key16 = v - } - var _val17 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val17 = v - } - p.Assign[_key16] = _val17 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) +func (p *MyStructFieldPatch) ReadField_30(iprot thrift.Protocol) error { + p.OptMapVal = NewMyStructFieldN30Patch() + if err := p.OptMapVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptMapVal), err) } return nil } -func (p *MyStructFieldN30Patch) ReadField2(iprot thrift.Protocol) error { - if v, err := iprot.ReadBool(); err != nil { - return thrift.PrependError("error reading field 2: ", err) - } else { - p.Clear = v +func (p *MyStructFieldPatch) ReadField_29(iprot thrift.Protocol) error { + p.OptSetVal = NewMyStructFieldN29Patch() + if err := p.OptSetVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptSetVal), err) } return nil } -func (p *MyStructFieldN30Patch) ReadField5(iprot thrift.Protocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.Add = tMap - for i := 0; i < size; i ++ { - var _key18 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key18 = v - } - var _val19 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val19 = v - } - p.Add[_key18] = _val19 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) +func (p *MyStructFieldPatch) ReadField_28(iprot thrift.Protocol) error { + p.OptListVal = NewMyStructFieldN28Patch() + if err := p.OptListVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptListVal), err) } return nil } -func (p *MyStructFieldN30Patch) ReadField7(iprot thrift.Protocol) error { - _, size, err := iprot.ReadSetBegin() - if err != nil { - return thrift.PrependError("error reading set begin: ", err) - } - tSet := make([]string, 0, size) - p.Remove = tSet - for i := 0; i < size; i ++ { - var _elem20 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _elem20 = v - } - p.Remove = append(p.Remove, _elem20) - } - if err := iprot.ReadSetEnd(); err != nil { - return thrift.PrependError("error reading set end: ", err) +func (p *MyStructFieldPatch) ReadField_27(iprot thrift.Protocol) error { + p.OptLateStructVal = NewLateDefStructPatch() + if err := p.OptLateStructVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptLateStructVal), err) } return nil } -func (p *MyStructFieldN30Patch) ReadField9(iprot thrift.Protocol) error { - _, _, size, err := iprot.ReadMapBegin() - if err != nil { - return thrift.PrependError("error reading map begin: ", err) - } - tMap := make(map[string]string, size) - p.Put = tMap - for i := 0; i < size; i ++ { - var _key21 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _key21 = v - } - var _val22 string - if v, err := iprot.ReadString(); err != nil { - return thrift.PrependError("error reading field 0: ", err) - } else { - _val22 = v - } - p.Put[_key21] = _val22 - } - if err := iprot.ReadMapEnd(); err != nil { - return thrift.PrependError("error reading map end: ", err) +func (p *MyStructFieldPatch) ReadField_26(iprot thrift.Protocol) error { + p.OptStructVal = NewMyDataPatch() + if err := p.OptStructVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptStructVal), err) } return nil } -func (p *MyStructFieldN30Patch) Write(oprot thrift.Protocol) error { - if err := oprot.WriteStructBegin("MyStructFieldN30Patch"); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } - if err := p.writeField1(oprot); err != nil { return err } - if err := p.writeField2(oprot); err != nil { return err } - if err := p.writeField5(oprot); err != nil { return err } - if err := p.writeField7(oprot); err != nil { return err } - if err := p.writeField9(oprot); err != nil { return err } - if err := oprot.WriteFieldStop(); err != nil { - return thrift.PrependError("write field stop error: ", err) } - if err := oprot.WriteStructEnd(); err != nil { - return thrift.PrependError("write struct stop error: ", err) } +func (p *MyStructFieldPatch) ReadField_25(iprot thrift.Protocol) error { + p.OptEnumVal = NewMyStructFieldN25Patch() + if err := p.OptEnumVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptEnumVal), err) + } return nil } -func (p *MyStructFieldN30Patch) writeField1(oprot thrift.Protocol) (err error) { - if p.IsSetAssign() { - if err := oprot.WriteFieldBegin("assign", thrift.MAP, 1); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:assign: ", p), err) } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Assign)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Assign { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) - } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 1:assign: ", p), err) } +func (p *MyStructFieldPatch) ReadField_24(iprot thrift.Protocol) error { + p.OptBinaryVal = patch1.NewBinaryPatch() + if err := p.OptBinaryVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptBinaryVal), err) } - return err + return nil } -func (p *MyStructFieldN30Patch) writeField2(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("clear", thrift.BOOL, 2); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:clear: ", p), err) } - if err := oprot.WriteBool(bool(p.Clear)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T.clear (2) field write error: ", p), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 2:clear: ", p), err) } - return err +func (p *MyStructFieldPatch) ReadField_23(iprot thrift.Protocol) error { + p.OptStringVal = patch1.NewStringPatch() + if err := p.OptStringVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptStringVal), err) + } + return nil } -func (p *MyStructFieldN30Patch) writeField5(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("add", thrift.MAP, 5); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:add: ", p), err) } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Add)); err != nil { - return thrift.PrependError("error writing map begin: ", err) - } - for k, v := range p.Add { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) +func (p *MyStructFieldPatch) ReadField_22(iprot thrift.Protocol) error { + p.OptDoubleVal = patch1.NewDoublePatch() + if err := p.OptDoubleVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptDoubleVal), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 5:add: ", p), err) } - return err + return nil } -func (p *MyStructFieldN30Patch) writeField7(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("remove", thrift.SET, 7); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 7:remove: ", p), err) } - if err := oprot.WriteSetBegin(thrift.STRING, len(p.Remove)); err != nil { - return thrift.PrependError("error writing set begin: ", err) - } - set := make(map[string]bool, len(p.Remove)) - for _, v := range p.Remove { - if ok := set[v]; ok { - return thrift.PrependError("", fmt.Errorf("%T error writing set field: slice is not unique", v)) - } - set[v] = true - } - for _, v := range p.Remove { - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } +func (p *MyStructFieldPatch) ReadField_21(iprot thrift.Protocol) error { + p.OptFloatVal = patch1.NewFloatPatch() + if err := p.OptFloatVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptFloatVal), err) } - if err := oprot.WriteSetEnd(); err != nil { - return thrift.PrependError("error writing set end: ", err) + return nil +} + +func (p *MyStructFieldPatch) ReadField_20(iprot thrift.Protocol) error { + p.OptI64Val = patch1.NewI64Patch() + if err := p.OptI64Val.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptI64Val), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 7:remove: ", p), err) } - return err + return nil } -func (p *MyStructFieldN30Patch) writeField9(oprot thrift.Protocol) (err error) { - if err := oprot.WriteFieldBegin("put", thrift.MAP, 9); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:put: ", p), err) } - if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Put)); err != nil { - return thrift.PrependError("error writing map begin: ", err) +func (p *MyStructFieldPatch) ReadField_19(iprot thrift.Protocol) error { + p.OptI32Val = patch1.NewI32Patch() + if err := p.OptI32Val.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptI32Val), err) } - for k, v := range p.Put { - if err := oprot.WriteString(string(k)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } - if err := oprot.WriteString(string(v)); err != nil { - return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err) } + return nil +} + +func (p *MyStructFieldPatch) ReadField_18(iprot thrift.Protocol) error { + p.OptI16Val = patch1.NewI16Patch() + if err := p.OptI16Val.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptI16Val), err) } - if err := oprot.WriteMapEnd(); err != nil { - return thrift.PrependError("error writing map end: ", err) + return nil +} + +func (p *MyStructFieldPatch) ReadField_17(iprot thrift.Protocol) error { + p.OptByteVal = patch1.NewBytePatch() + if err := p.OptByteVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptByteVal), err) } - if err := oprot.WriteFieldEnd(); err != nil { - return thrift.PrependError(fmt.Sprintf("%T write field end error 9:put: ", p), err) } - return err + return nil } -func (p *MyStructFieldN30Patch) String() string { - if p == nil { - return "" +func (p *MyStructFieldPatch) ReadField_16(iprot thrift.Protocol) error { + p.OptBoolVal = patch1.NewBoolPatch() + if err := p.OptBoolVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.OptBoolVal), err) } + return nil +} - assignVal := fmt.Sprintf("%v", p.Assign) - clearVal := fmt.Sprintf("%v", p.Clear) - addVal := fmt.Sprintf("%v", p.Add) - removeVal := fmt.Sprintf("%v", p.Remove) - putVal := fmt.Sprintf("%v", p.Put) - return fmt.Sprintf("MyStructFieldN30Patch({Assign:%s Clear:%s Add:%s Remove:%s Put:%s})", assignVal, clearVal, addVal, removeVal, putVal) +func (p *MyStructFieldPatch) ReadField_15(iprot thrift.Protocol) error { + p.TimeVal = patch1.NewTimePatch() + if err := p.TimeVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.TimeVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_14(iprot thrift.Protocol) error { + p.DurationVal = patch1.NewDurationPatch() + if err := p.DurationVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DurationVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_13(iprot thrift.Protocol) error { + p.LateStructVal = NewLateDefStructPatch() + if err := p.LateStructVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.LateStructVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_12(iprot thrift.Protocol) error { + p.UnionVal = NewMyUnionPatch() + if err := p.UnionVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.UnionVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_11(iprot thrift.Protocol) error { + p.StructVal = NewMyDataPatch() + if err := p.StructVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.StructVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_10(iprot thrift.Protocol) error { + p.EnumVal = NewMyStructFieldN10Patch() + if err := p.EnumVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.EnumVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_9(iprot thrift.Protocol) error { + p.BinaryVal = patch1.NewBinaryPatch() + if err := p.BinaryVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.BinaryVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_8(iprot thrift.Protocol) error { + p.StringVal = patch1.NewStringPatch() + if err := p.StringVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.StringVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_7(iprot thrift.Protocol) error { + p.DoubleVal = patch1.NewDoublePatch() + if err := p.DoubleVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.DoubleVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_6(iprot thrift.Protocol) error { + p.FloatVal = patch1.NewFloatPatch() + if err := p.FloatVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.FloatVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_5(iprot thrift.Protocol) error { + p.I64Val = patch1.NewI64Patch() + if err := p.I64Val.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.I64Val), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_4(iprot thrift.Protocol) error { + p.I32Val = patch1.NewI32Patch() + if err := p.I32Val.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.I32Val), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_3(iprot thrift.Protocol) error { + p.I16Val = patch1.NewI16Patch() + if err := p.I16Val.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.I16Val), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_2(iprot thrift.Protocol) error { + p.ByteVal = patch1.NewBytePatch() + if err := p.ByteVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ByteVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) ReadField_1(iprot thrift.Protocol) error { + p.BoolVal = patch1.NewBoolPatch() + if err := p.BoolVal.Read(iprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.BoolVal), err) + } + return nil +} + +func (p *MyStructFieldPatch) Write(oprot thrift.Protocol) error { + if err := oprot.WriteStructBegin("MyStructFieldPatch"); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err) } + if err := p.writeField_30(oprot); err != nil { return err } + if err := p.writeField_29(oprot); err != nil { return err } + if err := p.writeField_28(oprot); err != nil { return err } + if err := p.writeField_27(oprot); err != nil { return err } + if err := p.writeField_26(oprot); err != nil { return err } + if err := p.writeField_25(oprot); err != nil { return err } + if err := p.writeField_24(oprot); err != nil { return err } + if err := p.writeField_23(oprot); err != nil { return err } + if err := p.writeField_22(oprot); err != nil { return err } + if err := p.writeField_21(oprot); err != nil { return err } + if err := p.writeField_20(oprot); err != nil { return err } + if err := p.writeField_19(oprot); err != nil { return err } + if err := p.writeField_18(oprot); err != nil { return err } + if err := p.writeField_17(oprot); err != nil { return err } + if err := p.writeField_16(oprot); err != nil { return err } + if err := p.writeField_15(oprot); err != nil { return err } + if err := p.writeField_14(oprot); err != nil { return err } + if err := p.writeField_13(oprot); err != nil { return err } + if err := p.writeField_12(oprot); err != nil { return err } + if err := p.writeField_11(oprot); err != nil { return err } + if err := p.writeField_10(oprot); err != nil { return err } + if err := p.writeField_9(oprot); err != nil { return err } + if err := p.writeField_8(oprot); err != nil { return err } + if err := p.writeField_7(oprot); err != nil { return err } + if err := p.writeField_6(oprot); err != nil { return err } + if err := p.writeField_5(oprot); err != nil { return err } + if err := p.writeField_4(oprot); err != nil { return err } + if err := p.writeField_3(oprot); err != nil { return err } + if err := p.writeField_2(oprot); err != nil { return err } + if err := p.writeField_1(oprot); err != nil { return err } + if err := oprot.WriteFieldStop(); err != nil { + return thrift.PrependError("write field stop error: ", err) } + if err := oprot.WriteStructEnd(); err != nil { + return thrift.PrependError("write struct stop error: ", err) } + return nil +} + +func (p *MyStructFieldPatch) writeField_30(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optMapVal", thrift.STRUCT, -30); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -30:optMapVal: ", p), err) } + if err := p.OptMapVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptMapVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -30:optMapVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_29(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optSetVal", thrift.STRUCT, -29); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -29:optSetVal: ", p), err) } + if err := p.OptSetVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptSetVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -29:optSetVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_28(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optListVal", thrift.STRUCT, -28); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -28:optListVal: ", p), err) } + if err := p.OptListVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptListVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -28:optListVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_27(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optLateStructVal", thrift.STRUCT, -27); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -27:optLateStructVal: ", p), err) } + if err := p.OptLateStructVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptLateStructVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -27:optLateStructVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_26(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optStructVal", thrift.STRUCT, -26); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -26:optStructVal: ", p), err) } + if err := p.OptStructVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptStructVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -26:optStructVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_25(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optEnumVal", thrift.STRUCT, -25); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -25:optEnumVal: ", p), err) } + if err := p.OptEnumVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptEnumVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -25:optEnumVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_24(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optBinaryVal", thrift.STRUCT, -24); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -24:optBinaryVal: ", p), err) } + if err := p.OptBinaryVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptBinaryVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -24:optBinaryVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_23(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optStringVal", thrift.STRUCT, -23); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -23:optStringVal: ", p), err) } + if err := p.OptStringVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptStringVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -23:optStringVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_22(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optDoubleVal", thrift.STRUCT, -22); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -22:optDoubleVal: ", p), err) } + if err := p.OptDoubleVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptDoubleVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -22:optDoubleVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_21(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optFloatVal", thrift.STRUCT, -21); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -21:optFloatVal: ", p), err) } + if err := p.OptFloatVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptFloatVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -21:optFloatVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_20(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optI64Val", thrift.STRUCT, -20); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -20:optI64Val: ", p), err) } + if err := p.OptI64Val.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptI64Val), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -20:optI64Val: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_19(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optI32Val", thrift.STRUCT, -19); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -19:optI32Val: ", p), err) } + if err := p.OptI32Val.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptI32Val), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -19:optI32Val: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_18(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optI16Val", thrift.STRUCT, -18); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -18:optI16Val: ", p), err) } + if err := p.OptI16Val.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptI16Val), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -18:optI16Val: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_17(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optByteVal", thrift.STRUCT, -17); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -17:optByteVal: ", p), err) } + if err := p.OptByteVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptByteVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -17:optByteVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_16(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("optBoolVal", thrift.STRUCT, -16); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -16:optBoolVal: ", p), err) } + if err := p.OptBoolVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.OptBoolVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -16:optBoolVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_15(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("timeVal", thrift.STRUCT, -15); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -15:timeVal: ", p), err) } + if err := p.TimeVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.TimeVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -15:timeVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_14(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("durationVal", thrift.STRUCT, -14); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -14:durationVal: ", p), err) } + if err := p.DurationVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DurationVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -14:durationVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_13(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("lateStructVal", thrift.STRUCT, -13); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -13:lateStructVal: ", p), err) } + if err := p.LateStructVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.LateStructVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -13:lateStructVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_12(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("unionVal", thrift.STRUCT, -12); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -12:unionVal: ", p), err) } + if err := p.UnionVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.UnionVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -12:unionVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_11(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("structVal", thrift.STRUCT, -11); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -11:structVal: ", p), err) } + if err := p.StructVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.StructVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -11:structVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_10(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("enumVal", thrift.STRUCT, -10); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -10:enumVal: ", p), err) } + if err := p.EnumVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.EnumVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -10:enumVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_9(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("binaryVal", thrift.STRUCT, -9); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -9:binaryVal: ", p), err) } + if err := p.BinaryVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.BinaryVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -9:binaryVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_8(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("stringVal", thrift.STRUCT, -8); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -8:stringVal: ", p), err) } + if err := p.StringVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.StringVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -8:stringVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_7(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("doubleVal", thrift.STRUCT, -7); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -7:doubleVal: ", p), err) } + if err := p.DoubleVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.DoubleVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -7:doubleVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_6(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("floatVal", thrift.STRUCT, -6); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -6:floatVal: ", p), err) } + if err := p.FloatVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.FloatVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -6:floatVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_5(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("i64Val", thrift.STRUCT, -5); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -5:i64Val: ", p), err) } + if err := p.I64Val.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.I64Val), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -5:i64Val: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_4(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("i32Val", thrift.STRUCT, -4); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -4:i32Val: ", p), err) } + if err := p.I32Val.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.I32Val), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -4:i32Val: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_3(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("i16Val", thrift.STRUCT, -3); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -3:i16Val: ", p), err) } + if err := p.I16Val.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.I16Val), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -3:i16Val: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_2(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("byteVal", thrift.STRUCT, -2); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -2:byteVal: ", p), err) } + if err := p.ByteVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ByteVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -2:byteVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) writeField_1(oprot thrift.Protocol) (err error) { + if err := oprot.WriteFieldBegin("boolVal", thrift.STRUCT, -1); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field begin error -1:boolVal: ", p), err) } + if err := p.BoolVal.Write(oprot); err != nil { + return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.BoolVal), err) + } + if err := oprot.WriteFieldEnd(); err != nil { + return thrift.PrependError(fmt.Sprintf("%T write field end error -1:boolVal: ", p), err) } + return err +} + +func (p *MyStructFieldPatch) String() string { + if p == nil { + return "" + } + + var optMapValVal string + if p.OptMapVal == nil { + optMapValVal = "" + } else { + optMapValVal = fmt.Sprintf("%v", p.OptMapVal) + } + var optSetValVal string + if p.OptSetVal == nil { + optSetValVal = "" + } else { + optSetValVal = fmt.Sprintf("%v", p.OptSetVal) + } + var optListValVal string + if p.OptListVal == nil { + optListValVal = "" + } else { + optListValVal = fmt.Sprintf("%v", p.OptListVal) + } + var optLateStructValVal string + if p.OptLateStructVal == nil { + optLateStructValVal = "" + } else { + optLateStructValVal = fmt.Sprintf("%v", p.OptLateStructVal) + } + var optStructValVal string + if p.OptStructVal == nil { + optStructValVal = "" + } else { + optStructValVal = fmt.Sprintf("%v", p.OptStructVal) + } + var optEnumValVal string + if p.OptEnumVal == nil { + optEnumValVal = "" + } else { + optEnumValVal = fmt.Sprintf("%v", p.OptEnumVal) + } + var optBinaryValVal string + if p.OptBinaryVal == nil { + optBinaryValVal = "" + } else { + optBinaryValVal = fmt.Sprintf("%v", p.OptBinaryVal) + } + var optStringValVal string + if p.OptStringVal == nil { + optStringValVal = "" + } else { + optStringValVal = fmt.Sprintf("%v", p.OptStringVal) + } + var optDoubleValVal string + if p.OptDoubleVal == nil { + optDoubleValVal = "" + } else { + optDoubleValVal = fmt.Sprintf("%v", p.OptDoubleVal) + } + var optFloatValVal string + if p.OptFloatVal == nil { + optFloatValVal = "" + } else { + optFloatValVal = fmt.Sprintf("%v", p.OptFloatVal) + } + var optI64ValVal string + if p.OptI64Val == nil { + optI64ValVal = "" + } else { + optI64ValVal = fmt.Sprintf("%v", p.OptI64Val) + } + var optI32ValVal string + if p.OptI32Val == nil { + optI32ValVal = "" + } else { + optI32ValVal = fmt.Sprintf("%v", p.OptI32Val) + } + var optI16ValVal string + if p.OptI16Val == nil { + optI16ValVal = "" + } else { + optI16ValVal = fmt.Sprintf("%v", p.OptI16Val) + } + var optByteValVal string + if p.OptByteVal == nil { + optByteValVal = "" + } else { + optByteValVal = fmt.Sprintf("%v", p.OptByteVal) + } + var optBoolValVal string + if p.OptBoolVal == nil { + optBoolValVal = "" + } else { + optBoolValVal = fmt.Sprintf("%v", p.OptBoolVal) + } + var timeValVal string + if p.TimeVal == nil { + timeValVal = "" + } else { + timeValVal = fmt.Sprintf("%v", p.TimeVal) + } + var durationValVal string + if p.DurationVal == nil { + durationValVal = "" + } else { + durationValVal = fmt.Sprintf("%v", p.DurationVal) + } + var lateStructValVal string + if p.LateStructVal == nil { + lateStructValVal = "" + } else { + lateStructValVal = fmt.Sprintf("%v", p.LateStructVal) + } + var unionValVal string + if p.UnionVal == nil { + unionValVal = "" + } else { + unionValVal = fmt.Sprintf("%v", p.UnionVal) + } + var structValVal string + if p.StructVal == nil { + structValVal = "" + } else { + structValVal = fmt.Sprintf("%v", p.StructVal) + } + var enumValVal string + if p.EnumVal == nil { + enumValVal = "" + } else { + enumValVal = fmt.Sprintf("%v", p.EnumVal) + } + var binaryValVal string + if p.BinaryVal == nil { + binaryValVal = "" + } else { + binaryValVal = fmt.Sprintf("%v", p.BinaryVal) + } + var stringValVal string + if p.StringVal == nil { + stringValVal = "" + } else { + stringValVal = fmt.Sprintf("%v", p.StringVal) + } + var doubleValVal string + if p.DoubleVal == nil { + doubleValVal = "" + } else { + doubleValVal = fmt.Sprintf("%v", p.DoubleVal) + } + var floatValVal string + if p.FloatVal == nil { + floatValVal = "" + } else { + floatValVal = fmt.Sprintf("%v", p.FloatVal) + } + var i64ValVal string + if p.I64Val == nil { + i64ValVal = "" + } else { + i64ValVal = fmt.Sprintf("%v", p.I64Val) + } + var i32ValVal string + if p.I32Val == nil { + i32ValVal = "" + } else { + i32ValVal = fmt.Sprintf("%v", p.I32Val) + } + var i16ValVal string + if p.I16Val == nil { + i16ValVal = "" + } else { + i16ValVal = fmt.Sprintf("%v", p.I16Val) + } + var byteValVal string + if p.ByteVal == nil { + byteValVal = "" + } else { + byteValVal = fmt.Sprintf("%v", p.ByteVal) + } + var boolValVal string + if p.BoolVal == nil { + boolValVal = "" + } else { + boolValVal = fmt.Sprintf("%v", p.BoolVal) + } + return fmt.Sprintf("MyStructFieldPatch({OptMapVal:%s OptSetVal:%s OptListVal:%s OptLateStructVal:%s OptStructVal:%s OptEnumVal:%s OptBinaryVal:%s OptStringVal:%s OptDoubleVal:%s OptFloatVal:%s OptI64Val:%s OptI32Val:%s OptI16Val:%s OptByteVal:%s OptBoolVal:%s TimeVal:%s DurationVal:%s LateStructVal:%s UnionVal:%s StructVal:%s EnumVal:%s BinaryVal:%s StringVal:%s DoubleVal:%s FloatVal:%s I64Val:%s I32Val:%s I16Val:%s ByteVal:%s BoolVal:%s})", optMapValVal, optSetValVal, optListValVal, optLateStructValVal, optStructValVal, optEnumValVal, optBinaryValVal, optStringValVal, optDoubleValVal, optFloatValVal, optI64ValVal, optI32ValVal, optI16ValVal, optByteValVal, optBoolValVal, timeValVal, durationValVal, lateStructValVal, unionValVal, structValVal, enumValVal, binaryValVal, stringValVal, doubleValVal, floatValVal, i64ValVal, i32ValVal, i16ValVal, byteValVal, boolValVal) } // Attributes: diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-hack/module_types.php b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-hack/module_types.php index 967dc27629f..b7b71930f4a 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-hack/module_types.php +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-hack/module_types.php @@ -3450,446 +3450,57 @@ class MyUnionPatch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { /** * Original thrift struct:- - * MyStructFieldPatch + * MyStructFieldN10Patch */ -<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldPatch'))>> -class MyStructFieldPatch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { +<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN10Patch'))>> +class MyStructFieldN10Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { use \ThriftSerializationTrait; const dict SPEC = dict[ - -1 => shape( - 'var' => 'boolVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\BoolPatch::class, - ), - -2 => shape( - 'var' => 'byteVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\BytePatch::class, - ), - -3 => shape( - 'var' => 'i16Val', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\I16Patch::class, - ), - -4 => shape( - 'var' => 'i32Val', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\I32Patch::class, - ), - -5 => shape( - 'var' => 'i64Val', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\I64Patch::class, - ), - -6 => shape( - 'var' => 'floatVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\FloatPatch::class, - ), - -7 => shape( - 'var' => 'doubleVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\DoublePatch::class, - ), - -8 => shape( - 'var' => 'stringVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\StringPatch::class, - ), - -9 => shape( - 'var' => 'binaryVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\BinaryPatch::class, - ), - -10 => shape( - 'var' => 'enumVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\MyStructFieldN10Patch::class, - ), - -11 => shape( - 'var' => 'structVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\MyDataPatch::class, - ), - -12 => shape( - 'var' => 'unionVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\MyUnionPatch::class, - ), - -13 => shape( - 'var' => 'lateStructVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\LateDefStructPatch::class, - ), - -14 => shape( - 'var' => 'durationVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\DurationPatch::class, - ), - -15 => shape( - 'var' => 'timeVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\TimePatch::class, - ), - -16 => shape( - 'var' => 'optBoolVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\BoolPatch::class, - ), - -17 => shape( - 'var' => 'optByteVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\BytePatch::class, - ), - -18 => shape( - 'var' => 'optI16Val', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\I16Patch::class, - ), - -19 => shape( - 'var' => 'optI32Val', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\I32Patch::class, - ), - -20 => shape( - 'var' => 'optI64Val', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\I64Patch::class, - ), - -21 => shape( - 'var' => 'optFloatVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\FloatPatch::class, - ), - -22 => shape( - 'var' => 'optDoubleVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\DoublePatch::class, - ), - -23 => shape( - 'var' => 'optStringVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\StringPatch::class, - ), - -24 => shape( - 'var' => 'optBinaryVal', - 'type' => \TType::STRUCT, - 'class' => \thrift\op\BinaryPatch::class, - ), - -25 => shape( - 'var' => 'optEnumVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\MyStructFieldN25Patch::class, - ), - -26 => shape( - 'var' => 'optStructVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\MyDataPatch::class, - ), - -27 => shape( - 'var' => 'optLateStructVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\LateDefStructPatch::class, - ), - -28 => shape( - 'var' => 'optListVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\MyStructFieldN28Patch::class, - ), - -29 => shape( - 'var' => 'optSetVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\MyStructFieldN29Patch::class, + 1 => shape( + 'var' => 'assign', + 'type' => \TType::I32, + 'enum' => \fixtures\patch\MyEnum::class, ), - -30 => shape( - 'var' => 'optMapVal', - 'type' => \TType::STRUCT, - 'class' => \fixtures\patch\MyStructFieldN30Patch::class, + 2 => shape( + 'var' => 'clear', + 'type' => \TType::BOOL, ), ]; const dict FIELDMAP = dict[ - 'boolVal' => -1, - 'byteVal' => -2, - 'i16Val' => -3, - 'i32Val' => -4, - 'i64Val' => -5, - 'floatVal' => -6, - 'doubleVal' => -7, - 'stringVal' => -8, - 'binaryVal' => -9, - 'enumVal' => -10, - 'structVal' => -11, - 'unionVal' => -12, - 'lateStructVal' => -13, - 'durationVal' => -14, - 'timeVal' => -15, - 'optBoolVal' => -16, - 'optByteVal' => -17, - 'optI16Val' => -18, - 'optI32Val' => -19, - 'optI64Val' => -20, - 'optFloatVal' => -21, - 'optDoubleVal' => -22, - 'optStringVal' => -23, - 'optBinaryVal' => -24, - 'optEnumVal' => -25, - 'optStructVal' => -26, - 'optLateStructVal' => -27, - 'optListVal' => -28, - 'optSetVal' => -29, - 'optMapVal' => -30, + 'assign' => 1, + 'clear' => 2, ]; const type TConstructorShape = shape( - ?'boolVal' => ?\thrift\op\BoolPatch, - ?'byteVal' => ?\thrift\op\BytePatch, - ?'i16Val' => ?\thrift\op\I16Patch, - ?'i32Val' => ?\thrift\op\I32Patch, - ?'i64Val' => ?\thrift\op\I64Patch, - ?'floatVal' => ?\thrift\op\FloatPatch, - ?'doubleVal' => ?\thrift\op\DoublePatch, - ?'stringVal' => ?\thrift\op\StringPatch, - ?'binaryVal' => ?\thrift\op\BinaryPatch, - ?'enumVal' => ?\fixtures\patch\MyStructFieldN10Patch, - ?'structVal' => ?\fixtures\patch\MyDataPatch, - ?'unionVal' => ?\fixtures\patch\MyUnionPatch, - ?'lateStructVal' => ?\fixtures\patch\LateDefStructPatch, - ?'durationVal' => ?\thrift\op\DurationPatch, - ?'timeVal' => ?\thrift\op\TimePatch, - ?'optBoolVal' => ?\thrift\op\BoolPatch, - ?'optByteVal' => ?\thrift\op\BytePatch, - ?'optI16Val' => ?\thrift\op\I16Patch, - ?'optI32Val' => ?\thrift\op\I32Patch, - ?'optI64Val' => ?\thrift\op\I64Patch, - ?'optFloatVal' => ?\thrift\op\FloatPatch, - ?'optDoubleVal' => ?\thrift\op\DoublePatch, - ?'optStringVal' => ?\thrift\op\StringPatch, - ?'optBinaryVal' => ?\thrift\op\BinaryPatch, - ?'optEnumVal' => ?\fixtures\patch\MyStructFieldN25Patch, - ?'optStructVal' => ?\fixtures\patch\MyDataPatch, - ?'optLateStructVal' => ?\fixtures\patch\LateDefStructPatch, - ?'optListVal' => ?\fixtures\patch\MyStructFieldN28Patch, - ?'optSetVal' => ?\fixtures\patch\MyStructFieldN29Patch, - ?'optMapVal' => ?\fixtures\patch\MyStructFieldN30Patch, + ?'assign' => ?\fixtures\patch\MyEnum, + ?'clear' => ?bool, ); const type TShape = shape( - ?'boolVal' => ?\thrift\op\BoolPatch::TShape, - ?'byteVal' => ?\thrift\op\BytePatch::TShape, - ?'i16Val' => ?\thrift\op\I16Patch::TShape, - ?'i32Val' => ?\thrift\op\I32Patch::TShape, - ?'i64Val' => ?\thrift\op\I64Patch::TShape, - ?'floatVal' => ?\thrift\op\FloatPatch::TShape, - ?'doubleVal' => ?\thrift\op\DoublePatch::TShape, - ?'stringVal' => ?\thrift\op\StringPatch::TShape, - ?'binaryVal' => ?\thrift\op\BinaryPatch::TShape, - ?'enumVal' => ?\fixtures\patch\MyStructFieldN10Patch::TShape, - ?'structVal' => ?\fixtures\patch\MyDataPatch::TShape, - ?'unionVal' => ?\fixtures\patch\MyUnionPatch::TShape, - ?'lateStructVal' => ?\fixtures\patch\LateDefStructPatch::TShape, - ?'durationVal' => ?\thrift\op\DurationPatch::TShape, - ?'timeVal' => ?\thrift\op\TimePatch::TShape, - ?'optBoolVal' => ?\thrift\op\BoolPatch::TShape, - ?'optByteVal' => ?\thrift\op\BytePatch::TShape, - ?'optI16Val' => ?\thrift\op\I16Patch::TShape, - ?'optI32Val' => ?\thrift\op\I32Patch::TShape, - ?'optI64Val' => ?\thrift\op\I64Patch::TShape, - ?'optFloatVal' => ?\thrift\op\FloatPatch::TShape, - ?'optDoubleVal' => ?\thrift\op\DoublePatch::TShape, - ?'optStringVal' => ?\thrift\op\StringPatch::TShape, - ?'optBinaryVal' => ?\thrift\op\BinaryPatch::TShape, - ?'optEnumVal' => ?\fixtures\patch\MyStructFieldN25Patch::TShape, - ?'optStructVal' => ?\fixtures\patch\MyDataPatch::TShape, - ?'optLateStructVal' => ?\fixtures\patch\LateDefStructPatch::TShape, - ?'optListVal' => ?\fixtures\patch\MyStructFieldN28Patch::TShape, - ?'optSetVal' => ?\fixtures\patch\MyStructFieldN29Patch::TShape, - ?'optMapVal' => ?\fixtures\patch\MyStructFieldN30Patch::TShape, - ... + ?'assign' => ?\fixtures\patch\MyEnum, + 'clear' => bool, + ... ); - const int STRUCTURAL_ID = 6836091706823426623; - /** - * Original thrift field:- - * -1: struct patch.BoolPatch boolVal - */ - public ?\thrift\op\BoolPatch $boolVal; - /** - * Original thrift field:- - * -2: struct patch.BytePatch byteVal - */ - public ?\thrift\op\BytePatch $byteVal; - /** - * Original thrift field:- - * -3: struct patch.I16Patch i16Val - */ - public ?\thrift\op\I16Patch $i16Val; - /** - * Original thrift field:- - * -4: struct patch.I32Patch i32Val - */ - public ?\thrift\op\I32Patch $i32Val; - /** - * Original thrift field:- - * -5: struct patch.I64Patch i64Val - */ - public ?\thrift\op\I64Patch $i64Val; - /** - * Original thrift field:- - * -6: struct patch.FloatPatch floatVal - */ - public ?\thrift\op\FloatPatch $floatVal; - /** - * Original thrift field:- - * -7: struct patch.DoublePatch doubleVal - */ - public ?\thrift\op\DoublePatch $doubleVal; - /** - * Original thrift field:- - * -8: struct patch.StringPatch stringVal - */ - public ?\thrift\op\StringPatch $stringVal; - /** - * Original thrift field:- - * -9: struct patch.BinaryPatch binaryVal - */ - public ?\thrift\op\BinaryPatch $binaryVal; - /** - * Original thrift field:- - * -10: struct module.MyStructFieldN10Patch enumVal - */ - public ?\fixtures\patch\MyStructFieldN10Patch $enumVal; - /** - * Original thrift field:- - * -11: struct module.MyDataPatch structVal - */ - public ?\fixtures\patch\MyDataPatch $structVal; - /** - * Original thrift field:- - * -12: struct module.MyUnionPatch unionVal - */ - public ?\fixtures\patch\MyUnionPatch $unionVal; - /** - * Original thrift field:- - * -13: struct module.LateDefStructPatch lateStructVal - */ - public ?\fixtures\patch\LateDefStructPatch $lateStructVal; - /** - * Original thrift field:- - * -14: struct patch.DurationPatch durationVal - */ - public ?\thrift\op\DurationPatch $durationVal; - /** - * Original thrift field:- - * -15: struct patch.TimePatch timeVal - */ - public ?\thrift\op\TimePatch $timeVal; - /** - * Original thrift field:- - * -16: struct patch.BoolPatch optBoolVal - */ - public ?\thrift\op\BoolPatch $optBoolVal; - /** - * Original thrift field:- - * -17: struct patch.BytePatch optByteVal - */ - public ?\thrift\op\BytePatch $optByteVal; - /** - * Original thrift field:- - * -18: struct patch.I16Patch optI16Val - */ - public ?\thrift\op\I16Patch $optI16Val; - /** - * Original thrift field:- - * -19: struct patch.I32Patch optI32Val - */ - public ?\thrift\op\I32Patch $optI32Val; - /** - * Original thrift field:- - * -20: struct patch.I64Patch optI64Val - */ - public ?\thrift\op\I64Patch $optI64Val; - /** - * Original thrift field:- - * -21: struct patch.FloatPatch optFloatVal - */ - public ?\thrift\op\FloatPatch $optFloatVal; - /** - * Original thrift field:- - * -22: struct patch.DoublePatch optDoubleVal - */ - public ?\thrift\op\DoublePatch $optDoubleVal; - /** - * Original thrift field:- - * -23: struct patch.StringPatch optStringVal - */ - public ?\thrift\op\StringPatch $optStringVal; - /** - * Original thrift field:- - * -24: struct patch.BinaryPatch optBinaryVal - */ - public ?\thrift\op\BinaryPatch $optBinaryVal; - /** - * Original thrift field:- - * -25: struct module.MyStructFieldN25Patch optEnumVal - */ - public ?\fixtures\patch\MyStructFieldN25Patch $optEnumVal; - /** - * Original thrift field:- - * -26: struct module.MyDataPatch optStructVal - */ - public ?\fixtures\patch\MyDataPatch $optStructVal; - /** - * Original thrift field:- - * -27: struct module.LateDefStructPatch optLateStructVal - */ - public ?\fixtures\patch\LateDefStructPatch $optLateStructVal; - /** - * Original thrift field:- - * -28: struct module.MyStructFieldN28Patch optListVal - */ - public ?\fixtures\patch\MyStructFieldN28Patch $optListVal; + const int STRUCTURAL_ID = 1042349483945124076; /** + * Assigns a value. If set, all other operations are ignored. + * * Original thrift field:- - * -29: struct module.MyStructFieldN29Patch optSetVal + * 1: enum module.MyEnum assign */ - public ?\fixtures\patch\MyStructFieldN29Patch $optSetVal; + public ?\fixtures\patch\MyEnum $assign; /** + * Clears a value. Applies first. + * * Original thrift field:- - * -30: struct module.MyStructFieldN30Patch optMapVal + * 2: bool clear */ - public ?\fixtures\patch\MyStructFieldN30Patch $optMapVal; + public bool $clear; - public function __construct(?\thrift\op\BoolPatch $boolVal = null, ?\thrift\op\BytePatch $byteVal = null, ?\thrift\op\I16Patch $i16Val = null, ?\thrift\op\I32Patch $i32Val = null, ?\thrift\op\I64Patch $i64Val = null, ?\thrift\op\FloatPatch $floatVal = null, ?\thrift\op\DoublePatch $doubleVal = null, ?\thrift\op\StringPatch $stringVal = null, ?\thrift\op\BinaryPatch $binaryVal = null, ?\fixtures\patch\MyStructFieldN10Patch $enumVal = null, ?\fixtures\patch\MyDataPatch $structVal = null, ?\fixtures\patch\MyUnionPatch $unionVal = null, ?\fixtures\patch\LateDefStructPatch $lateStructVal = null, ?\thrift\op\DurationPatch $durationVal = null, ?\thrift\op\TimePatch $timeVal = null, ?\thrift\op\BoolPatch $optBoolVal = null, ?\thrift\op\BytePatch $optByteVal = null, ?\thrift\op\I16Patch $optI16Val = null, ?\thrift\op\I32Patch $optI32Val = null, ?\thrift\op\I64Patch $optI64Val = null, ?\thrift\op\FloatPatch $optFloatVal = null, ?\thrift\op\DoublePatch $optDoubleVal = null, ?\thrift\op\StringPatch $optStringVal = null, ?\thrift\op\BinaryPatch $optBinaryVal = null, ?\fixtures\patch\MyStructFieldN25Patch $optEnumVal = null, ?\fixtures\patch\MyDataPatch $optStructVal = null, ?\fixtures\patch\LateDefStructPatch $optLateStructVal = null, ?\fixtures\patch\MyStructFieldN28Patch $optListVal = null, ?\fixtures\patch\MyStructFieldN29Patch $optSetVal = null, ?\fixtures\patch\MyStructFieldN30Patch $optMapVal = null)[] { - $this->boolVal = $boolVal; - $this->byteVal = $byteVal; - $this->i16Val = $i16Val; - $this->i32Val = $i32Val; - $this->i64Val = $i64Val; - $this->floatVal = $floatVal; - $this->doubleVal = $doubleVal; - $this->stringVal = $stringVal; - $this->binaryVal = $binaryVal; - $this->enumVal = $enumVal; - $this->structVal = $structVal; - $this->unionVal = $unionVal; - $this->lateStructVal = $lateStructVal; - $this->durationVal = $durationVal; - $this->timeVal = $timeVal; - $this->optBoolVal = $optBoolVal; - $this->optByteVal = $optByteVal; - $this->optI16Val = $optI16Val; - $this->optI32Val = $optI32Val; - $this->optI64Val = $optI64Val; - $this->optFloatVal = $optFloatVal; - $this->optDoubleVal = $optDoubleVal; - $this->optStringVal = $optStringVal; - $this->optBinaryVal = $optBinaryVal; - $this->optEnumVal = $optEnumVal; - $this->optStructVal = $optStructVal; - $this->optLateStructVal = $optLateStructVal; - $this->optListVal = $optListVal; - $this->optSetVal = $optSetVal; - $this->optMapVal = $optMapVal; + public function __construct(?\fixtures\patch\MyEnum $assign = null, ?bool $clear = null)[] { + $this->assign = $assign; + $this->clear = $clear ?? false; } public static function withDefaultValues()[]: this { @@ -3898,41 +3509,13 @@ class MyStructFieldPatch implements \IThriftSyncStruct, \IThriftShapishSyncStruc public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( - Shapes::idx($shape, 'boolVal'), - Shapes::idx($shape, 'byteVal'), - Shapes::idx($shape, 'i16Val'), - Shapes::idx($shape, 'i32Val'), - Shapes::idx($shape, 'i64Val'), - Shapes::idx($shape, 'floatVal'), - Shapes::idx($shape, 'doubleVal'), - Shapes::idx($shape, 'stringVal'), - Shapes::idx($shape, 'binaryVal'), - Shapes::idx($shape, 'enumVal'), - Shapes::idx($shape, 'structVal'), - Shapes::idx($shape, 'unionVal'), - Shapes::idx($shape, 'lateStructVal'), - Shapes::idx($shape, 'durationVal'), - Shapes::idx($shape, 'timeVal'), - Shapes::idx($shape, 'optBoolVal'), - Shapes::idx($shape, 'optByteVal'), - Shapes::idx($shape, 'optI16Val'), - Shapes::idx($shape, 'optI32Val'), - Shapes::idx($shape, 'optI64Val'), - Shapes::idx($shape, 'optFloatVal'), - Shapes::idx($shape, 'optDoubleVal'), - Shapes::idx($shape, 'optStringVal'), - Shapes::idx($shape, 'optBinaryVal'), - Shapes::idx($shape, 'optEnumVal'), - Shapes::idx($shape, 'optStructVal'), - Shapes::idx($shape, 'optLateStructVal'), - Shapes::idx($shape, 'optListVal'), - Shapes::idx($shape, 'optSetVal'), - Shapes::idx($shape, 'optMapVal'), + Shapes::idx($shape, 'assign'), + Shapes::idx($shape, 'clear'), ); } public function getName()[]: string { - return 'MyStructFieldPatch'; + return 'MyStructFieldN10Patch'; } public function clearTerseFields()[write_props]: void { @@ -3941,420 +3524,471 @@ class MyStructFieldPatch implements \IThriftSyncStruct, \IThriftShapishSyncStruc public static function getStructMetadata()[]: \tmeta_ThriftStruct { return \tmeta_ThriftStruct::fromShape( shape( - "name" => "module.MyStructFieldPatch", + "name" => "module.MyStructFieldN10Patch", "fields" => vec[ \tmeta_ThriftField::fromShape( shape( - "id" => -1, + "id" => 1, "type" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( + "t_enum" => \tmeta_ThriftEnumType::fromShape( shape( - "name" => "patch.BoolPatch", + "name" => "module.MyEnum", ) ), ) ), - "name" => "boolVal", + "name" => "assign", + "is_optional" => true, ) ), \tmeta_ThriftField::fromShape( shape( - "id" => -2, + "id" => 2, "type" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.BytePatch", - ) - ), + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BOOL_TYPE, ) ), - "name" => "byteVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -3, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.I16Patch", - ) - ), - ) - ), - "name" => "i16Val", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -4, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.I32Patch", - ) - ), - ) - ), - "name" => "i32Val", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -5, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.I64Patch", - ) - ), - ) - ), - "name" => "i64Val", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -6, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.FloatPatch", - ) - ), - ) - ), - "name" => "floatVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -7, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.DoublePatch", - ) - ), - ) - ), - "name" => "doubleVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -8, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.StringPatch", - ) - ), - ) - ), - "name" => "stringVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -9, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.BinaryPatch", - ) - ), - ) - ), - "name" => "binaryVal", + "name" => "clear", ) ), + ], + "is_union" => false, + ) + ); + } + + public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { + return shape( + 'struct' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::AssignPatchAdapter", + "underlyingName" => "MyStructFieldN10PatchStruct", + "extraNamespace" => "", + ) + ), + ], + 'fields' => dict[ + ], + ); + } + + public static function __fromShape(self::TShape $shape)[]: this { + return new static( + Shapes::idx($shape, 'assign'), + $shape['clear'], + ); + } + + public function __toShape()[]: self::TShape { + return shape( + 'assign' => $this->assign, + 'clear' => $this->clear, + ); + } + public function getInstanceKey()[write_props]: string { + return \TCompactSerializer::serialize($this); + } + + public function readFromJson(string $jsonText): void { + $parsed = json_decode($jsonText, true); + + if ($parsed === null || !($parsed is KeyedContainer<_, _>)) { + throw new \TProtocolException("Cannot parse the given json string."); + } + + if (idx($parsed, 'assign') !== null) { + $this->assign = \fixtures\patch\MyEnum::coerce(HH\FIXME\UNSAFE_CAST($parsed['assign'])); + } + if (idx($parsed, 'clear') !== null) { + $this->clear = HH\FIXME\UNSAFE_CAST($parsed['clear']); + } + } + +} + +/** + * Original thrift struct:- + * MyStructFieldN25Patch + */ +<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN25Patch'))>> +class MyStructFieldN25Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { + use \ThriftSerializationTrait; + + const dict SPEC = dict[ + 1 => shape( + 'var' => 'assign', + 'type' => \TType::I32, + 'enum' => \fixtures\patch\MyEnum::class, + ), + 2 => shape( + 'var' => 'clear', + 'type' => \TType::BOOL, + ), + ]; + const dict FIELDMAP = dict[ + 'assign' => 1, + 'clear' => 2, + ]; + + const type TConstructorShape = shape( + ?'assign' => ?\fixtures\patch\MyEnum, + ?'clear' => ?bool, + ); + + const type TShape = shape( + ?'assign' => ?\fixtures\patch\MyEnum, + 'clear' => bool, + ... + ); + const int STRUCTURAL_ID = 1042349483945124076; + /** + * Assigns a value. If set, all other operations are ignored. + * + * Original thrift field:- + * 1: enum module.MyEnum assign + */ + public ?\fixtures\patch\MyEnum $assign; + /** + * Clears a value. Applies first. + * + * Original thrift field:- + * 2: bool clear + */ + public bool $clear; + + public function __construct(?\fixtures\patch\MyEnum $assign = null, ?bool $clear = null)[] { + $this->assign = $assign; + $this->clear = $clear ?? false; + } + + public static function withDefaultValues()[]: this { + return new static(); + } + + public static function fromShape(self::TConstructorShape $shape)[]: this { + return new static( + Shapes::idx($shape, 'assign'), + Shapes::idx($shape, 'clear'), + ); + } + + public function getName()[]: string { + return 'MyStructFieldN25Patch'; + } + + public function clearTerseFields()[write_props]: void { + } + + public static function getStructMetadata()[]: \tmeta_ThriftStruct { + return \tmeta_ThriftStruct::fromShape( + shape( + "name" => "module.MyStructFieldN25Patch", + "fields" => vec[ \tmeta_ThriftField::fromShape( shape( - "id" => -10, + "id" => 1, "type" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( + "t_enum" => \tmeta_ThriftEnumType::fromShape( shape( - "name" => "module.MyStructFieldN10Patch", + "name" => "module.MyEnum", ) ), ) ), - "name" => "enumVal", + "name" => "assign", + "is_optional" => true, ) ), \tmeta_ThriftField::fromShape( shape( - "id" => -11, + "id" => 2, "type" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "module.MyDataPatch", - ) - ), + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BOOL_TYPE, ) ), - "name" => "structVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -12, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "module.MyUnionPatch", - ) - ), - ) - ), - "name" => "unionVal", + "name" => "clear", ) ), + ], + "is_union" => false, + ) + ); + } + + public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { + return shape( + 'struct' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::AssignPatchAdapter", + "underlyingName" => "MyStructFieldN25PatchStruct", + "extraNamespace" => "", + ) + ), + ], + 'fields' => dict[ + ], + ); + } + + public static function __fromShape(self::TShape $shape)[]: this { + return new static( + Shapes::idx($shape, 'assign'), + $shape['clear'], + ); + } + + public function __toShape()[]: self::TShape { + return shape( + 'assign' => $this->assign, + 'clear' => $this->clear, + ); + } + public function getInstanceKey()[write_props]: string { + return \TCompactSerializer::serialize($this); + } + + public function readFromJson(string $jsonText): void { + $parsed = json_decode($jsonText, true); + + if ($parsed === null || !($parsed is KeyedContainer<_, _>)) { + throw new \TProtocolException("Cannot parse the given json string."); + } + + if (idx($parsed, 'assign') !== null) { + $this->assign = \fixtures\patch\MyEnum::coerce(HH\FIXME\UNSAFE_CAST($parsed['assign'])); + } + if (idx($parsed, 'clear') !== null) { + $this->clear = HH\FIXME\UNSAFE_CAST($parsed['clear']); + } + } + +} + +/** + * Original thrift struct:- + * MyStructFieldN28Patch + */ +<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN28Patch'))>> +class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { + use \ThriftSerializationTrait; + + const dict SPEC = dict[ + 1 => shape( + 'var' => 'assign', + 'type' => \TType::LST, + 'etype' => \TType::I16, + 'elem' => shape( + 'type' => \TType::I16, + ), + 'format' => 'collection', + ), + 2 => shape( + 'var' => 'clear', + 'type' => \TType::BOOL, + ), + 3 => shape( + 'var' => 'patch', + 'type' => \TType::MAP, + 'ktype' => \TType::I32, + 'vtype' => \TType::STRUCT, + 'key' => shape( + 'type' => \TType::I32, + ), + 'val' => shape( + 'type' => \TType::STRUCT, + 'class' => \thrift\op\I16Patch::class, + ), + 'format' => 'collection', + ), + 7 => shape( + 'var' => 'remove', + 'type' => \TType::LST, + 'etype' => \TType::I16, + 'elem' => shape( + 'type' => \TType::I16, + ), + 'format' => 'collection', + ), + 8 => shape( + 'var' => 'prepend', + 'type' => \TType::LST, + 'etype' => \TType::I16, + 'elem' => shape( + 'type' => \TType::I16, + ), + 'format' => 'collection', + ), + 9 => shape( + 'var' => 'append', + 'type' => \TType::LST, + 'etype' => \TType::I16, + 'elem' => shape( + 'type' => \TType::I16, + ), + 'format' => 'collection', + ), + ]; + const dict FIELDMAP = dict[ + 'assign' => 1, + 'clear' => 2, + 'patch' => 3, + 'remove' => 7, + 'prepend' => 8, + 'append' => 9, + ]; + + const type TConstructorShape = shape( + ?'assign' => ?Vector, + ?'clear' => ?bool, + ?'patch' => ?Map, + ?'remove' => ?Vector, + ?'prepend' => ?Vector, + ?'append' => ?Vector, + ); + + const type TShape = shape( + ?'assign' => ?vec, + 'clear' => bool, + 'patch' => dict, + 'remove' => vec, + 'prepend' => vec, + 'append' => vec, + ... + ); + const int STRUCTURAL_ID = 8909257665578209994; + /** + * Assigns a value. If set, all other operations are ignored. + * + * Original thrift field:- + * 1: list assign + */ + public ?Vector $assign; + /** + * Clears a value. Applies first. + * + * Original thrift field:- + * 2: bool clear + */ + public bool $clear; + /** + * Patches list values by index. Applies second. + * + * Original thrift field:- + * 3: map patch + */ + public Map $patch; + /** + * Removes entries, if present. Applies third. + * + * Original thrift field:- + * 7: list remove + */ + public Vector $remove; + /** + * Prepends to the front of a given list. + * + * Original thrift field:- + * 8: list prepend + */ + public Vector $prepend; + /** + * Appends to the back of a given list. + * + * Original thrift field:- + * 9: list append + */ + public Vector $append; + + public function __construct(?Vector $assign = null, ?bool $clear = null, ?Map $patch = null, ?Vector $remove = null, ?Vector $prepend = null, ?Vector $append = null)[] { + $this->assign = $assign; + $this->clear = $clear ?? false; + $this->patch = $patch ?? Map {}; + $this->remove = $remove ?? Vector {}; + $this->prepend = $prepend ?? Vector {}; + $this->append = $append ?? Vector {}; + } + + public static function withDefaultValues()[]: this { + return new static(); + } + + public static function fromShape(self::TConstructorShape $shape)[]: this { + return new static( + Shapes::idx($shape, 'assign'), + Shapes::idx($shape, 'clear'), + Shapes::idx($shape, 'patch'), + Shapes::idx($shape, 'remove'), + Shapes::idx($shape, 'prepend'), + Shapes::idx($shape, 'append'), + ); + } + + public function getName()[]: string { + return 'MyStructFieldN28Patch'; + } + + public function clearTerseFields()[write_props]: void { + } + + public static function getStructMetadata()[]: \tmeta_ThriftStruct { + return \tmeta_ThriftStruct::fromShape( + shape( + "name" => "module.MyStructFieldN28Patch", + "fields" => vec[ \tmeta_ThriftField::fromShape( shape( - "id" => -13, + "id" => 1, "type" => \tmeta_ThriftType::fromShape( shape( - "t_typedef" => \tmeta_ThriftTypedefType::fromShape( + "t_list" => \tmeta_ThriftListType::fromShape( shape( - "name" => "module.LateDefStructPatch", - "underlyingType" => \tmeta_ThriftType::fromShape( + "valueType" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "module.LateDefStructPatch", - ) - ), + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE, ) ), ) ), ) ), - "name" => "lateStructVal", + "name" => "assign", + "is_optional" => true, ) ), \tmeta_ThriftField::fromShape( shape( - "id" => -14, + "id" => 2, "type" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.DurationPatch", - ) - ), - ) - ), - "name" => "durationVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -15, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.TimePatch", - ) - ), - ) - ), - "name" => "timeVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -16, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.BoolPatch", - ) - ), - ) - ), - "name" => "optBoolVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -17, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.BytePatch", - ) - ), - ) - ), - "name" => "optByteVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -18, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.I16Patch", - ) - ), - ) - ), - "name" => "optI16Val", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -19, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.I32Patch", - ) - ), - ) - ), - "name" => "optI32Val", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -20, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.I64Patch", - ) - ), - ) - ), - "name" => "optI64Val", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -21, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.FloatPatch", - ) - ), - ) - ), - "name" => "optFloatVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -22, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.DoublePatch", - ) - ), - ) - ), - "name" => "optDoubleVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -23, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.StringPatch", - ) - ), - ) - ), - "name" => "optStringVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -24, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.BinaryPatch", - ) - ), - ) - ), - "name" => "optBinaryVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -25, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "module.MyStructFieldN25Patch", - ) - ), - ) - ), - "name" => "optEnumVal", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => -26, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "module.MyDataPatch", - ) - ), + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BOOL_TYPE, ) ), - "name" => "optStructVal", + "name" => "clear", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => -27, + "id" => 3, "type" => \tmeta_ThriftType::fromShape( shape( - "t_typedef" => \tmeta_ThriftTypedefType::fromShape( + "t_map" => \tmeta_ThriftMapType::fromShape( shape( - "name" => "module.LateDefStructPatch", - "underlyingType" => \tmeta_ThriftType::fromShape( + "keyType" => \tmeta_ThriftType::fromShape( + shape( + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE, + ) + ), + "valueType" => \tmeta_ThriftType::fromShape( shape( "t_struct" => \tmeta_ThriftStructType::fromShape( shape( - "name" => "module.LateDefStructPatch", + "name" => "patch.I16Patch", ) ), ) @@ -4363,52 +3997,64 @@ class MyStructFieldPatch implements \IThriftSyncStruct, \IThriftShapishSyncStruc ), ) ), - "name" => "optLateStructVal", + "name" => "patch", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => -28, + "id" => 7, "type" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( + "t_list" => \tmeta_ThriftListType::fromShape( shape( - "name" => "module.MyStructFieldN28Patch", + "valueType" => \tmeta_ThriftType::fromShape( + shape( + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE, + ) + ), ) ), ) ), - "name" => "optListVal", + "name" => "remove", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => -29, + "id" => 8, "type" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( + "t_list" => \tmeta_ThriftListType::fromShape( shape( - "name" => "module.MyStructFieldN29Patch", + "valueType" => \tmeta_ThriftType::fromShape( + shape( + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE, + ) + ), ) ), ) ), - "name" => "optSetVal", + "name" => "prepend", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => -30, + "id" => 9, "type" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( + "t_list" => \tmeta_ThriftListType::fromShape( shape( - "name" => "module.MyStructFieldN30Patch", + "valueType" => \tmeta_ThriftType::fromShape( + shape( + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE, + ) + ), ) ), ) ), - "name" => "optMapVal", + "name" => "append", ) ), ], @@ -4422,759 +4068,8 @@ class MyStructFieldPatch implements \IThriftSyncStruct, \IThriftShapishSyncStruc 'struct' => dict[ '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( shape( - "name" => "::apache::thrift::op::detail::FieldPatchAdapter", - "underlyingName" => "MyStructFieldPatchStruct", - "extraNamespace" => "", - ) - ), - ], - 'fields' => dict[ - 'boolVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::BoolPatchAdapter", - "underlyingName" => "BoolPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'byteVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "BytePatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'i16Val' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "I16PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'i32Val' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "I32PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'i64Val' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "I64PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'floatVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "FloatPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'doubleVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "DoublePatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'stringVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::StringPatchAdapter", - "underlyingName" => "StringPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'binaryVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::BinaryPatchAdapter", - "underlyingName" => "BinaryPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'enumVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::AssignPatchAdapter", - "underlyingName" => "MyStructFieldN10PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'structVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::StructPatchAdapter", - "underlyingName" => "MyDataPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'unionVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::UnionPatchAdapter", - "underlyingName" => "MyUnionPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'lateStructVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::StructPatchAdapter", - "underlyingName" => "LateDefStructPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'durationVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::AssignPatchAdapter", - "underlyingName" => "DurationStructPatch", - "extraNamespace" => "", - ) - ), - ], - ), - 'timeVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::AssignPatchAdapter", - "underlyingName" => "TimeStructPatch", - "extraNamespace" => "", - ) - ), - ], - ), - 'optBoolVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::BoolPatchAdapter", - "underlyingName" => "BoolPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optByteVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "BytePatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optI16Val' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "I16PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optI32Val' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "I32PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optI64Val' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "I64PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optFloatVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "FloatPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optDoubleVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::NumberPatchAdapter", - "underlyingName" => "DoublePatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optStringVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::StringPatchAdapter", - "underlyingName" => "StringPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optBinaryVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::BinaryPatchAdapter", - "underlyingName" => "BinaryPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optEnumVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::AssignPatchAdapter", - "underlyingName" => "MyStructFieldN25PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optStructVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::StructPatchAdapter", - "underlyingName" => "MyDataPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optLateStructVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::StructPatchAdapter", - "underlyingName" => "LateDefStructPatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optListVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::ListPatchAdapter", - "underlyingName" => "MyStructFieldN28PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optSetVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::SetPatchAdapter", - "underlyingName" => "MyStructFieldN29PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - 'optMapVal' => shape( - 'field' => dict[], - 'type' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::MapPatchAdapter", - "underlyingName" => "MyStructFieldN30PatchStruct", - "extraNamespace" => "", - ) - ), - ], - ), - ], - ); - } - - public static function __fromShape(self::TShape $shape)[]: this { - return new static( - Shapes::idx($shape, 'boolVal') === null ? null : (\thrift\op\BoolPatch::__fromShape($shape['boolVal'])), - Shapes::idx($shape, 'byteVal') === null ? null : (\thrift\op\BytePatch::__fromShape($shape['byteVal'])), - Shapes::idx($shape, 'i16Val') === null ? null : (\thrift\op\I16Patch::__fromShape($shape['i16Val'])), - Shapes::idx($shape, 'i32Val') === null ? null : (\thrift\op\I32Patch::__fromShape($shape['i32Val'])), - Shapes::idx($shape, 'i64Val') === null ? null : (\thrift\op\I64Patch::__fromShape($shape['i64Val'])), - Shapes::idx($shape, 'floatVal') === null ? null : (\thrift\op\FloatPatch::__fromShape($shape['floatVal'])), - Shapes::idx($shape, 'doubleVal') === null ? null : (\thrift\op\DoublePatch::__fromShape($shape['doubleVal'])), - Shapes::idx($shape, 'stringVal') === null ? null : (\thrift\op\StringPatch::__fromShape($shape['stringVal'])), - Shapes::idx($shape, 'binaryVal') === null ? null : (\thrift\op\BinaryPatch::__fromShape($shape['binaryVal'])), - Shapes::idx($shape, 'enumVal') === null ? null : (\fixtures\patch\MyStructFieldN10Patch::__fromShape($shape['enumVal'])), - Shapes::idx($shape, 'structVal') === null ? null : (\fixtures\patch\MyDataPatch::__fromShape($shape['structVal'])), - Shapes::idx($shape, 'unionVal') === null ? null : (\fixtures\patch\MyUnionPatch::__fromShape($shape['unionVal'])), - Shapes::idx($shape, 'lateStructVal') === null ? null : (\fixtures\patch\LateDefStructPatch::__fromShape($shape['lateStructVal'])), - Shapes::idx($shape, 'durationVal') === null ? null : (\thrift\op\DurationPatch::__fromShape($shape['durationVal'])), - Shapes::idx($shape, 'timeVal') === null ? null : (\thrift\op\TimePatch::__fromShape($shape['timeVal'])), - Shapes::idx($shape, 'optBoolVal') === null ? null : (\thrift\op\BoolPatch::__fromShape($shape['optBoolVal'])), - Shapes::idx($shape, 'optByteVal') === null ? null : (\thrift\op\BytePatch::__fromShape($shape['optByteVal'])), - Shapes::idx($shape, 'optI16Val') === null ? null : (\thrift\op\I16Patch::__fromShape($shape['optI16Val'])), - Shapes::idx($shape, 'optI32Val') === null ? null : (\thrift\op\I32Patch::__fromShape($shape['optI32Val'])), - Shapes::idx($shape, 'optI64Val') === null ? null : (\thrift\op\I64Patch::__fromShape($shape['optI64Val'])), - Shapes::idx($shape, 'optFloatVal') === null ? null : (\thrift\op\FloatPatch::__fromShape($shape['optFloatVal'])), - Shapes::idx($shape, 'optDoubleVal') === null ? null : (\thrift\op\DoublePatch::__fromShape($shape['optDoubleVal'])), - Shapes::idx($shape, 'optStringVal') === null ? null : (\thrift\op\StringPatch::__fromShape($shape['optStringVal'])), - Shapes::idx($shape, 'optBinaryVal') === null ? null : (\thrift\op\BinaryPatch::__fromShape($shape['optBinaryVal'])), - Shapes::idx($shape, 'optEnumVal') === null ? null : (\fixtures\patch\MyStructFieldN25Patch::__fromShape($shape['optEnumVal'])), - Shapes::idx($shape, 'optStructVal') === null ? null : (\fixtures\patch\MyDataPatch::__fromShape($shape['optStructVal'])), - Shapes::idx($shape, 'optLateStructVal') === null ? null : (\fixtures\patch\LateDefStructPatch::__fromShape($shape['optLateStructVal'])), - Shapes::idx($shape, 'optListVal') === null ? null : (\fixtures\patch\MyStructFieldN28Patch::__fromShape($shape['optListVal'])), - Shapes::idx($shape, 'optSetVal') === null ? null : (\fixtures\patch\MyStructFieldN29Patch::__fromShape($shape['optSetVal'])), - Shapes::idx($shape, 'optMapVal') === null ? null : (\fixtures\patch\MyStructFieldN30Patch::__fromShape($shape['optMapVal'])), - ); - } - - public function __toShape()[]: self::TShape { - return shape( - 'boolVal' => $this->boolVal?->__toShape(), - 'byteVal' => $this->byteVal?->__toShape(), - 'i16Val' => $this->i16Val?->__toShape(), - 'i32Val' => $this->i32Val?->__toShape(), - 'i64Val' => $this->i64Val?->__toShape(), - 'floatVal' => $this->floatVal?->__toShape(), - 'doubleVal' => $this->doubleVal?->__toShape(), - 'stringVal' => $this->stringVal?->__toShape(), - 'binaryVal' => $this->binaryVal?->__toShape(), - 'enumVal' => $this->enumVal?->__toShape(), - 'structVal' => $this->structVal?->__toShape(), - 'unionVal' => $this->unionVal?->__toShape(), - 'lateStructVal' => $this->lateStructVal?->__toShape(), - 'durationVal' => $this->durationVal?->__toShape(), - 'timeVal' => $this->timeVal?->__toShape(), - 'optBoolVal' => $this->optBoolVal?->__toShape(), - 'optByteVal' => $this->optByteVal?->__toShape(), - 'optI16Val' => $this->optI16Val?->__toShape(), - 'optI32Val' => $this->optI32Val?->__toShape(), - 'optI64Val' => $this->optI64Val?->__toShape(), - 'optFloatVal' => $this->optFloatVal?->__toShape(), - 'optDoubleVal' => $this->optDoubleVal?->__toShape(), - 'optStringVal' => $this->optStringVal?->__toShape(), - 'optBinaryVal' => $this->optBinaryVal?->__toShape(), - 'optEnumVal' => $this->optEnumVal?->__toShape(), - 'optStructVal' => $this->optStructVal?->__toShape(), - 'optLateStructVal' => $this->optLateStructVal?->__toShape(), - 'optListVal' => $this->optListVal?->__toShape(), - 'optSetVal' => $this->optSetVal?->__toShape(), - 'optMapVal' => $this->optMapVal?->__toShape(), - ); - } - public function getInstanceKey()[write_props]: string { - return \TCompactSerializer::serialize($this); - } - - public function readFromJson(string $jsonText): void { - $parsed = json_decode($jsonText, true); - - if ($parsed === null || !($parsed is KeyedContainer<_, _>)) { - throw new \TProtocolException("Cannot parse the given json string."); - } - - if (idx($parsed, 'boolVal') !== null) { - $_tmp0 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['boolVal'])); - $_tmp1 = \thrift\op\BoolPatch::withDefaultValues(); - $_tmp1->readFromJson($_tmp0); - $this->boolVal = $_tmp1; - } - if (idx($parsed, 'byteVal') !== null) { - $_tmp2 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['byteVal'])); - $_tmp3 = \thrift\op\BytePatch::withDefaultValues(); - $_tmp3->readFromJson($_tmp2); - $this->byteVal = $_tmp3; - } - if (idx($parsed, 'i16Val') !== null) { - $_tmp4 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['i16Val'])); - $_tmp5 = \thrift\op\I16Patch::withDefaultValues(); - $_tmp5->readFromJson($_tmp4); - $this->i16Val = $_tmp5; - } - if (idx($parsed, 'i32Val') !== null) { - $_tmp6 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['i32Val'])); - $_tmp7 = \thrift\op\I32Patch::withDefaultValues(); - $_tmp7->readFromJson($_tmp6); - $this->i32Val = $_tmp7; - } - if (idx($parsed, 'i64Val') !== null) { - $_tmp8 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['i64Val'])); - $_tmp9 = \thrift\op\I64Patch::withDefaultValues(); - $_tmp9->readFromJson($_tmp8); - $this->i64Val = $_tmp9; - } - if (idx($parsed, 'floatVal') !== null) { - $_tmp10 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['floatVal'])); - $_tmp11 = \thrift\op\FloatPatch::withDefaultValues(); - $_tmp11->readFromJson($_tmp10); - $this->floatVal = $_tmp11; - } - if (idx($parsed, 'doubleVal') !== null) { - $_tmp12 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['doubleVal'])); - $_tmp13 = \thrift\op\DoublePatch::withDefaultValues(); - $_tmp13->readFromJson($_tmp12); - $this->doubleVal = $_tmp13; - } - if (idx($parsed, 'stringVal') !== null) { - $_tmp14 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['stringVal'])); - $_tmp15 = \thrift\op\StringPatch::withDefaultValues(); - $_tmp15->readFromJson($_tmp14); - $this->stringVal = $_tmp15; - } - if (idx($parsed, 'binaryVal') !== null) { - $_tmp16 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['binaryVal'])); - $_tmp17 = \thrift\op\BinaryPatch::withDefaultValues(); - $_tmp17->readFromJson($_tmp16); - $this->binaryVal = $_tmp17; - } - if (idx($parsed, 'enumVal') !== null) { - $_tmp18 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['enumVal'])); - $_tmp19 = \fixtures\patch\MyStructFieldN10Patch::withDefaultValues(); - $_tmp19->readFromJson($_tmp18); - $this->enumVal = $_tmp19; - } - if (idx($parsed, 'structVal') !== null) { - $_tmp20 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['structVal'])); - $_tmp21 = \fixtures\patch\MyDataPatch::withDefaultValues(); - $_tmp21->readFromJson($_tmp20); - $this->structVal = $_tmp21; - } - if (idx($parsed, 'unionVal') !== null) { - $_tmp22 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['unionVal'])); - $_tmp23 = \fixtures\patch\MyUnionPatch::withDefaultValues(); - $_tmp23->readFromJson($_tmp22); - $this->unionVal = $_tmp23; - } - if (idx($parsed, 'lateStructVal') !== null) { - $_tmp24 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['lateStructVal'])); - $_tmp25 = \fixtures\patch\LateDefStructPatch::withDefaultValues(); - $_tmp25->readFromJson($_tmp24); - $this->lateStructVal = $_tmp25; - } - if (idx($parsed, 'durationVal') !== null) { - $_tmp26 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['durationVal'])); - $_tmp27 = \thrift\op\DurationPatch::withDefaultValues(); - $_tmp27->readFromJson($_tmp26); - $this->durationVal = $_tmp27; - } - if (idx($parsed, 'timeVal') !== null) { - $_tmp28 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['timeVal'])); - $_tmp29 = \thrift\op\TimePatch::withDefaultValues(); - $_tmp29->readFromJson($_tmp28); - $this->timeVal = $_tmp29; - } - if (idx($parsed, 'optBoolVal') !== null) { - $_tmp30 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optBoolVal'])); - $_tmp31 = \thrift\op\BoolPatch::withDefaultValues(); - $_tmp31->readFromJson($_tmp30); - $this->optBoolVal = $_tmp31; - } - if (idx($parsed, 'optByteVal') !== null) { - $_tmp32 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optByteVal'])); - $_tmp33 = \thrift\op\BytePatch::withDefaultValues(); - $_tmp33->readFromJson($_tmp32); - $this->optByteVal = $_tmp33; - } - if (idx($parsed, 'optI16Val') !== null) { - $_tmp34 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optI16Val'])); - $_tmp35 = \thrift\op\I16Patch::withDefaultValues(); - $_tmp35->readFromJson($_tmp34); - $this->optI16Val = $_tmp35; - } - if (idx($parsed, 'optI32Val') !== null) { - $_tmp36 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optI32Val'])); - $_tmp37 = \thrift\op\I32Patch::withDefaultValues(); - $_tmp37->readFromJson($_tmp36); - $this->optI32Val = $_tmp37; - } - if (idx($parsed, 'optI64Val') !== null) { - $_tmp38 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optI64Val'])); - $_tmp39 = \thrift\op\I64Patch::withDefaultValues(); - $_tmp39->readFromJson($_tmp38); - $this->optI64Val = $_tmp39; - } - if (idx($parsed, 'optFloatVal') !== null) { - $_tmp40 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optFloatVal'])); - $_tmp41 = \thrift\op\FloatPatch::withDefaultValues(); - $_tmp41->readFromJson($_tmp40); - $this->optFloatVal = $_tmp41; - } - if (idx($parsed, 'optDoubleVal') !== null) { - $_tmp42 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optDoubleVal'])); - $_tmp43 = \thrift\op\DoublePatch::withDefaultValues(); - $_tmp43->readFromJson($_tmp42); - $this->optDoubleVal = $_tmp43; - } - if (idx($parsed, 'optStringVal') !== null) { - $_tmp44 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optStringVal'])); - $_tmp45 = \thrift\op\StringPatch::withDefaultValues(); - $_tmp45->readFromJson($_tmp44); - $this->optStringVal = $_tmp45; - } - if (idx($parsed, 'optBinaryVal') !== null) { - $_tmp46 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optBinaryVal'])); - $_tmp47 = \thrift\op\BinaryPatch::withDefaultValues(); - $_tmp47->readFromJson($_tmp46); - $this->optBinaryVal = $_tmp47; - } - if (idx($parsed, 'optEnumVal') !== null) { - $_tmp48 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optEnumVal'])); - $_tmp49 = \fixtures\patch\MyStructFieldN25Patch::withDefaultValues(); - $_tmp49->readFromJson($_tmp48); - $this->optEnumVal = $_tmp49; - } - if (idx($parsed, 'optStructVal') !== null) { - $_tmp50 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optStructVal'])); - $_tmp51 = \fixtures\patch\MyDataPatch::withDefaultValues(); - $_tmp51->readFromJson($_tmp50); - $this->optStructVal = $_tmp51; - } - if (idx($parsed, 'optLateStructVal') !== null) { - $_tmp52 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optLateStructVal'])); - $_tmp53 = \fixtures\patch\LateDefStructPatch::withDefaultValues(); - $_tmp53->readFromJson($_tmp52); - $this->optLateStructVal = $_tmp53; - } - if (idx($parsed, 'optListVal') !== null) { - $_tmp54 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optListVal'])); - $_tmp55 = \fixtures\patch\MyStructFieldN28Patch::withDefaultValues(); - $_tmp55->readFromJson($_tmp54); - $this->optListVal = $_tmp55; - } - if (idx($parsed, 'optSetVal') !== null) { - $_tmp56 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optSetVal'])); - $_tmp57 = \fixtures\patch\MyStructFieldN29Patch::withDefaultValues(); - $_tmp57->readFromJson($_tmp56); - $this->optSetVal = $_tmp57; - } - if (idx($parsed, 'optMapVal') !== null) { - $_tmp58 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optMapVal'])); - $_tmp59 = \fixtures\patch\MyStructFieldN30Patch::withDefaultValues(); - $_tmp59->readFromJson($_tmp58); - $this->optMapVal = $_tmp59; - } - } - -} - -/** - * Original thrift struct:- - * MyStructFieldN10Patch - */ -<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN10Patch'))>> -class MyStructFieldN10Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { - use \ThriftSerializationTrait; - - const dict SPEC = dict[ - 1 => shape( - 'var' => 'assign', - 'type' => \TType::I32, - 'enum' => \fixtures\patch\MyEnum::class, - ), - 2 => shape( - 'var' => 'clear', - 'type' => \TType::BOOL, - ), - ]; - const dict FIELDMAP = dict[ - 'assign' => 1, - 'clear' => 2, - ]; - - const type TConstructorShape = shape( - ?'assign' => ?\fixtures\patch\MyEnum, - ?'clear' => ?bool, - ); - - const type TShape = shape( - ?'assign' => ?\fixtures\patch\MyEnum, - 'clear' => bool, - ... - ); - const int STRUCTURAL_ID = 1042349483945124076; - /** - * Assigns a value. If set, all other operations are ignored. - * - * Original thrift field:- - * 1: enum module.MyEnum assign - */ - public ?\fixtures\patch\MyEnum $assign; - /** - * Clears a value. Applies first. - * - * Original thrift field:- - * 2: bool clear - */ - public bool $clear; - - public function __construct(?\fixtures\patch\MyEnum $assign = null, ?bool $clear = null)[] { - $this->assign = $assign; - $this->clear = $clear ?? false; - } - - public static function withDefaultValues()[]: this { - return new static(); - } - - public static function fromShape(self::TConstructorShape $shape)[]: this { - return new static( - Shapes::idx($shape, 'assign'), - Shapes::idx($shape, 'clear'), - ); - } - - public function getName()[]: string { - return 'MyStructFieldN10Patch'; - } - - public function clearTerseFields()[write_props]: void { - } - - public static function getStructMetadata()[]: \tmeta_ThriftStruct { - return \tmeta_ThriftStruct::fromShape( - shape( - "name" => "module.MyStructFieldN10Patch", - "fields" => vec[ - \tmeta_ThriftField::fromShape( - shape( - "id" => 1, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_enum" => \tmeta_ThriftEnumType::fromShape( - shape( - "name" => "module.MyEnum", - ) - ), - ) - ), - "name" => "assign", - "is_optional" => true, - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => 2, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BOOL_TYPE, - ) - ), - "name" => "clear", - ) - ), - ], - "is_union" => false, - ) - ); - } - - public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { - return shape( - 'struct' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::AssignPatchAdapter", - "underlyingName" => "MyStructFieldN10PatchStruct", + "name" => "::apache::thrift::op::detail::ListPatchAdapter", + "underlyingName" => "MyStructFieldN28PatchStruct", "extraNamespace" => "", ) ), @@ -5186,15 +4081,29 @@ class MyStructFieldN10Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt public static function __fromShape(self::TShape $shape)[]: this { return new static( - Shapes::idx($shape, 'assign'), + Shapes::idx($shape, 'assign') === null ? null : ((new Vector($shape['assign']))), $shape['clear'], + (new Map($shape['patch']))->map( + $val0 ==> \thrift\op\I16Patch::__fromShape($val0), + ), + (new Vector($shape['remove'])), + (new Vector($shape['prepend'])), + (new Vector($shape['append'])), ); } public function __toShape()[]: self::TShape { return shape( - 'assign' => $this->assign, + 'assign' => $this->assign + |> $$ === null ? null : vec($$), 'clear' => $this->clear, + 'patch' => $this->patch->map( + ($_val0) ==> $_val0->__toShape(), + ) + |> dict($$), + 'remove' => vec($this->remove), + 'prepend' => vec($this->prepend), + 'append' => vec($this->append), ); } public function getInstanceKey()[write_props]: string { @@ -5209,57 +4118,155 @@ class MyStructFieldN10Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt } if (idx($parsed, 'assign') !== null) { - $this->assign = \fixtures\patch\MyEnum::coerce(HH\FIXME\UNSAFE_CAST($parsed['assign'])); + $_json3 = HH\FIXME\UNSAFE_CAST>($parsed['assign']); + $_container4 = Vector {}; + foreach($_json3 as $_key1 => $_value2) { + $_elem5 = 0; + $_tmp6 = (int)$_value2; + if ($_tmp6 > 0x7fff) { + throw new \TProtocolException("number exceeds limit in field"); + } else { + $_elem5 = (int)$_tmp6; + } + $_container4 []= $_elem5; + } + $this->assign = $_container4; } if (idx($parsed, 'clear') !== null) { $this->clear = HH\FIXME\UNSAFE_CAST($parsed['clear']); } + if (idx($parsed, 'patch') !== null) { + $_json10 = HH\FIXME\UNSAFE_CAST>($parsed['patch']); + $_container11 = Map {}; + foreach($_json10 as $_key8 => $_value9) { + $_value12 = \thrift\op\I16Patch::withDefaultValues(); + $_tmp13 = \json_encode($_value9); + $_tmp14 = \thrift\op\I16Patch::withDefaultValues(); + $_tmp14->readFromJson($_tmp13); + $_value12 = $_tmp14; + $_container11[$_key8] = $_value12; + } + $this->patch = $_container11; + } + if (idx($parsed, 'remove') !== null) { + $_json18 = HH\FIXME\UNSAFE_CAST>($parsed['remove']); + $_container19 = Vector {}; + foreach($_json18 as $_key16 => $_value17) { + $_elem20 = 0; + $_tmp21 = (int)$_value17; + if ($_tmp21 > 0x7fff) { + throw new \TProtocolException("number exceeds limit in field"); + } else { + $_elem20 = (int)$_tmp21; + } + $_container19 []= $_elem20; + } + $this->remove = $_container19; + } + if (idx($parsed, 'prepend') !== null) { + $_json25 = HH\FIXME\UNSAFE_CAST>($parsed['prepend']); + $_container26 = Vector {}; + foreach($_json25 as $_key23 => $_value24) { + $_elem27 = 0; + $_tmp28 = (int)$_value24; + if ($_tmp28 > 0x7fff) { + throw new \TProtocolException("number exceeds limit in field"); + } else { + $_elem27 = (int)$_tmp28; + } + $_container26 []= $_elem27; + } + $this->prepend = $_container26; + } + if (idx($parsed, 'append') !== null) { + $_json32 = HH\FIXME\UNSAFE_CAST>($parsed['append']); + $_container33 = Vector {}; + foreach($_json32 as $_key30 => $_value31) { + $_elem34 = 0; + $_tmp35 = (int)$_value31; + if ($_tmp35 > 0x7fff) { + throw new \TProtocolException("number exceeds limit in field"); + } else { + $_elem34 = (int)$_tmp35; + } + $_container33 []= $_elem34; + } + $this->append = $_container33; + } } } /** * Original thrift struct:- - * MyStructFieldN25Patch + * MyStructFieldN29Patch */ -<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN25Patch'))>> -class MyStructFieldN25Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { +<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN29Patch'))>> +class MyStructFieldN29Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { use \ThriftSerializationTrait; const dict SPEC = dict[ 1 => shape( 'var' => 'assign', - 'type' => \TType::I32, - 'enum' => \fixtures\patch\MyEnum::class, + 'type' => \TType::SET, + 'etype' => \TType::STRING, + 'elem' => shape( + 'type' => \TType::STRING, + ), + 'format' => 'collection', ), 2 => shape( 'var' => 'clear', 'type' => \TType::BOOL, ), + 7 => shape( + 'var' => 'remove', + 'type' => \TType::SET, + 'etype' => \TType::STRING, + 'elem' => shape( + 'type' => \TType::STRING, + ), + 'format' => 'collection', + ), + 8 => shape( + 'var' => 'add', + 'type' => \TType::SET, + 'etype' => \TType::STRING, + 'elem' => shape( + 'type' => \TType::STRING, + ), + 'format' => 'collection', + ), ]; const dict FIELDMAP = dict[ 'assign' => 1, 'clear' => 2, + 'remove' => 7, + 'add' => 8, ]; const type TConstructorShape = shape( - ?'assign' => ?\fixtures\patch\MyEnum, + ?'assign' => ?Set, ?'clear' => ?bool, + ?'remove' => ?Set, + ?'add' => ?Set, ); const type TShape = shape( - ?'assign' => ?\fixtures\patch\MyEnum, + ?'assign' => ?dict, 'clear' => bool, + 'remove' => dict, + 'add' => dict, ... ); - const int STRUCTURAL_ID = 1042349483945124076; + const int STRUCTURAL_ID = 5127750308738770244; /** * Assigns a value. If set, all other operations are ignored. * * Original thrift field:- - * 1: enum module.MyEnum assign + * 1: set assign */ - public ?\fixtures\patch\MyEnum $assign; + public ?Set $assign; /** * Clears a value. Applies first. * @@ -5267,10 +4274,26 @@ class MyStructFieldN25Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt * 2: bool clear */ public bool $clear; + /** + * Removes entries, if present. Applies third. + * + * Original thrift field:- + * 7: set remove + */ + public Set $remove; + /** + * Adds entries, if not already present. Applies fourth. + * + * Original thrift field:- + * 8: set add + */ + public Set $add; - public function __construct(?\fixtures\patch\MyEnum $assign = null, ?bool $clear = null)[] { + public function __construct(?Set $assign = null, ?bool $clear = null, ?Set $remove = null, ?Set $add = null)[] { $this->assign = $assign; $this->clear = $clear ?? false; + $this->remove = $remove ?? Set {}; + $this->add = $add ?? Set {}; } public static function withDefaultValues()[]: this { @@ -5281,11 +4304,13 @@ class MyStructFieldN25Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt return new static( Shapes::idx($shape, 'assign'), Shapes::idx($shape, 'clear'), + Shapes::idx($shape, 'remove'), + Shapes::idx($shape, 'add'), ); } public function getName()[]: string { - return 'MyStructFieldN25Patch'; + return 'MyStructFieldN29Patch'; } public function clearTerseFields()[write_props]: void { @@ -5294,16 +4319,20 @@ class MyStructFieldN25Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt public static function getStructMetadata()[]: \tmeta_ThriftStruct { return \tmeta_ThriftStruct::fromShape( shape( - "name" => "module.MyStructFieldN25Patch", + "name" => "module.MyStructFieldN29Patch", "fields" => vec[ \tmeta_ThriftField::fromShape( shape( "id" => 1, "type" => \tmeta_ThriftType::fromShape( shape( - "t_enum" => \tmeta_ThriftEnumType::fromShape( + "t_set" => \tmeta_ThriftSetType::fromShape( shape( - "name" => "module.MyEnum", + "valueType" => \tmeta_ThriftType::fromShape( + shape( + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, + ) + ), ) ), ) @@ -5323,6 +4352,44 @@ class MyStructFieldN25Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt "name" => "clear", ) ), + \tmeta_ThriftField::fromShape( + shape( + "id" => 7, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_set" => \tmeta_ThriftSetType::fromShape( + shape( + "valueType" => \tmeta_ThriftType::fromShape( + shape( + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, + ) + ), + ) + ), + ) + ), + "name" => "remove", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => 8, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_set" => \tmeta_ThriftSetType::fromShape( + shape( + "valueType" => \tmeta_ThriftType::fromShape( + shape( + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, + ) + ), + ) + ), + ) + ), + "name" => "add", + ) + ), ], "is_union" => false, ) @@ -5334,8 +4401,8 @@ class MyStructFieldN25Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt 'struct' => dict[ '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( shape( - "name" => "::apache::thrift::op::detail::AssignPatchAdapter", - "underlyingName" => "MyStructFieldN25PatchStruct", + "name" => "::apache::thrift::op::detail::SetPatchAdapter", + "underlyingName" => "MyStructFieldN29PatchStruct", "extraNamespace" => "", ) ), @@ -5347,15 +4414,20 @@ class MyStructFieldN25Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt public static function __fromShape(self::TShape $shape)[]: this { return new static( - Shapes::idx($shape, 'assign'), + Shapes::idx($shape, 'assign') === null ? null : (new Set(Keyset\keys($shape['assign']))), $shape['clear'], + new Set(Keyset\keys($shape['remove'])), + new Set(Keyset\keys($shape['add'])), ); } public function __toShape()[]: self::TShape { return shape( - 'assign' => $this->assign, + 'assign' => $this->assign + |> $$ === null ? null : ThriftUtil::toDArray(Dict\fill_keys($$->toValuesArray(), true), static::class), 'clear' => $this->clear, + 'remove' => ThriftUtil::toDArray(Dict\fill_keys($this->remove->toValuesArray(), true), static::class), + 'add' => ThriftUtil::toDArray(Dict\fill_keys($this->add->toValuesArray(), true), static::class), ); } public function getInstanceKey()[write_props]: string { @@ -5370,30 +4442,61 @@ class MyStructFieldN25Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt } if (idx($parsed, 'assign') !== null) { - $this->assign = \fixtures\patch\MyEnum::coerce(HH\FIXME\UNSAFE_CAST($parsed['assign'])); + $_json3 = HH\FIXME\UNSAFE_CAST>($parsed['assign']); + $_container4 = Set {}; + foreach($_json3 as $_key1 => $_value2) { + $_elem5 = ''; + $_elem5 = $_value2; + $_container4->add($_elem5); + } + $this->assign = $_container4; } if (idx($parsed, 'clear') !== null) { $this->clear = HH\FIXME\UNSAFE_CAST($parsed['clear']); } + if (idx($parsed, 'remove') !== null) { + $_json9 = HH\FIXME\UNSAFE_CAST>($parsed['remove']); + $_container10 = Set {}; + foreach($_json9 as $_key7 => $_value8) { + $_elem11 = ''; + $_elem11 = $_value8; + $_container10->add($_elem11); + } + $this->remove = $_container10; + } + if (idx($parsed, 'add') !== null) { + $_json15 = HH\FIXME\UNSAFE_CAST>($parsed['add']); + $_container16 = Set {}; + foreach($_json15 as $_key13 => $_value14) { + $_elem17 = ''; + $_elem17 = $_value14; + $_container16->add($_elem17); + } + $this->add = $_container16; + } } } /** * Original thrift struct:- - * MyStructFieldN28Patch + * MyStructFieldN30Patch */ -<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN28Patch'))>> -class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { +<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN30Patch'))>> +class MyStructFieldN30Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { use \ThriftSerializationTrait; const dict SPEC = dict[ 1 => shape( 'var' => 'assign', - 'type' => \TType::LST, - 'etype' => \TType::I16, - 'elem' => shape( - 'type' => \TType::I16, + 'type' => \TType::MAP, + 'ktype' => \TType::STRING, + 'vtype' => \TType::STRING, + 'key' => shape( + 'type' => \TType::STRING, + ), + 'val' => shape( + 'type' => \TType::STRING, ), 'format' => 'collection', ), @@ -5401,44 +4504,38 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt 'var' => 'clear', 'type' => \TType::BOOL, ), - 3 => shape( - 'var' => 'patch', + 5 => shape( + 'var' => 'add', 'type' => \TType::MAP, - 'ktype' => \TType::I32, - 'vtype' => \TType::STRUCT, + 'ktype' => \TType::STRING, + 'vtype' => \TType::STRING, 'key' => shape( - 'type' => \TType::I32, + 'type' => \TType::STRING, ), 'val' => shape( - 'type' => \TType::STRUCT, - 'class' => \thrift\op\I16Patch::class, + 'type' => \TType::STRING, ), 'format' => 'collection', ), 7 => shape( 'var' => 'remove', - 'type' => \TType::LST, - 'etype' => \TType::I16, - 'elem' => shape( - 'type' => \TType::I16, - ), - 'format' => 'collection', - ), - 8 => shape( - 'var' => 'prepend', - 'type' => \TType::LST, - 'etype' => \TType::I16, + 'type' => \TType::SET, + 'etype' => \TType::STRING, 'elem' => shape( - 'type' => \TType::I16, + 'type' => \TType::STRING, ), 'format' => 'collection', ), 9 => shape( - 'var' => 'append', - 'type' => \TType::LST, - 'etype' => \TType::I16, - 'elem' => shape( - 'type' => \TType::I16, + 'var' => 'put', + 'type' => \TType::MAP, + 'ktype' => \TType::STRING, + 'vtype' => \TType::STRING, + 'key' => shape( + 'type' => \TType::STRING, + ), + 'val' => shape( + 'type' => \TType::STRING, ), 'format' => 'collection', ), @@ -5446,38 +4543,35 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt const dict FIELDMAP = dict[ 'assign' => 1, 'clear' => 2, - 'patch' => 3, + 'add' => 5, 'remove' => 7, - 'prepend' => 8, - 'append' => 9, + 'put' => 9, ]; const type TConstructorShape = shape( - ?'assign' => ?Vector, + ?'assign' => ?Map, ?'clear' => ?bool, - ?'patch' => ?Map, - ?'remove' => ?Vector, - ?'prepend' => ?Vector, - ?'append' => ?Vector, + ?'add' => ?Map, + ?'remove' => ?Set, + ?'put' => ?Map, ); const type TShape = shape( - ?'assign' => ?vec, + ?'assign' => ?dict, 'clear' => bool, - 'patch' => dict, - 'remove' => vec, - 'prepend' => vec, - 'append' => vec, + 'add' => dict, + 'remove' => dict, + 'put' => dict, ... ); - const int STRUCTURAL_ID = 8909257665578209994; + const int STRUCTURAL_ID = 7865087528989146577; /** * Assigns a value. If set, all other operations are ignored. * * Original thrift field:- - * 1: list assign + * 1: map assign */ - public ?Vector $assign; + public ?Map $assign; /** * Clears a value. Applies first. * @@ -5486,41 +4580,33 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt */ public bool $clear; /** - * Patches list values by index. Applies second. + * Add the given values, if the keys are not already present. Applies forth. * * Original thrift field:- - * 3: map patch + * 5: map add */ - public Map $patch; + public Map $add; /** * Removes entries, if present. Applies third. * * Original thrift field:- - * 7: list remove - */ - public Vector $remove; - /** - * Prepends to the front of a given list. - * - * Original thrift field:- - * 8: list prepend + * 7: set remove */ - public Vector $prepend; + public Set $remove; /** - * Appends to the back of a given list. + * Adds or replaces the given key/value pairs. Applies fifth. * * Original thrift field:- - * 9: list append + * 9: map put */ - public Vector $append; + public Map $put; - public function __construct(?Vector $assign = null, ?bool $clear = null, ?Map $patch = null, ?Vector $remove = null, ?Vector $prepend = null, ?Vector $append = null)[] { + public function __construct(?Map $assign = null, ?bool $clear = null, ?Map $add = null, ?Set $remove = null, ?Map $put = null)[] { $this->assign = $assign; $this->clear = $clear ?? false; - $this->patch = $patch ?? Map {}; - $this->remove = $remove ?? Vector {}; - $this->prepend = $prepend ?? Vector {}; - $this->append = $append ?? Vector {}; + $this->add = $add ?? Map {}; + $this->remove = $remove ?? Set {}; + $this->put = $put ?? Map {}; } public static function withDefaultValues()[]: this { @@ -5531,15 +4617,14 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt return new static( Shapes::idx($shape, 'assign'), Shapes::idx($shape, 'clear'), - Shapes::idx($shape, 'patch'), + Shapes::idx($shape, 'add'), Shapes::idx($shape, 'remove'), - Shapes::idx($shape, 'prepend'), - Shapes::idx($shape, 'append'), + Shapes::idx($shape, 'put'), ); } public function getName()[]: string { - return 'MyStructFieldN28Patch'; + return 'MyStructFieldN30Patch'; } public function clearTerseFields()[write_props]: void { @@ -5548,18 +4633,23 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt public static function getStructMetadata()[]: \tmeta_ThriftStruct { return \tmeta_ThriftStruct::fromShape( shape( - "name" => "module.MyStructFieldN28Patch", + "name" => "module.MyStructFieldN30Patch", "fields" => vec[ \tmeta_ThriftField::fromShape( shape( "id" => 1, "type" => \tmeta_ThriftType::fromShape( shape( - "t_list" => \tmeta_ThriftListType::fromShape( + "t_map" => \tmeta_ThriftMapType::fromShape( shape( + "keyType" => \tmeta_ThriftType::fromShape( + shape( + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, + ) + ), "valueType" => \tmeta_ThriftType::fromShape( shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE, + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, ) ), ) @@ -5583,30 +4673,26 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt ), \tmeta_ThriftField::fromShape( shape( - "id" => 3, + "id" => 5, "type" => \tmeta_ThriftType::fromShape( shape( "t_map" => \tmeta_ThriftMapType::fromShape( shape( "keyType" => \tmeta_ThriftType::fromShape( shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE, + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, ) ), "valueType" => \tmeta_ThriftType::fromShape( shape( - "t_struct" => \tmeta_ThriftStructType::fromShape( - shape( - "name" => "patch.I16Patch", - ) - ), + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, ) ), ) ), ) ), - "name" => "patch", + "name" => "add", ) ), \tmeta_ThriftField::fromShape( @@ -5614,11 +4700,11 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt "id" => 7, "type" => \tmeta_ThriftType::fromShape( shape( - "t_list" => \tmeta_ThriftListType::fromShape( + "t_set" => \tmeta_ThriftSetType::fromShape( shape( "valueType" => \tmeta_ThriftType::fromShape( shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE, + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, ) ), ) @@ -5630,40 +4716,26 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt ), \tmeta_ThriftField::fromShape( shape( - "id" => 8, + "id" => 9, "type" => \tmeta_ThriftType::fromShape( shape( - "t_list" => \tmeta_ThriftListType::fromShape( + "t_map" => \tmeta_ThriftMapType::fromShape( shape( - "valueType" => \tmeta_ThriftType::fromShape( + "keyType" => \tmeta_ThriftType::fromShape( shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE, + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, ) ), - ) - ), - ) - ), - "name" => "prepend", - ) - ), - \tmeta_ThriftField::fromShape( - shape( - "id" => 9, - "type" => \tmeta_ThriftType::fromShape( - shape( - "t_list" => \tmeta_ThriftListType::fromShape( - shape( "valueType" => \tmeta_ThriftType::fromShape( shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE, + "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, ) ), ) ), ) ), - "name" => "append", + "name" => "put", ) ), ], @@ -5677,8 +4749,8 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt 'struct' => dict[ '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( shape( - "name" => "::apache::thrift::op::detail::ListPatchAdapter", - "underlyingName" => "MyStructFieldN28PatchStruct", + "name" => "::apache::thrift::op::detail::MapPatchAdapter", + "underlyingName" => "MyStructFieldN30PatchStruct", "extraNamespace" => "", ) ), @@ -5690,29 +4762,22 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt public static function __fromShape(self::TShape $shape)[]: this { return new static( - Shapes::idx($shape, 'assign') === null ? null : ((new Vector($shape['assign']))), + Shapes::idx($shape, 'assign') === null ? null : ((new Map($shape['assign']))), $shape['clear'], - (new Map($shape['patch']))->map( - $val0 ==> \thrift\op\I16Patch::__fromShape($val0), - ), - (new Vector($shape['remove'])), - (new Vector($shape['prepend'])), - (new Vector($shape['append'])), + (new Map($shape['add'])), + new Set(Keyset\keys($shape['remove'])), + (new Map($shape['put'])), ); } public function __toShape()[]: self::TShape { return shape( 'assign' => $this->assign - |> $$ === null ? null : vec($$), + |> $$ === null ? null : dict($$), 'clear' => $this->clear, - 'patch' => $this->patch->map( - ($_val0) ==> $_val0->__toShape(), - ) - |> dict($$), - 'remove' => vec($this->remove), - 'prepend' => vec($this->prepend), - 'append' => vec($this->append), + 'add' => dict($this->add), + 'remove' => ThriftUtil::toDArray(Dict\fill_keys($this->remove->toValuesArray(), true), static::class), + 'put' => dict($this->put), ); } public function getInstanceKey()[write_props]: string { @@ -5727,80 +4792,47 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt } if (idx($parsed, 'assign') !== null) { - $_json3 = HH\FIXME\UNSAFE_CAST>($parsed['assign']); - $_container4 = Vector {}; + $_json3 = HH\FIXME\UNSAFE_CAST>($parsed['assign']); + $_container4 = Map {}; foreach($_json3 as $_key1 => $_value2) { - $_elem5 = 0; - $_tmp6 = (int)$_value2; - if ($_tmp6 > 0x7fff) { - throw new \TProtocolException("number exceeds limit in field"); - } else { - $_elem5 = (int)$_tmp6; - } - $_container4 []= $_elem5; + $_value5 = ''; + $_value5 = $_value2; + $_container4[$_key1] = $_value5; } $this->assign = $_container4; } if (idx($parsed, 'clear') !== null) { $this->clear = HH\FIXME\UNSAFE_CAST($parsed['clear']); } - if (idx($parsed, 'patch') !== null) { - $_json10 = HH\FIXME\UNSAFE_CAST>($parsed['patch']); - $_container11 = Map {}; - foreach($_json10 as $_key8 => $_value9) { - $_value12 = \thrift\op\I16Patch::withDefaultValues(); - $_tmp13 = \json_encode($_value9); - $_tmp14 = \thrift\op\I16Patch::withDefaultValues(); - $_tmp14->readFromJson($_tmp13); - $_value12 = $_tmp14; - $_container11[$_key8] = $_value12; - } - $this->patch = $_container11; - } - if (idx($parsed, 'remove') !== null) { - $_json18 = HH\FIXME\UNSAFE_CAST>($parsed['remove']); - $_container19 = Vector {}; - foreach($_json18 as $_key16 => $_value17) { - $_elem20 = 0; - $_tmp21 = (int)$_value17; - if ($_tmp21 > 0x7fff) { - throw new \TProtocolException("number exceeds limit in field"); - } else { - $_elem20 = (int)$_tmp21; - } - $_container19 []= $_elem20; + if (idx($parsed, 'add') !== null) { + $_json9 = HH\FIXME\UNSAFE_CAST>($parsed['add']); + $_container10 = Map {}; + foreach($_json9 as $_key7 => $_value8) { + $_value11 = ''; + $_value11 = $_value8; + $_container10[$_key7] = $_value11; } - $this->remove = $_container19; - } - if (idx($parsed, 'prepend') !== null) { - $_json25 = HH\FIXME\UNSAFE_CAST>($parsed['prepend']); - $_container26 = Vector {}; - foreach($_json25 as $_key23 => $_value24) { - $_elem27 = 0; - $_tmp28 = (int)$_value24; - if ($_tmp28 > 0x7fff) { - throw new \TProtocolException("number exceeds limit in field"); - } else { - $_elem27 = (int)$_tmp28; - } - $_container26 []= $_elem27; + $this->add = $_container10; + } + if (idx($parsed, 'remove') !== null) { + $_json15 = HH\FIXME\UNSAFE_CAST>($parsed['remove']); + $_container16 = Set {}; + foreach($_json15 as $_key13 => $_value14) { + $_elem17 = ''; + $_elem17 = $_value14; + $_container16->add($_elem17); } - $this->prepend = $_container26; + $this->remove = $_container16; } - if (idx($parsed, 'append') !== null) { - $_json32 = HH\FIXME\UNSAFE_CAST>($parsed['append']); - $_container33 = Vector {}; - foreach($_json32 as $_key30 => $_value31) { - $_elem34 = 0; - $_tmp35 = (int)$_value31; - if ($_tmp35 > 0x7fff) { - throw new \TProtocolException("number exceeds limit in field"); - } else { - $_elem34 = (int)$_tmp35; - } - $_container33 []= $_elem34; + if (idx($parsed, 'put') !== null) { + $_json21 = HH\FIXME\UNSAFE_CAST>($parsed['put']); + $_container22 = Map {}; + foreach($_json21 as $_key19 => $_value20) { + $_value23 = ''; + $_value23 = $_value20; + $_container22[$_key19] = $_value23; } - $this->append = $_container33; + $this->put = $_container22; } } @@ -5808,101 +4840,446 @@ class MyStructFieldN28Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt /** * Original thrift struct:- - * MyStructFieldN29Patch + * MyStructFieldPatch */ -<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN29Patch'))>> -class MyStructFieldN29Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { +<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldPatch'))>> +class MyStructFieldPatch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { use \ThriftSerializationTrait; const dict SPEC = dict[ - 1 => shape( - 'var' => 'assign', - 'type' => \TType::SET, - 'etype' => \TType::STRING, - 'elem' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'collection', + -30 => shape( + 'var' => 'optMapVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\MyStructFieldN30Patch::class, ), - 2 => shape( - 'var' => 'clear', - 'type' => \TType::BOOL, + -29 => shape( + 'var' => 'optSetVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\MyStructFieldN29Patch::class, ), - 7 => shape( - 'var' => 'remove', - 'type' => \TType::SET, - 'etype' => \TType::STRING, - 'elem' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'collection', + -28 => shape( + 'var' => 'optListVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\MyStructFieldN28Patch::class, ), - 8 => shape( - 'var' => 'add', - 'type' => \TType::SET, - 'etype' => \TType::STRING, - 'elem' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'collection', + -27 => shape( + 'var' => 'optLateStructVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\LateDefStructPatch::class, + ), + -26 => shape( + 'var' => 'optStructVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\MyDataPatch::class, + ), + -25 => shape( + 'var' => 'optEnumVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\MyStructFieldN25Patch::class, + ), + -24 => shape( + 'var' => 'optBinaryVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\BinaryPatch::class, + ), + -23 => shape( + 'var' => 'optStringVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\StringPatch::class, + ), + -22 => shape( + 'var' => 'optDoubleVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\DoublePatch::class, + ), + -21 => shape( + 'var' => 'optFloatVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\FloatPatch::class, + ), + -20 => shape( + 'var' => 'optI64Val', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\I64Patch::class, + ), + -19 => shape( + 'var' => 'optI32Val', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\I32Patch::class, + ), + -18 => shape( + 'var' => 'optI16Val', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\I16Patch::class, + ), + -17 => shape( + 'var' => 'optByteVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\BytePatch::class, + ), + -16 => shape( + 'var' => 'optBoolVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\BoolPatch::class, + ), + -15 => shape( + 'var' => 'timeVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\TimePatch::class, + ), + -14 => shape( + 'var' => 'durationVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\DurationPatch::class, + ), + -13 => shape( + 'var' => 'lateStructVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\LateDefStructPatch::class, + ), + -12 => shape( + 'var' => 'unionVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\MyUnionPatch::class, + ), + -11 => shape( + 'var' => 'structVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\MyDataPatch::class, + ), + -10 => shape( + 'var' => 'enumVal', + 'type' => \TType::STRUCT, + 'class' => \fixtures\patch\MyStructFieldN10Patch::class, + ), + -9 => shape( + 'var' => 'binaryVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\BinaryPatch::class, + ), + -8 => shape( + 'var' => 'stringVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\StringPatch::class, + ), + -7 => shape( + 'var' => 'doubleVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\DoublePatch::class, + ), + -6 => shape( + 'var' => 'floatVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\FloatPatch::class, + ), + -5 => shape( + 'var' => 'i64Val', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\I64Patch::class, + ), + -4 => shape( + 'var' => 'i32Val', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\I32Patch::class, + ), + -3 => shape( + 'var' => 'i16Val', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\I16Patch::class, + ), + -2 => shape( + 'var' => 'byteVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\BytePatch::class, + ), + -1 => shape( + 'var' => 'boolVal', + 'type' => \TType::STRUCT, + 'class' => \thrift\op\BoolPatch::class, ), ]; const dict FIELDMAP = dict[ - 'assign' => 1, - 'clear' => 2, - 'remove' => 7, - 'add' => 8, + 'optMapVal' => -30, + 'optSetVal' => -29, + 'optListVal' => -28, + 'optLateStructVal' => -27, + 'optStructVal' => -26, + 'optEnumVal' => -25, + 'optBinaryVal' => -24, + 'optStringVal' => -23, + 'optDoubleVal' => -22, + 'optFloatVal' => -21, + 'optI64Val' => -20, + 'optI32Val' => -19, + 'optI16Val' => -18, + 'optByteVal' => -17, + 'optBoolVal' => -16, + 'timeVal' => -15, + 'durationVal' => -14, + 'lateStructVal' => -13, + 'unionVal' => -12, + 'structVal' => -11, + 'enumVal' => -10, + 'binaryVal' => -9, + 'stringVal' => -8, + 'doubleVal' => -7, + 'floatVal' => -6, + 'i64Val' => -5, + 'i32Val' => -4, + 'i16Val' => -3, + 'byteVal' => -2, + 'boolVal' => -1, ]; const type TConstructorShape = shape( - ?'assign' => ?Set, - ?'clear' => ?bool, - ?'remove' => ?Set, - ?'add' => ?Set, + ?'optMapVal' => ?\fixtures\patch\MyStructFieldN30Patch, + ?'optSetVal' => ?\fixtures\patch\MyStructFieldN29Patch, + ?'optListVal' => ?\fixtures\patch\MyStructFieldN28Patch, + ?'optLateStructVal' => ?\fixtures\patch\LateDefStructPatch, + ?'optStructVal' => ?\fixtures\patch\MyDataPatch, + ?'optEnumVal' => ?\fixtures\patch\MyStructFieldN25Patch, + ?'optBinaryVal' => ?\thrift\op\BinaryPatch, + ?'optStringVal' => ?\thrift\op\StringPatch, + ?'optDoubleVal' => ?\thrift\op\DoublePatch, + ?'optFloatVal' => ?\thrift\op\FloatPatch, + ?'optI64Val' => ?\thrift\op\I64Patch, + ?'optI32Val' => ?\thrift\op\I32Patch, + ?'optI16Val' => ?\thrift\op\I16Patch, + ?'optByteVal' => ?\thrift\op\BytePatch, + ?'optBoolVal' => ?\thrift\op\BoolPatch, + ?'timeVal' => ?\thrift\op\TimePatch, + ?'durationVal' => ?\thrift\op\DurationPatch, + ?'lateStructVal' => ?\fixtures\patch\LateDefStructPatch, + ?'unionVal' => ?\fixtures\patch\MyUnionPatch, + ?'structVal' => ?\fixtures\patch\MyDataPatch, + ?'enumVal' => ?\fixtures\patch\MyStructFieldN10Patch, + ?'binaryVal' => ?\thrift\op\BinaryPatch, + ?'stringVal' => ?\thrift\op\StringPatch, + ?'doubleVal' => ?\thrift\op\DoublePatch, + ?'floatVal' => ?\thrift\op\FloatPatch, + ?'i64Val' => ?\thrift\op\I64Patch, + ?'i32Val' => ?\thrift\op\I32Patch, + ?'i16Val' => ?\thrift\op\I16Patch, + ?'byteVal' => ?\thrift\op\BytePatch, + ?'boolVal' => ?\thrift\op\BoolPatch, ); const type TShape = shape( - ?'assign' => ?dict, - 'clear' => bool, - 'remove' => dict, - 'add' => dict, + ?'optMapVal' => ?\fixtures\patch\MyStructFieldN30Patch::TShape, + ?'optSetVal' => ?\fixtures\patch\MyStructFieldN29Patch::TShape, + ?'optListVal' => ?\fixtures\patch\MyStructFieldN28Patch::TShape, + ?'optLateStructVal' => ?\fixtures\patch\LateDefStructPatch::TShape, + ?'optStructVal' => ?\fixtures\patch\MyDataPatch::TShape, + ?'optEnumVal' => ?\fixtures\patch\MyStructFieldN25Patch::TShape, + ?'optBinaryVal' => ?\thrift\op\BinaryPatch::TShape, + ?'optStringVal' => ?\thrift\op\StringPatch::TShape, + ?'optDoubleVal' => ?\thrift\op\DoublePatch::TShape, + ?'optFloatVal' => ?\thrift\op\FloatPatch::TShape, + ?'optI64Val' => ?\thrift\op\I64Patch::TShape, + ?'optI32Val' => ?\thrift\op\I32Patch::TShape, + ?'optI16Val' => ?\thrift\op\I16Patch::TShape, + ?'optByteVal' => ?\thrift\op\BytePatch::TShape, + ?'optBoolVal' => ?\thrift\op\BoolPatch::TShape, + ?'timeVal' => ?\thrift\op\TimePatch::TShape, + ?'durationVal' => ?\thrift\op\DurationPatch::TShape, + ?'lateStructVal' => ?\fixtures\patch\LateDefStructPatch::TShape, + ?'unionVal' => ?\fixtures\patch\MyUnionPatch::TShape, + ?'structVal' => ?\fixtures\patch\MyDataPatch::TShape, + ?'enumVal' => ?\fixtures\patch\MyStructFieldN10Patch::TShape, + ?'binaryVal' => ?\thrift\op\BinaryPatch::TShape, + ?'stringVal' => ?\thrift\op\StringPatch::TShape, + ?'doubleVal' => ?\thrift\op\DoublePatch::TShape, + ?'floatVal' => ?\thrift\op\FloatPatch::TShape, + ?'i64Val' => ?\thrift\op\I64Patch::TShape, + ?'i32Val' => ?\thrift\op\I32Patch::TShape, + ?'i16Val' => ?\thrift\op\I16Patch::TShape, + ?'byteVal' => ?\thrift\op\BytePatch::TShape, + ?'boolVal' => ?\thrift\op\BoolPatch::TShape, ... ); - const int STRUCTURAL_ID = 5127750308738770244; + const int STRUCTURAL_ID = 6836091706823426623; /** - * Assigns a value. If set, all other operations are ignored. - * * Original thrift field:- - * 1: set assign + * -30: struct module.MyStructFieldN30Patch optMapVal */ - public ?Set $assign; + public ?\fixtures\patch\MyStructFieldN30Patch $optMapVal; /** - * Clears a value. Applies first. - * * Original thrift field:- - * 2: bool clear + * -29: struct module.MyStructFieldN29Patch optSetVal */ - public bool $clear; + public ?\fixtures\patch\MyStructFieldN29Patch $optSetVal; /** - * Removes entries, if present. Applies third. - * * Original thrift field:- - * 7: set remove + * -28: struct module.MyStructFieldN28Patch optListVal */ - public Set $remove; + public ?\fixtures\patch\MyStructFieldN28Patch $optListVal; /** - * Adds entries, if not already present. Applies fourth. - * * Original thrift field:- - * 8: set add + * -27: struct module.LateDefStructPatch optLateStructVal */ - public Set $add; + public ?\fixtures\patch\LateDefStructPatch $optLateStructVal; + /** + * Original thrift field:- + * -26: struct module.MyDataPatch optStructVal + */ + public ?\fixtures\patch\MyDataPatch $optStructVal; + /** + * Original thrift field:- + * -25: struct module.MyStructFieldN25Patch optEnumVal + */ + public ?\fixtures\patch\MyStructFieldN25Patch $optEnumVal; + /** + * Original thrift field:- + * -24: struct patch.BinaryPatch optBinaryVal + */ + public ?\thrift\op\BinaryPatch $optBinaryVal; + /** + * Original thrift field:- + * -23: struct patch.StringPatch optStringVal + */ + public ?\thrift\op\StringPatch $optStringVal; + /** + * Original thrift field:- + * -22: struct patch.DoublePatch optDoubleVal + */ + public ?\thrift\op\DoublePatch $optDoubleVal; + /** + * Original thrift field:- + * -21: struct patch.FloatPatch optFloatVal + */ + public ?\thrift\op\FloatPatch $optFloatVal; + /** + * Original thrift field:- + * -20: struct patch.I64Patch optI64Val + */ + public ?\thrift\op\I64Patch $optI64Val; + /** + * Original thrift field:- + * -19: struct patch.I32Patch optI32Val + */ + public ?\thrift\op\I32Patch $optI32Val; + /** + * Original thrift field:- + * -18: struct patch.I16Patch optI16Val + */ + public ?\thrift\op\I16Patch $optI16Val; + /** + * Original thrift field:- + * -17: struct patch.BytePatch optByteVal + */ + public ?\thrift\op\BytePatch $optByteVal; + /** + * Original thrift field:- + * -16: struct patch.BoolPatch optBoolVal + */ + public ?\thrift\op\BoolPatch $optBoolVal; + /** + * Original thrift field:- + * -15: struct patch.TimePatch timeVal + */ + public ?\thrift\op\TimePatch $timeVal; + /** + * Original thrift field:- + * -14: struct patch.DurationPatch durationVal + */ + public ?\thrift\op\DurationPatch $durationVal; + /** + * Original thrift field:- + * -13: struct module.LateDefStructPatch lateStructVal + */ + public ?\fixtures\patch\LateDefStructPatch $lateStructVal; + /** + * Original thrift field:- + * -12: struct module.MyUnionPatch unionVal + */ + public ?\fixtures\patch\MyUnionPatch $unionVal; + /** + * Original thrift field:- + * -11: struct module.MyDataPatch structVal + */ + public ?\fixtures\patch\MyDataPatch $structVal; + /** + * Original thrift field:- + * -10: struct module.MyStructFieldN10Patch enumVal + */ + public ?\fixtures\patch\MyStructFieldN10Patch $enumVal; + /** + * Original thrift field:- + * -9: struct patch.BinaryPatch binaryVal + */ + public ?\thrift\op\BinaryPatch $binaryVal; + /** + * Original thrift field:- + * -8: struct patch.StringPatch stringVal + */ + public ?\thrift\op\StringPatch $stringVal; + /** + * Original thrift field:- + * -7: struct patch.DoublePatch doubleVal + */ + public ?\thrift\op\DoublePatch $doubleVal; + /** + * Original thrift field:- + * -6: struct patch.FloatPatch floatVal + */ + public ?\thrift\op\FloatPatch $floatVal; + /** + * Original thrift field:- + * -5: struct patch.I64Patch i64Val + */ + public ?\thrift\op\I64Patch $i64Val; + /** + * Original thrift field:- + * -4: struct patch.I32Patch i32Val + */ + public ?\thrift\op\I32Patch $i32Val; + /** + * Original thrift field:- + * -3: struct patch.I16Patch i16Val + */ + public ?\thrift\op\I16Patch $i16Val; + /** + * Original thrift field:- + * -2: struct patch.BytePatch byteVal + */ + public ?\thrift\op\BytePatch $byteVal; + /** + * Original thrift field:- + * -1: struct patch.BoolPatch boolVal + */ + public ?\thrift\op\BoolPatch $boolVal; - public function __construct(?Set $assign = null, ?bool $clear = null, ?Set $remove = null, ?Set $add = null)[] { - $this->assign = $assign; - $this->clear = $clear ?? false; - $this->remove = $remove ?? Set {}; - $this->add = $add ?? Set {}; + public function __construct(?\fixtures\patch\MyStructFieldN30Patch $optMapVal = null, ?\fixtures\patch\MyStructFieldN29Patch $optSetVal = null, ?\fixtures\patch\MyStructFieldN28Patch $optListVal = null, ?\fixtures\patch\LateDefStructPatch $optLateStructVal = null, ?\fixtures\patch\MyDataPatch $optStructVal = null, ?\fixtures\patch\MyStructFieldN25Patch $optEnumVal = null, ?\thrift\op\BinaryPatch $optBinaryVal = null, ?\thrift\op\StringPatch $optStringVal = null, ?\thrift\op\DoublePatch $optDoubleVal = null, ?\thrift\op\FloatPatch $optFloatVal = null, ?\thrift\op\I64Patch $optI64Val = null, ?\thrift\op\I32Patch $optI32Val = null, ?\thrift\op\I16Patch $optI16Val = null, ?\thrift\op\BytePatch $optByteVal = null, ?\thrift\op\BoolPatch $optBoolVal = null, ?\thrift\op\TimePatch $timeVal = null, ?\thrift\op\DurationPatch $durationVal = null, ?\fixtures\patch\LateDefStructPatch $lateStructVal = null, ?\fixtures\patch\MyUnionPatch $unionVal = null, ?\fixtures\patch\MyDataPatch $structVal = null, ?\fixtures\patch\MyStructFieldN10Patch $enumVal = null, ?\thrift\op\BinaryPatch $binaryVal = null, ?\thrift\op\StringPatch $stringVal = null, ?\thrift\op\DoublePatch $doubleVal = null, ?\thrift\op\FloatPatch $floatVal = null, ?\thrift\op\I64Patch $i64Val = null, ?\thrift\op\I32Patch $i32Val = null, ?\thrift\op\I16Patch $i16Val = null, ?\thrift\op\BytePatch $byteVal = null, ?\thrift\op\BoolPatch $boolVal = null)[] { + $this->optMapVal = $optMapVal; + $this->optSetVal = $optSetVal; + $this->optListVal = $optListVal; + $this->optLateStructVal = $optLateStructVal; + $this->optStructVal = $optStructVal; + $this->optEnumVal = $optEnumVal; + $this->optBinaryVal = $optBinaryVal; + $this->optStringVal = $optStringVal; + $this->optDoubleVal = $optDoubleVal; + $this->optFloatVal = $optFloatVal; + $this->optI64Val = $optI64Val; + $this->optI32Val = $optI32Val; + $this->optI16Val = $optI16Val; + $this->optByteVal = $optByteVal; + $this->optBoolVal = $optBoolVal; + $this->timeVal = $timeVal; + $this->durationVal = $durationVal; + $this->lateStructVal = $lateStructVal; + $this->unionVal = $unionVal; + $this->structVal = $structVal; + $this->enumVal = $enumVal; + $this->binaryVal = $binaryVal; + $this->stringVal = $stringVal; + $this->doubleVal = $doubleVal; + $this->floatVal = $floatVal; + $this->i64Val = $i64Val; + $this->i32Val = $i32Val; + $this->i16Val = $i16Val; + $this->byteVal = $byteVal; + $this->boolVal = $boolVal; } public static function withDefaultValues()[]: this { @@ -5911,15 +5288,41 @@ class MyStructFieldN29Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( - Shapes::idx($shape, 'assign'), - Shapes::idx($shape, 'clear'), - Shapes::idx($shape, 'remove'), - Shapes::idx($shape, 'add'), + Shapes::idx($shape, 'optMapVal'), + Shapes::idx($shape, 'optSetVal'), + Shapes::idx($shape, 'optListVal'), + Shapes::idx($shape, 'optLateStructVal'), + Shapes::idx($shape, 'optStructVal'), + Shapes::idx($shape, 'optEnumVal'), + Shapes::idx($shape, 'optBinaryVal'), + Shapes::idx($shape, 'optStringVal'), + Shapes::idx($shape, 'optDoubleVal'), + Shapes::idx($shape, 'optFloatVal'), + Shapes::idx($shape, 'optI64Val'), + Shapes::idx($shape, 'optI32Val'), + Shapes::idx($shape, 'optI16Val'), + Shapes::idx($shape, 'optByteVal'), + Shapes::idx($shape, 'optBoolVal'), + Shapes::idx($shape, 'timeVal'), + Shapes::idx($shape, 'durationVal'), + Shapes::idx($shape, 'lateStructVal'), + Shapes::idx($shape, 'unionVal'), + Shapes::idx($shape, 'structVal'), + Shapes::idx($shape, 'enumVal'), + Shapes::idx($shape, 'binaryVal'), + Shapes::idx($shape, 'stringVal'), + Shapes::idx($shape, 'doubleVal'), + Shapes::idx($shape, 'floatVal'), + Shapes::idx($shape, 'i64Val'), + Shapes::idx($shape, 'i32Val'), + Shapes::idx($shape, 'i16Val'), + Shapes::idx($shape, 'byteVal'), + Shapes::idx($shape, 'boolVal'), ); } public function getName()[]: string { - return 'MyStructFieldN29Patch'; + return 'MyStructFieldPatch'; } public function clearTerseFields()[write_props]: void { @@ -5928,423 +5331,474 @@ class MyStructFieldN29Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt public static function getStructMetadata()[]: \tmeta_ThriftStruct { return \tmeta_ThriftStruct::fromShape( shape( - "name" => "module.MyStructFieldN29Patch", + "name" => "module.MyStructFieldPatch", "fields" => vec[ \tmeta_ThriftField::fromShape( shape( - "id" => 1, + "id" => -30, "type" => \tmeta_ThriftType::fromShape( shape( - "t_set" => \tmeta_ThriftSetType::fromShape( + "t_struct" => \tmeta_ThriftStructType::fromShape( shape( - "valueType" => \tmeta_ThriftType::fromShape( - shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), + "name" => "module.MyStructFieldN30Patch", ) ), ) ), - "name" => "assign", - "is_optional" => true, + "name" => "optMapVal", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => 2, + "id" => -29, "type" => \tmeta_ThriftType::fromShape( shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BOOL_TYPE, + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "module.MyStructFieldN29Patch", + ) + ), ) ), - "name" => "clear", + "name" => "optSetVal", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => 7, + "id" => -28, "type" => \tmeta_ThriftType::fromShape( shape( - "t_set" => \tmeta_ThriftSetType::fromShape( + "t_struct" => \tmeta_ThriftStructType::fromShape( shape( - "valueType" => \tmeta_ThriftType::fromShape( - shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), + "name" => "module.MyStructFieldN28Patch", ) ), ) ), - "name" => "remove", + "name" => "optListVal", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => 8, + "id" => -27, "type" => \tmeta_ThriftType::fromShape( shape( - "t_set" => \tmeta_ThriftSetType::fromShape( + "t_typedef" => \tmeta_ThriftTypedefType::fromShape( shape( - "valueType" => \tmeta_ThriftType::fromShape( + "name" => "module.LateDefStructPatch", + "underlyingType" => \tmeta_ThriftType::fromShape( shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "module.LateDefStructPatch", + ) + ), ) ), ) ), ) ), - "name" => "add", + "name" => "optLateStructVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -26, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "module.MyDataPatch", + ) + ), + ) + ), + "name" => "optStructVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -25, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "module.MyStructFieldN25Patch", + ) + ), + ) + ), + "name" => "optEnumVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -24, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.BinaryPatch", + ) + ), + ) + ), + "name" => "optBinaryVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -23, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.StringPatch", + ) + ), + ) + ), + "name" => "optStringVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -22, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.DoublePatch", + ) + ), + ) + ), + "name" => "optDoubleVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -21, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.FloatPatch", + ) + ), + ) + ), + "name" => "optFloatVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -20, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.I64Patch", + ) + ), + ) + ), + "name" => "optI64Val", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -19, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.I32Patch", + ) + ), + ) + ), + "name" => "optI32Val", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -18, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.I16Patch", + ) + ), + ) + ), + "name" => "optI16Val", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -17, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.BytePatch", + ) + ), + ) + ), + "name" => "optByteVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -16, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.BoolPatch", + ) + ), + ) + ), + "name" => "optBoolVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -15, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.TimePatch", + ) + ), + ) + ), + "name" => "timeVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -14, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.DurationPatch", + ) + ), + ) + ), + "name" => "durationVal", ) ), - ], - "is_union" => false, - ) - ); - } - - public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { - return shape( - 'struct' => dict[ - '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( - shape( - "name" => "::apache::thrift::op::detail::SetPatchAdapter", - "underlyingName" => "MyStructFieldN29PatchStruct", - "extraNamespace" => "", - ) - ), - ], - 'fields' => dict[ - ], - ); - } - - public static function __fromShape(self::TShape $shape)[]: this { - return new static( - Shapes::idx($shape, 'assign') === null ? null : (new Set(Keyset\keys($shape['assign']))), - $shape['clear'], - new Set(Keyset\keys($shape['remove'])), - new Set(Keyset\keys($shape['add'])), - ); - } - - public function __toShape()[]: self::TShape { - return shape( - 'assign' => $this->assign - |> $$ === null ? null : ThriftUtil::toDArray(Dict\fill_keys($$->toValuesArray(), true), static::class), - 'clear' => $this->clear, - 'remove' => ThriftUtil::toDArray(Dict\fill_keys($this->remove->toValuesArray(), true), static::class), - 'add' => ThriftUtil::toDArray(Dict\fill_keys($this->add->toValuesArray(), true), static::class), - ); - } - public function getInstanceKey()[write_props]: string { - return \TCompactSerializer::serialize($this); - } - - public function readFromJson(string $jsonText): void { - $parsed = json_decode($jsonText, true); - - if ($parsed === null || !($parsed is KeyedContainer<_, _>)) { - throw new \TProtocolException("Cannot parse the given json string."); - } - - if (idx($parsed, 'assign') !== null) { - $_json3 = HH\FIXME\UNSAFE_CAST>($parsed['assign']); - $_container4 = Set {}; - foreach($_json3 as $_key1 => $_value2) { - $_elem5 = ''; - $_elem5 = $_value2; - $_container4->add($_elem5); - } - $this->assign = $_container4; - } - if (idx($parsed, 'clear') !== null) { - $this->clear = HH\FIXME\UNSAFE_CAST($parsed['clear']); - } - if (idx($parsed, 'remove') !== null) { - $_json9 = HH\FIXME\UNSAFE_CAST>($parsed['remove']); - $_container10 = Set {}; - foreach($_json9 as $_key7 => $_value8) { - $_elem11 = ''; - $_elem11 = $_value8; - $_container10->add($_elem11); - } - $this->remove = $_container10; - } - if (idx($parsed, 'add') !== null) { - $_json15 = HH\FIXME\UNSAFE_CAST>($parsed['add']); - $_container16 = Set {}; - foreach($_json15 as $_key13 => $_value14) { - $_elem17 = ''; - $_elem17 = $_value14; - $_container16->add($_elem17); - } - $this->add = $_container16; - } - } - -} - -/** - * Original thrift struct:- - * MyStructFieldN30Patch - */ -<<\ThriftTypeInfo(shape('uri' => 'test.dev/fixtures/patch/MyStructFieldN30Patch'))>> -class MyStructFieldN30Patch implements \IThriftSyncStruct, \IThriftShapishSyncStruct { - use \ThriftSerializationTrait; - - const dict SPEC = dict[ - 1 => shape( - 'var' => 'assign', - 'type' => \TType::MAP, - 'ktype' => \TType::STRING, - 'vtype' => \TType::STRING, - 'key' => shape( - 'type' => \TType::STRING, - ), - 'val' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'collection', - ), - 2 => shape( - 'var' => 'clear', - 'type' => \TType::BOOL, - ), - 5 => shape( - 'var' => 'add', - 'type' => \TType::MAP, - 'ktype' => \TType::STRING, - 'vtype' => \TType::STRING, - 'key' => shape( - 'type' => \TType::STRING, - ), - 'val' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'collection', - ), - 7 => shape( - 'var' => 'remove', - 'type' => \TType::SET, - 'etype' => \TType::STRING, - 'elem' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'collection', - ), - 9 => shape( - 'var' => 'put', - 'type' => \TType::MAP, - 'ktype' => \TType::STRING, - 'vtype' => \TType::STRING, - 'key' => shape( - 'type' => \TType::STRING, - ), - 'val' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'collection', - ), - ]; - const dict FIELDMAP = dict[ - 'assign' => 1, - 'clear' => 2, - 'add' => 5, - 'remove' => 7, - 'put' => 9, - ]; - - const type TConstructorShape = shape( - ?'assign' => ?Map, - ?'clear' => ?bool, - ?'add' => ?Map, - ?'remove' => ?Set, - ?'put' => ?Map, - ); - - const type TShape = shape( - ?'assign' => ?dict, - 'clear' => bool, - 'add' => dict, - 'remove' => dict, - 'put' => dict, - ... - ); - const int STRUCTURAL_ID = 7865087528989146577; - /** - * Assigns a value. If set, all other operations are ignored. - * - * Original thrift field:- - * 1: map assign - */ - public ?Map $assign; - /** - * Clears a value. Applies first. - * - * Original thrift field:- - * 2: bool clear - */ - public bool $clear; - /** - * Add the given values, if the keys are not already present. Applies forth. - * - * Original thrift field:- - * 5: map add - */ - public Map $add; - /** - * Removes entries, if present. Applies third. - * - * Original thrift field:- - * 7: set remove - */ - public Set $remove; - /** - * Adds or replaces the given key/value pairs. Applies fifth. - * - * Original thrift field:- - * 9: map put - */ - public Map $put; - - public function __construct(?Map $assign = null, ?bool $clear = null, ?Map $add = null, ?Set $remove = null, ?Map $put = null)[] { - $this->assign = $assign; - $this->clear = $clear ?? false; - $this->add = $add ?? Map {}; - $this->remove = $remove ?? Set {}; - $this->put = $put ?? Map {}; - } - - public static function withDefaultValues()[]: this { - return new static(); - } - - public static function fromShape(self::TConstructorShape $shape)[]: this { - return new static( - Shapes::idx($shape, 'assign'), - Shapes::idx($shape, 'clear'), - Shapes::idx($shape, 'add'), - Shapes::idx($shape, 'remove'), - Shapes::idx($shape, 'put'), - ); - } - - public function getName()[]: string { - return 'MyStructFieldN30Patch'; - } - - public function clearTerseFields()[write_props]: void { - } - - public static function getStructMetadata()[]: \tmeta_ThriftStruct { - return \tmeta_ThriftStruct::fromShape( - shape( - "name" => "module.MyStructFieldN30Patch", - "fields" => vec[ \tmeta_ThriftField::fromShape( shape( - "id" => 1, + "id" => -13, "type" => \tmeta_ThriftType::fromShape( shape( - "t_map" => \tmeta_ThriftMapType::fromShape( + "t_typedef" => \tmeta_ThriftTypedefType::fromShape( shape( - "keyType" => \tmeta_ThriftType::fromShape( - shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), - "valueType" => \tmeta_ThriftType::fromShape( + "name" => "module.LateDefStructPatch", + "underlyingType" => \tmeta_ThriftType::fromShape( shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "module.LateDefStructPatch", + ) + ), ) ), ) ), ) ), - "name" => "assign", - "is_optional" => true, + "name" => "lateStructVal", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => 2, + "id" => -12, "type" => \tmeta_ThriftType::fromShape( shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BOOL_TYPE, + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "module.MyUnionPatch", + ) + ), ) ), - "name" => "clear", + "name" => "unionVal", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => 5, + "id" => -11, "type" => \tmeta_ThriftType::fromShape( shape( - "t_map" => \tmeta_ThriftMapType::fromShape( + "t_struct" => \tmeta_ThriftStructType::fromShape( shape( - "keyType" => \tmeta_ThriftType::fromShape( - shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), - "valueType" => \tmeta_ThriftType::fromShape( - shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), + "name" => "module.MyDataPatch", ) ), ) ), - "name" => "add", + "name" => "structVal", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => 7, + "id" => -10, "type" => \tmeta_ThriftType::fromShape( shape( - "t_set" => \tmeta_ThriftSetType::fromShape( + "t_struct" => \tmeta_ThriftStructType::fromShape( shape( - "valueType" => \tmeta_ThriftType::fromShape( - shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), + "name" => "module.MyStructFieldN10Patch", ) ), ) ), - "name" => "remove", + "name" => "enumVal", ) ), \tmeta_ThriftField::fromShape( shape( - "id" => 9, + "id" => -9, "type" => \tmeta_ThriftType::fromShape( shape( - "t_map" => \tmeta_ThriftMapType::fromShape( + "t_struct" => \tmeta_ThriftStructType::fromShape( shape( - "keyType" => \tmeta_ThriftType::fromShape( - shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), - "valueType" => \tmeta_ThriftType::fromShape( - shape( - "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), + "name" => "patch.BinaryPatch", ) ), ) ), - "name" => "put", + "name" => "binaryVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -8, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.StringPatch", + ) + ), + ) + ), + "name" => "stringVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -7, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.DoublePatch", + ) + ), + ) + ), + "name" => "doubleVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -6, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.FloatPatch", + ) + ), + ) + ), + "name" => "floatVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -5, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.I64Patch", + ) + ), + ) + ), + "name" => "i64Val", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -4, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.I32Patch", + ) + ), + ) + ), + "name" => "i32Val", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -3, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.I16Patch", + ) + ), + ) + ), + "name" => "i16Val", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -2, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.BytePatch", + ) + ), + ) + ), + "name" => "byteVal", + ) + ), + \tmeta_ThriftField::fromShape( + shape( + "id" => -1, + "type" => \tmeta_ThriftType::fromShape( + shape( + "t_struct" => \tmeta_ThriftStructType::fromShape( + shape( + "name" => "patch.BoolPatch", + ) + ), + ) + ), + "name" => "boolVal", ) ), ], @@ -6358,35 +5812,444 @@ class MyStructFieldN30Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt 'struct' => dict[ '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( shape( - "name" => "::apache::thrift::op::detail::MapPatchAdapter", - "underlyingName" => "MyStructFieldN30PatchStruct", + "name" => "::apache::thrift::op::detail::FieldPatchAdapter", + "underlyingName" => "MyStructFieldPatchStruct", "extraNamespace" => "", ) ), - ], - 'fields' => dict[ + ], + 'fields' => dict[ + 'optMapVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::MapPatchAdapter", + "underlyingName" => "MyStructFieldN30PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optSetVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::SetPatchAdapter", + "underlyingName" => "MyStructFieldN29PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optListVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::ListPatchAdapter", + "underlyingName" => "MyStructFieldN28PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optLateStructVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::StructPatchAdapter", + "underlyingName" => "LateDefStructPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optStructVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::StructPatchAdapter", + "underlyingName" => "MyDataPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optEnumVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::AssignPatchAdapter", + "underlyingName" => "MyStructFieldN25PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optBinaryVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::BinaryPatchAdapter", + "underlyingName" => "BinaryPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optStringVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::StringPatchAdapter", + "underlyingName" => "StringPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optDoubleVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "DoublePatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optFloatVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "FloatPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optI64Val' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "I64PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optI32Val' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "I32PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optI16Val' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "I16PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optByteVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "BytePatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'optBoolVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::BoolPatchAdapter", + "underlyingName" => "BoolPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'timeVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::AssignPatchAdapter", + "underlyingName" => "TimeStructPatch", + "extraNamespace" => "", + ) + ), + ], + ), + 'durationVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::AssignPatchAdapter", + "underlyingName" => "DurationStructPatch", + "extraNamespace" => "", + ) + ), + ], + ), + 'lateStructVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::StructPatchAdapter", + "underlyingName" => "LateDefStructPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'unionVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::UnionPatchAdapter", + "underlyingName" => "MyUnionPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'structVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::StructPatchAdapter", + "underlyingName" => "MyDataPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'enumVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::AssignPatchAdapter", + "underlyingName" => "MyStructFieldN10PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'binaryVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::BinaryPatchAdapter", + "underlyingName" => "BinaryPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'stringVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::StringPatchAdapter", + "underlyingName" => "StringPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'doubleVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "DoublePatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'floatVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "FloatPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'i64Val' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "I64PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'i32Val' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "I32PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'i16Val' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "I16PatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'byteVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::NumberPatchAdapter", + "underlyingName" => "BytePatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), + 'boolVal' => shape( + 'field' => dict[], + 'type' => dict[ + '\thrift\annotation\cpp\Adapter' => \thrift\annotation\cpp\Adapter::fromShape( + shape( + "name" => "::apache::thrift::op::detail::BoolPatchAdapter", + "underlyingName" => "BoolPatchStruct", + "extraNamespace" => "", + ) + ), + ], + ), ], ); } public static function __fromShape(self::TShape $shape)[]: this { return new static( - Shapes::idx($shape, 'assign') === null ? null : ((new Map($shape['assign']))), - $shape['clear'], - (new Map($shape['add'])), - new Set(Keyset\keys($shape['remove'])), - (new Map($shape['put'])), + Shapes::idx($shape, 'optMapVal') === null ? null : (\fixtures\patch\MyStructFieldN30Patch::__fromShape($shape['optMapVal'])), + Shapes::idx($shape, 'optSetVal') === null ? null : (\fixtures\patch\MyStructFieldN29Patch::__fromShape($shape['optSetVal'])), + Shapes::idx($shape, 'optListVal') === null ? null : (\fixtures\patch\MyStructFieldN28Patch::__fromShape($shape['optListVal'])), + Shapes::idx($shape, 'optLateStructVal') === null ? null : (\fixtures\patch\LateDefStructPatch::__fromShape($shape['optLateStructVal'])), + Shapes::idx($shape, 'optStructVal') === null ? null : (\fixtures\patch\MyDataPatch::__fromShape($shape['optStructVal'])), + Shapes::idx($shape, 'optEnumVal') === null ? null : (\fixtures\patch\MyStructFieldN25Patch::__fromShape($shape['optEnumVal'])), + Shapes::idx($shape, 'optBinaryVal') === null ? null : (\thrift\op\BinaryPatch::__fromShape($shape['optBinaryVal'])), + Shapes::idx($shape, 'optStringVal') === null ? null : (\thrift\op\StringPatch::__fromShape($shape['optStringVal'])), + Shapes::idx($shape, 'optDoubleVal') === null ? null : (\thrift\op\DoublePatch::__fromShape($shape['optDoubleVal'])), + Shapes::idx($shape, 'optFloatVal') === null ? null : (\thrift\op\FloatPatch::__fromShape($shape['optFloatVal'])), + Shapes::idx($shape, 'optI64Val') === null ? null : (\thrift\op\I64Patch::__fromShape($shape['optI64Val'])), + Shapes::idx($shape, 'optI32Val') === null ? null : (\thrift\op\I32Patch::__fromShape($shape['optI32Val'])), + Shapes::idx($shape, 'optI16Val') === null ? null : (\thrift\op\I16Patch::__fromShape($shape['optI16Val'])), + Shapes::idx($shape, 'optByteVal') === null ? null : (\thrift\op\BytePatch::__fromShape($shape['optByteVal'])), + Shapes::idx($shape, 'optBoolVal') === null ? null : (\thrift\op\BoolPatch::__fromShape($shape['optBoolVal'])), + Shapes::idx($shape, 'timeVal') === null ? null : (\thrift\op\TimePatch::__fromShape($shape['timeVal'])), + Shapes::idx($shape, 'durationVal') === null ? null : (\thrift\op\DurationPatch::__fromShape($shape['durationVal'])), + Shapes::idx($shape, 'lateStructVal') === null ? null : (\fixtures\patch\LateDefStructPatch::__fromShape($shape['lateStructVal'])), + Shapes::idx($shape, 'unionVal') === null ? null : (\fixtures\patch\MyUnionPatch::__fromShape($shape['unionVal'])), + Shapes::idx($shape, 'structVal') === null ? null : (\fixtures\patch\MyDataPatch::__fromShape($shape['structVal'])), + Shapes::idx($shape, 'enumVal') === null ? null : (\fixtures\patch\MyStructFieldN10Patch::__fromShape($shape['enumVal'])), + Shapes::idx($shape, 'binaryVal') === null ? null : (\thrift\op\BinaryPatch::__fromShape($shape['binaryVal'])), + Shapes::idx($shape, 'stringVal') === null ? null : (\thrift\op\StringPatch::__fromShape($shape['stringVal'])), + Shapes::idx($shape, 'doubleVal') === null ? null : (\thrift\op\DoublePatch::__fromShape($shape['doubleVal'])), + Shapes::idx($shape, 'floatVal') === null ? null : (\thrift\op\FloatPatch::__fromShape($shape['floatVal'])), + Shapes::idx($shape, 'i64Val') === null ? null : (\thrift\op\I64Patch::__fromShape($shape['i64Val'])), + Shapes::idx($shape, 'i32Val') === null ? null : (\thrift\op\I32Patch::__fromShape($shape['i32Val'])), + Shapes::idx($shape, 'i16Val') === null ? null : (\thrift\op\I16Patch::__fromShape($shape['i16Val'])), + Shapes::idx($shape, 'byteVal') === null ? null : (\thrift\op\BytePatch::__fromShape($shape['byteVal'])), + Shapes::idx($shape, 'boolVal') === null ? null : (\thrift\op\BoolPatch::__fromShape($shape['boolVal'])), ); } public function __toShape()[]: self::TShape { return shape( - 'assign' => $this->assign - |> $$ === null ? null : dict($$), - 'clear' => $this->clear, - 'add' => dict($this->add), - 'remove' => ThriftUtil::toDArray(Dict\fill_keys($this->remove->toValuesArray(), true), static::class), - 'put' => dict($this->put), + 'optMapVal' => $this->optMapVal?->__toShape(), + 'optSetVal' => $this->optSetVal?->__toShape(), + 'optListVal' => $this->optListVal?->__toShape(), + 'optLateStructVal' => $this->optLateStructVal?->__toShape(), + 'optStructVal' => $this->optStructVal?->__toShape(), + 'optEnumVal' => $this->optEnumVal?->__toShape(), + 'optBinaryVal' => $this->optBinaryVal?->__toShape(), + 'optStringVal' => $this->optStringVal?->__toShape(), + 'optDoubleVal' => $this->optDoubleVal?->__toShape(), + 'optFloatVal' => $this->optFloatVal?->__toShape(), + 'optI64Val' => $this->optI64Val?->__toShape(), + 'optI32Val' => $this->optI32Val?->__toShape(), + 'optI16Val' => $this->optI16Val?->__toShape(), + 'optByteVal' => $this->optByteVal?->__toShape(), + 'optBoolVal' => $this->optBoolVal?->__toShape(), + 'timeVal' => $this->timeVal?->__toShape(), + 'durationVal' => $this->durationVal?->__toShape(), + 'lateStructVal' => $this->lateStructVal?->__toShape(), + 'unionVal' => $this->unionVal?->__toShape(), + 'structVal' => $this->structVal?->__toShape(), + 'enumVal' => $this->enumVal?->__toShape(), + 'binaryVal' => $this->binaryVal?->__toShape(), + 'stringVal' => $this->stringVal?->__toShape(), + 'doubleVal' => $this->doubleVal?->__toShape(), + 'floatVal' => $this->floatVal?->__toShape(), + 'i64Val' => $this->i64Val?->__toShape(), + 'i32Val' => $this->i32Val?->__toShape(), + 'i16Val' => $this->i16Val?->__toShape(), + 'byteVal' => $this->byteVal?->__toShape(), + 'boolVal' => $this->boolVal?->__toShape(), ); } public function getInstanceKey()[write_props]: string { @@ -6400,48 +6263,185 @@ class MyStructFieldN30Patch implements \IThriftSyncStruct, \IThriftShapishSyncSt throw new \TProtocolException("Cannot parse the given json string."); } - if (idx($parsed, 'assign') !== null) { - $_json3 = HH\FIXME\UNSAFE_CAST>($parsed['assign']); - $_container4 = Map {}; - foreach($_json3 as $_key1 => $_value2) { - $_value5 = ''; - $_value5 = $_value2; - $_container4[$_key1] = $_value5; - } - $this->assign = $_container4; + if (idx($parsed, 'optMapVal') !== null) { + $_tmp0 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optMapVal'])); + $_tmp1 = \fixtures\patch\MyStructFieldN30Patch::withDefaultValues(); + $_tmp1->readFromJson($_tmp0); + $this->optMapVal = $_tmp1; } - if (idx($parsed, 'clear') !== null) { - $this->clear = HH\FIXME\UNSAFE_CAST($parsed['clear']); + if (idx($parsed, 'optSetVal') !== null) { + $_tmp2 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optSetVal'])); + $_tmp3 = \fixtures\patch\MyStructFieldN29Patch::withDefaultValues(); + $_tmp3->readFromJson($_tmp2); + $this->optSetVal = $_tmp3; } - if (idx($parsed, 'add') !== null) { - $_json9 = HH\FIXME\UNSAFE_CAST>($parsed['add']); - $_container10 = Map {}; - foreach($_json9 as $_key7 => $_value8) { - $_value11 = ''; - $_value11 = $_value8; - $_container10[$_key7] = $_value11; - } - $this->add = $_container10; + if (idx($parsed, 'optListVal') !== null) { + $_tmp4 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optListVal'])); + $_tmp5 = \fixtures\patch\MyStructFieldN28Patch::withDefaultValues(); + $_tmp5->readFromJson($_tmp4); + $this->optListVal = $_tmp5; } - if (idx($parsed, 'remove') !== null) { - $_json15 = HH\FIXME\UNSAFE_CAST>($parsed['remove']); - $_container16 = Set {}; - foreach($_json15 as $_key13 => $_value14) { - $_elem17 = ''; - $_elem17 = $_value14; - $_container16->add($_elem17); - } - $this->remove = $_container16; + if (idx($parsed, 'optLateStructVal') !== null) { + $_tmp6 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optLateStructVal'])); + $_tmp7 = \fixtures\patch\LateDefStructPatch::withDefaultValues(); + $_tmp7->readFromJson($_tmp6); + $this->optLateStructVal = $_tmp7; } - if (idx($parsed, 'put') !== null) { - $_json21 = HH\FIXME\UNSAFE_CAST>($parsed['put']); - $_container22 = Map {}; - foreach($_json21 as $_key19 => $_value20) { - $_value23 = ''; - $_value23 = $_value20; - $_container22[$_key19] = $_value23; - } - $this->put = $_container22; + if (idx($parsed, 'optStructVal') !== null) { + $_tmp8 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optStructVal'])); + $_tmp9 = \fixtures\patch\MyDataPatch::withDefaultValues(); + $_tmp9->readFromJson($_tmp8); + $this->optStructVal = $_tmp9; + } + if (idx($parsed, 'optEnumVal') !== null) { + $_tmp10 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optEnumVal'])); + $_tmp11 = \fixtures\patch\MyStructFieldN25Patch::withDefaultValues(); + $_tmp11->readFromJson($_tmp10); + $this->optEnumVal = $_tmp11; + } + if (idx($parsed, 'optBinaryVal') !== null) { + $_tmp12 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optBinaryVal'])); + $_tmp13 = \thrift\op\BinaryPatch::withDefaultValues(); + $_tmp13->readFromJson($_tmp12); + $this->optBinaryVal = $_tmp13; + } + if (idx($parsed, 'optStringVal') !== null) { + $_tmp14 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optStringVal'])); + $_tmp15 = \thrift\op\StringPatch::withDefaultValues(); + $_tmp15->readFromJson($_tmp14); + $this->optStringVal = $_tmp15; + } + if (idx($parsed, 'optDoubleVal') !== null) { + $_tmp16 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optDoubleVal'])); + $_tmp17 = \thrift\op\DoublePatch::withDefaultValues(); + $_tmp17->readFromJson($_tmp16); + $this->optDoubleVal = $_tmp17; + } + if (idx($parsed, 'optFloatVal') !== null) { + $_tmp18 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optFloatVal'])); + $_tmp19 = \thrift\op\FloatPatch::withDefaultValues(); + $_tmp19->readFromJson($_tmp18); + $this->optFloatVal = $_tmp19; + } + if (idx($parsed, 'optI64Val') !== null) { + $_tmp20 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optI64Val'])); + $_tmp21 = \thrift\op\I64Patch::withDefaultValues(); + $_tmp21->readFromJson($_tmp20); + $this->optI64Val = $_tmp21; + } + if (idx($parsed, 'optI32Val') !== null) { + $_tmp22 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optI32Val'])); + $_tmp23 = \thrift\op\I32Patch::withDefaultValues(); + $_tmp23->readFromJson($_tmp22); + $this->optI32Val = $_tmp23; + } + if (idx($parsed, 'optI16Val') !== null) { + $_tmp24 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optI16Val'])); + $_tmp25 = \thrift\op\I16Patch::withDefaultValues(); + $_tmp25->readFromJson($_tmp24); + $this->optI16Val = $_tmp25; + } + if (idx($parsed, 'optByteVal') !== null) { + $_tmp26 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optByteVal'])); + $_tmp27 = \thrift\op\BytePatch::withDefaultValues(); + $_tmp27->readFromJson($_tmp26); + $this->optByteVal = $_tmp27; + } + if (idx($parsed, 'optBoolVal') !== null) { + $_tmp28 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['optBoolVal'])); + $_tmp29 = \thrift\op\BoolPatch::withDefaultValues(); + $_tmp29->readFromJson($_tmp28); + $this->optBoolVal = $_tmp29; + } + if (idx($parsed, 'timeVal') !== null) { + $_tmp30 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['timeVal'])); + $_tmp31 = \thrift\op\TimePatch::withDefaultValues(); + $_tmp31->readFromJson($_tmp30); + $this->timeVal = $_tmp31; + } + if (idx($parsed, 'durationVal') !== null) { + $_tmp32 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['durationVal'])); + $_tmp33 = \thrift\op\DurationPatch::withDefaultValues(); + $_tmp33->readFromJson($_tmp32); + $this->durationVal = $_tmp33; + } + if (idx($parsed, 'lateStructVal') !== null) { + $_tmp34 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['lateStructVal'])); + $_tmp35 = \fixtures\patch\LateDefStructPatch::withDefaultValues(); + $_tmp35->readFromJson($_tmp34); + $this->lateStructVal = $_tmp35; + } + if (idx($parsed, 'unionVal') !== null) { + $_tmp36 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['unionVal'])); + $_tmp37 = \fixtures\patch\MyUnionPatch::withDefaultValues(); + $_tmp37->readFromJson($_tmp36); + $this->unionVal = $_tmp37; + } + if (idx($parsed, 'structVal') !== null) { + $_tmp38 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['structVal'])); + $_tmp39 = \fixtures\patch\MyDataPatch::withDefaultValues(); + $_tmp39->readFromJson($_tmp38); + $this->structVal = $_tmp39; + } + if (idx($parsed, 'enumVal') !== null) { + $_tmp40 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['enumVal'])); + $_tmp41 = \fixtures\patch\MyStructFieldN10Patch::withDefaultValues(); + $_tmp41->readFromJson($_tmp40); + $this->enumVal = $_tmp41; + } + if (idx($parsed, 'binaryVal') !== null) { + $_tmp42 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['binaryVal'])); + $_tmp43 = \thrift\op\BinaryPatch::withDefaultValues(); + $_tmp43->readFromJson($_tmp42); + $this->binaryVal = $_tmp43; + } + if (idx($parsed, 'stringVal') !== null) { + $_tmp44 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['stringVal'])); + $_tmp45 = \thrift\op\StringPatch::withDefaultValues(); + $_tmp45->readFromJson($_tmp44); + $this->stringVal = $_tmp45; + } + if (idx($parsed, 'doubleVal') !== null) { + $_tmp46 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['doubleVal'])); + $_tmp47 = \thrift\op\DoublePatch::withDefaultValues(); + $_tmp47->readFromJson($_tmp46); + $this->doubleVal = $_tmp47; + } + if (idx($parsed, 'floatVal') !== null) { + $_tmp48 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['floatVal'])); + $_tmp49 = \thrift\op\FloatPatch::withDefaultValues(); + $_tmp49->readFromJson($_tmp48); + $this->floatVal = $_tmp49; + } + if (idx($parsed, 'i64Val') !== null) { + $_tmp50 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['i64Val'])); + $_tmp51 = \thrift\op\I64Patch::withDefaultValues(); + $_tmp51->readFromJson($_tmp50); + $this->i64Val = $_tmp51; + } + if (idx($parsed, 'i32Val') !== null) { + $_tmp52 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['i32Val'])); + $_tmp53 = \thrift\op\I32Patch::withDefaultValues(); + $_tmp53->readFromJson($_tmp52); + $this->i32Val = $_tmp53; + } + if (idx($parsed, 'i16Val') !== null) { + $_tmp54 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['i16Val'])); + $_tmp55 = \thrift\op\I16Patch::withDefaultValues(); + $_tmp55->readFromJson($_tmp54); + $this->i16Val = $_tmp55; + } + if (idx($parsed, 'byteVal') !== null) { + $_tmp56 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['byteVal'])); + $_tmp57 = \thrift\op\BytePatch::withDefaultValues(); + $_tmp57->readFromJson($_tmp56); + $this->byteVal = $_tmp57; + } + if (idx($parsed, 'boolVal') !== null) { + $_tmp58 = \json_encode(HH\FIXME\UNSAFE_CAST($parsed['boolVal'])); + $_tmp59 = \thrift\op\BoolPatch::withDefaultValues(); + $_tmp59->readFromJson($_tmp58); + $this->boolVal = $_tmp59; } } diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/MyStructFieldPatch.java b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/MyStructFieldPatch.java index fd4493fb14d..27c6a8d3390 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/MyStructFieldPatch.java +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/MyStructFieldPatch.java @@ -25,255 +25,247 @@ public final class MyStructFieldPatch implements com.facebook.thrift.payload.Thr @ThriftConstructor public MyStructFieldPatch( - @com.facebook.swift.codec.ThriftField(value=-1, name="boolVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BoolPatch boolVal, - @com.facebook.swift.codec.ThriftField(value=-2, name="byteVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BytePatch byteVal, - @com.facebook.swift.codec.ThriftField(value=-3, name="i16Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I16Patch i16Val, - @com.facebook.swift.codec.ThriftField(value=-4, name="i32Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I32Patch i32Val, - @com.facebook.swift.codec.ThriftField(value=-5, name="i64Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I64Patch i64Val, - @com.facebook.swift.codec.ThriftField(value=-6, name="floatVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.FloatPatch floatVal, - @com.facebook.swift.codec.ThriftField(value=-7, name="doubleVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.DoublePatch doubleVal, - @com.facebook.swift.codec.ThriftField(value=-8, name="stringVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.StringPatch stringVal, - @com.facebook.swift.codec.ThriftField(value=-9, name="binaryVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BinaryPatch binaryVal, - @com.facebook.swift.codec.ThriftField(value=-10, name="enumVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyStructFieldN10Patch enumVal, - @com.facebook.swift.codec.ThriftField(value=-11, name="structVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyDataPatch structVal, - @com.facebook.swift.codec.ThriftField(value=-12, name="unionVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyUnionPatch unionVal, - @com.facebook.swift.codec.ThriftField(value=-13, name="lateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.LateDefStructPatch lateStructVal, - @com.facebook.swift.codec.ThriftField(value=-14, name="durationVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.DurationPatch durationVal, - @com.facebook.swift.codec.ThriftField(value=-15, name="timeVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.TimePatch timeVal, - @com.facebook.swift.codec.ThriftField(value=-16, name="optBoolVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BoolPatch optBoolVal, - @com.facebook.swift.codec.ThriftField(value=-17, name="optByteVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BytePatch optByteVal, - @com.facebook.swift.codec.ThriftField(value=-18, name="optI16Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I16Patch optI16Val, - @com.facebook.swift.codec.ThriftField(value=-19, name="optI32Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I32Patch optI32Val, - @com.facebook.swift.codec.ThriftField(value=-20, name="optI64Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I64Patch optI64Val, - @com.facebook.swift.codec.ThriftField(value=-21, name="optFloatVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.FloatPatch optFloatVal, - @com.facebook.swift.codec.ThriftField(value=-22, name="optDoubleVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.DoublePatch optDoubleVal, - @com.facebook.swift.codec.ThriftField(value=-23, name="optStringVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.StringPatch optStringVal, - @com.facebook.swift.codec.ThriftField(value=-24, name="optBinaryVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BinaryPatch optBinaryVal, - @com.facebook.swift.codec.ThriftField(value=-25, name="optEnumVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyStructFieldN25Patch optEnumVal, - @com.facebook.swift.codec.ThriftField(value=-26, name="optStructVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyDataPatch optStructVal, - @com.facebook.swift.codec.ThriftField(value=-27, name="optLateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.LateDefStructPatch optLateStructVal, - @com.facebook.swift.codec.ThriftField(value=-28, name="optListVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyStructFieldN28Patch optListVal, + @com.facebook.swift.codec.ThriftField(value=-30, name="optMapVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyStructFieldN30Patch optMapVal, @com.facebook.swift.codec.ThriftField(value=-29, name="optSetVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyStructFieldN29Patch optSetVal, - @com.facebook.swift.codec.ThriftField(value=-30, name="optMapVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyStructFieldN30Patch optMapVal + @com.facebook.swift.codec.ThriftField(value=-28, name="optListVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyStructFieldN28Patch optListVal, + @com.facebook.swift.codec.ThriftField(value=-27, name="optLateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.LateDefStructPatch optLateStructVal, + @com.facebook.swift.codec.ThriftField(value=-26, name="optStructVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyDataPatch optStructVal, + @com.facebook.swift.codec.ThriftField(value=-25, name="optEnumVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyStructFieldN25Patch optEnumVal, + @com.facebook.swift.codec.ThriftField(value=-24, name="optBinaryVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BinaryPatch optBinaryVal, + @com.facebook.swift.codec.ThriftField(value=-23, name="optStringVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.StringPatch optStringVal, + @com.facebook.swift.codec.ThriftField(value=-22, name="optDoubleVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.DoublePatch optDoubleVal, + @com.facebook.swift.codec.ThriftField(value=-21, name="optFloatVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.FloatPatch optFloatVal, + @com.facebook.swift.codec.ThriftField(value=-20, name="optI64Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I64Patch optI64Val, + @com.facebook.swift.codec.ThriftField(value=-19, name="optI32Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I32Patch optI32Val, + @com.facebook.swift.codec.ThriftField(value=-18, name="optI16Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I16Patch optI16Val, + @com.facebook.swift.codec.ThriftField(value=-17, name="optByteVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BytePatch optByteVal, + @com.facebook.swift.codec.ThriftField(value=-16, name="optBoolVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BoolPatch optBoolVal, + @com.facebook.swift.codec.ThriftField(value=-15, name="timeVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.TimePatch timeVal, + @com.facebook.swift.codec.ThriftField(value=-14, name="durationVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.DurationPatch durationVal, + @com.facebook.swift.codec.ThriftField(value=-13, name="lateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.LateDefStructPatch lateStructVal, + @com.facebook.swift.codec.ThriftField(value=-12, name="unionVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyUnionPatch unionVal, + @com.facebook.swift.codec.ThriftField(value=-11, name="structVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyDataPatch structVal, + @com.facebook.swift.codec.ThriftField(value=-10, name="enumVal", isLegacyId=true, requiredness=Requiredness.NONE) final test.fixtures.patch.MyStructFieldN10Patch enumVal, + @com.facebook.swift.codec.ThriftField(value=-9, name="binaryVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BinaryPatch binaryVal, + @com.facebook.swift.codec.ThriftField(value=-8, name="stringVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.StringPatch stringVal, + @com.facebook.swift.codec.ThriftField(value=-7, name="doubleVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.DoublePatch doubleVal, + @com.facebook.swift.codec.ThriftField(value=-6, name="floatVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.FloatPatch floatVal, + @com.facebook.swift.codec.ThriftField(value=-5, name="i64Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I64Patch i64Val, + @com.facebook.swift.codec.ThriftField(value=-4, name="i32Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I32Patch i32Val, + @com.facebook.swift.codec.ThriftField(value=-3, name="i16Val", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.I16Patch i16Val, + @com.facebook.swift.codec.ThriftField(value=-2, name="byteVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BytePatch byteVal, + @com.facebook.swift.codec.ThriftField(value=-1, name="boolVal", isLegacyId=true, requiredness=Requiredness.NONE) final com.facebook.thrift.op.BoolPatch boolVal ) { - this.boolVal = boolVal; - this.byteVal = byteVal; - this.i16Val = i16Val; - this.i32Val = i32Val; - this.i64Val = i64Val; - this.floatVal = floatVal; - this.doubleVal = doubleVal; - this.stringVal = stringVal; - this.binaryVal = binaryVal; - this.enumVal = enumVal; - this.structVal = structVal; - this.unionVal = unionVal; - this.lateStructVal = lateStructVal; - this.durationVal = durationVal; - this.timeVal = timeVal; - this.optBoolVal = optBoolVal; - this.optByteVal = optByteVal; - this.optI16Val = optI16Val; - this.optI32Val = optI32Val; - this.optI64Val = optI64Val; - this.optFloatVal = optFloatVal; - this.optDoubleVal = optDoubleVal; - this.optStringVal = optStringVal; - this.optBinaryVal = optBinaryVal; - this.optEnumVal = optEnumVal; - this.optStructVal = optStructVal; - this.optLateStructVal = optLateStructVal; - this.optListVal = optListVal; - this.optSetVal = optSetVal; this.optMapVal = optMapVal; + this.optSetVal = optSetVal; + this.optListVal = optListVal; + this.optLateStructVal = optLateStructVal; + this.optStructVal = optStructVal; + this.optEnumVal = optEnumVal; + this.optBinaryVal = optBinaryVal; + this.optStringVal = optStringVal; + this.optDoubleVal = optDoubleVal; + this.optFloatVal = optFloatVal; + this.optI64Val = optI64Val; + this.optI32Val = optI32Val; + this.optI16Val = optI16Val; + this.optByteVal = optByteVal; + this.optBoolVal = optBoolVal; + this.timeVal = timeVal; + this.durationVal = durationVal; + this.lateStructVal = lateStructVal; + this.unionVal = unionVal; + this.structVal = structVal; + this.enumVal = enumVal; + this.binaryVal = binaryVal; + this.stringVal = stringVal; + this.doubleVal = doubleVal; + this.floatVal = floatVal; + this.i64Val = i64Val; + this.i32Val = i32Val; + this.i16Val = i16Val; + this.byteVal = byteVal; + this.boolVal = boolVal; } @ThriftConstructor protected MyStructFieldPatch() { - this.boolVal = null; - this.byteVal = null; - this.i16Val = null; - this.i32Val = null; - this.i64Val = null; - this.floatVal = null; - this.doubleVal = null; - this.stringVal = null; - this.binaryVal = null; - this.enumVal = null; - this.structVal = null; - this.unionVal = null; - this.lateStructVal = null; - this.durationVal = null; - this.timeVal = null; - this.optBoolVal = null; - this.optByteVal = null; - this.optI16Val = null; - this.optI32Val = null; - this.optI64Val = null; - this.optFloatVal = null; - this.optDoubleVal = null; - this.optStringVal = null; - this.optBinaryVal = null; - this.optEnumVal = null; - this.optStructVal = null; - this.optLateStructVal = null; - this.optListVal = null; - this.optSetVal = null; this.optMapVal = null; + this.optSetVal = null; + this.optListVal = null; + this.optLateStructVal = null; + this.optStructVal = null; + this.optEnumVal = null; + this.optBinaryVal = null; + this.optStringVal = null; + this.optDoubleVal = null; + this.optFloatVal = null; + this.optI64Val = null; + this.optI32Val = null; + this.optI16Val = null; + this.optByteVal = null; + this.optBoolVal = null; + this.timeVal = null; + this.durationVal = null; + this.lateStructVal = null; + this.unionVal = null; + this.structVal = null; + this.enumVal = null; + this.binaryVal = null; + this.stringVal = null; + this.doubleVal = null; + this.floatVal = null; + this.i64Val = null; + this.i32Val = null; + this.i16Val = null; + this.byteVal = null; + this.boolVal = null; } public static class Builder { - private com.facebook.thrift.op.BoolPatch boolVal = null; - private com.facebook.thrift.op.BytePatch byteVal = null; - private com.facebook.thrift.op.I16Patch i16Val = null; - private com.facebook.thrift.op.I32Patch i32Val = null; - private com.facebook.thrift.op.I64Patch i64Val = null; - private com.facebook.thrift.op.FloatPatch floatVal = null; - private com.facebook.thrift.op.DoublePatch doubleVal = null; - private com.facebook.thrift.op.StringPatch stringVal = null; - private com.facebook.thrift.op.BinaryPatch binaryVal = null; - private test.fixtures.patch.MyStructFieldN10Patch enumVal = null; - private test.fixtures.patch.MyDataPatch structVal = null; - private test.fixtures.patch.MyUnionPatch unionVal = null; - private test.fixtures.patch.LateDefStructPatch lateStructVal = null; - private com.facebook.thrift.op.DurationPatch durationVal = null; - private com.facebook.thrift.op.TimePatch timeVal = null; - private com.facebook.thrift.op.BoolPatch optBoolVal = null; - private com.facebook.thrift.op.BytePatch optByteVal = null; - private com.facebook.thrift.op.I16Patch optI16Val = null; - private com.facebook.thrift.op.I32Patch optI32Val = null; - private com.facebook.thrift.op.I64Patch optI64Val = null; - private com.facebook.thrift.op.FloatPatch optFloatVal = null; - private com.facebook.thrift.op.DoublePatch optDoubleVal = null; - private com.facebook.thrift.op.StringPatch optStringVal = null; - private com.facebook.thrift.op.BinaryPatch optBinaryVal = null; - private test.fixtures.patch.MyStructFieldN25Patch optEnumVal = null; - private test.fixtures.patch.MyDataPatch optStructVal = null; - private test.fixtures.patch.LateDefStructPatch optLateStructVal = null; - private test.fixtures.patch.MyStructFieldN28Patch optListVal = null; - private test.fixtures.patch.MyStructFieldN29Patch optSetVal = null; private test.fixtures.patch.MyStructFieldN30Patch optMapVal = null; + private test.fixtures.patch.MyStructFieldN29Patch optSetVal = null; + private test.fixtures.patch.MyStructFieldN28Patch optListVal = null; + private test.fixtures.patch.LateDefStructPatch optLateStructVal = null; + private test.fixtures.patch.MyDataPatch optStructVal = null; + private test.fixtures.patch.MyStructFieldN25Patch optEnumVal = null; + private com.facebook.thrift.op.BinaryPatch optBinaryVal = null; + private com.facebook.thrift.op.StringPatch optStringVal = null; + private com.facebook.thrift.op.DoublePatch optDoubleVal = null; + private com.facebook.thrift.op.FloatPatch optFloatVal = null; + private com.facebook.thrift.op.I64Patch optI64Val = null; + private com.facebook.thrift.op.I32Patch optI32Val = null; + private com.facebook.thrift.op.I16Patch optI16Val = null; + private com.facebook.thrift.op.BytePatch optByteVal = null; + private com.facebook.thrift.op.BoolPatch optBoolVal = null; + private com.facebook.thrift.op.TimePatch timeVal = null; + private com.facebook.thrift.op.DurationPatch durationVal = null; + private test.fixtures.patch.LateDefStructPatch lateStructVal = null; + private test.fixtures.patch.MyUnionPatch unionVal = null; + private test.fixtures.patch.MyDataPatch structVal = null; + private test.fixtures.patch.MyStructFieldN10Patch enumVal = null; + private com.facebook.thrift.op.BinaryPatch binaryVal = null; + private com.facebook.thrift.op.StringPatch stringVal = null; + private com.facebook.thrift.op.DoublePatch doubleVal = null; + private com.facebook.thrift.op.FloatPatch floatVal = null; + private com.facebook.thrift.op.I64Patch i64Val = null; + private com.facebook.thrift.op.I32Patch i32Val = null; + private com.facebook.thrift.op.I16Patch i16Val = null; + private com.facebook.thrift.op.BytePatch byteVal = null; + private com.facebook.thrift.op.BoolPatch boolVal = null; - @com.facebook.swift.codec.ThriftField(value=-1, name="boolVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setBoolVal(com.facebook.thrift.op.BoolPatch boolVal) { - this.boolVal = boolVal; + @com.facebook.swift.codec.ThriftField(value=-30, name="optMapVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptMapVal(test.fixtures.patch.MyStructFieldN30Patch optMapVal) { + this.optMapVal = optMapVal; return this; } - public com.facebook.thrift.op.BoolPatch getBoolVal() { return boolVal; } + public test.fixtures.patch.MyStructFieldN30Patch getOptMapVal() { return optMapVal; } - @com.facebook.swift.codec.ThriftField(value=-2, name="byteVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setByteVal(com.facebook.thrift.op.BytePatch byteVal) { - this.byteVal = byteVal; + @com.facebook.swift.codec.ThriftField(value=-29, name="optSetVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptSetVal(test.fixtures.patch.MyStructFieldN29Patch optSetVal) { + this.optSetVal = optSetVal; return this; } - public com.facebook.thrift.op.BytePatch getByteVal() { return byteVal; } + public test.fixtures.patch.MyStructFieldN29Patch getOptSetVal() { return optSetVal; } - @com.facebook.swift.codec.ThriftField(value=-3, name="i16Val", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setI16Val(com.facebook.thrift.op.I16Patch i16Val) { - this.i16Val = i16Val; + @com.facebook.swift.codec.ThriftField(value=-28, name="optListVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptListVal(test.fixtures.patch.MyStructFieldN28Patch optListVal) { + this.optListVal = optListVal; return this; } - public com.facebook.thrift.op.I16Patch getI16Val() { return i16Val; } + public test.fixtures.patch.MyStructFieldN28Patch getOptListVal() { return optListVal; } - @com.facebook.swift.codec.ThriftField(value=-4, name="i32Val", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setI32Val(com.facebook.thrift.op.I32Patch i32Val) { - this.i32Val = i32Val; + @com.facebook.swift.codec.ThriftField(value=-27, name="optLateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptLateStructVal(test.fixtures.patch.LateDefStructPatch optLateStructVal) { + this.optLateStructVal = optLateStructVal; return this; } - public com.facebook.thrift.op.I32Patch getI32Val() { return i32Val; } - - @com.facebook.swift.codec.ThriftField(value=-5, name="i64Val", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setI64Val(com.facebook.thrift.op.I64Patch i64Val) { - this.i64Val = i64Val; - return this; - } - - public com.facebook.thrift.op.I64Patch getI64Val() { return i64Val; } + public test.fixtures.patch.LateDefStructPatch getOptLateStructVal() { return optLateStructVal; } - @com.facebook.swift.codec.ThriftField(value=-6, name="floatVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setFloatVal(com.facebook.thrift.op.FloatPatch floatVal) { - this.floatVal = floatVal; + @com.facebook.swift.codec.ThriftField(value=-26, name="optStructVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptStructVal(test.fixtures.patch.MyDataPatch optStructVal) { + this.optStructVal = optStructVal; return this; } - public com.facebook.thrift.op.FloatPatch getFloatVal() { return floatVal; } + public test.fixtures.patch.MyDataPatch getOptStructVal() { return optStructVal; } - @com.facebook.swift.codec.ThriftField(value=-7, name="doubleVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setDoubleVal(com.facebook.thrift.op.DoublePatch doubleVal) { - this.doubleVal = doubleVal; + @com.facebook.swift.codec.ThriftField(value=-25, name="optEnumVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptEnumVal(test.fixtures.patch.MyStructFieldN25Patch optEnumVal) { + this.optEnumVal = optEnumVal; return this; } - public com.facebook.thrift.op.DoublePatch getDoubleVal() { return doubleVal; } + public test.fixtures.patch.MyStructFieldN25Patch getOptEnumVal() { return optEnumVal; } - @com.facebook.swift.codec.ThriftField(value=-8, name="stringVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setStringVal(com.facebook.thrift.op.StringPatch stringVal) { - this.stringVal = stringVal; + @com.facebook.swift.codec.ThriftField(value=-24, name="optBinaryVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptBinaryVal(com.facebook.thrift.op.BinaryPatch optBinaryVal) { + this.optBinaryVal = optBinaryVal; return this; } - public com.facebook.thrift.op.StringPatch getStringVal() { return stringVal; } + public com.facebook.thrift.op.BinaryPatch getOptBinaryVal() { return optBinaryVal; } - @com.facebook.swift.codec.ThriftField(value=-9, name="binaryVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setBinaryVal(com.facebook.thrift.op.BinaryPatch binaryVal) { - this.binaryVal = binaryVal; + @com.facebook.swift.codec.ThriftField(value=-23, name="optStringVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptStringVal(com.facebook.thrift.op.StringPatch optStringVal) { + this.optStringVal = optStringVal; return this; } - public com.facebook.thrift.op.BinaryPatch getBinaryVal() { return binaryVal; } + public com.facebook.thrift.op.StringPatch getOptStringVal() { return optStringVal; } - @com.facebook.swift.codec.ThriftField(value=-10, name="enumVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setEnumVal(test.fixtures.patch.MyStructFieldN10Patch enumVal) { - this.enumVal = enumVal; + @com.facebook.swift.codec.ThriftField(value=-22, name="optDoubleVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptDoubleVal(com.facebook.thrift.op.DoublePatch optDoubleVal) { + this.optDoubleVal = optDoubleVal; return this; } - public test.fixtures.patch.MyStructFieldN10Patch getEnumVal() { return enumVal; } + public com.facebook.thrift.op.DoublePatch getOptDoubleVal() { return optDoubleVal; } - @com.facebook.swift.codec.ThriftField(value=-11, name="structVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setStructVal(test.fixtures.patch.MyDataPatch structVal) { - this.structVal = structVal; + @com.facebook.swift.codec.ThriftField(value=-21, name="optFloatVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptFloatVal(com.facebook.thrift.op.FloatPatch optFloatVal) { + this.optFloatVal = optFloatVal; return this; } - public test.fixtures.patch.MyDataPatch getStructVal() { return structVal; } + public com.facebook.thrift.op.FloatPatch getOptFloatVal() { return optFloatVal; } - @com.facebook.swift.codec.ThriftField(value=-12, name="unionVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setUnionVal(test.fixtures.patch.MyUnionPatch unionVal) { - this.unionVal = unionVal; + @com.facebook.swift.codec.ThriftField(value=-20, name="optI64Val", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptI64Val(com.facebook.thrift.op.I64Patch optI64Val) { + this.optI64Val = optI64Val; return this; } - public test.fixtures.patch.MyUnionPatch getUnionVal() { return unionVal; } + public com.facebook.thrift.op.I64Patch getOptI64Val() { return optI64Val; } - @com.facebook.swift.codec.ThriftField(value=-13, name="lateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setLateStructVal(test.fixtures.patch.LateDefStructPatch lateStructVal) { - this.lateStructVal = lateStructVal; + @com.facebook.swift.codec.ThriftField(value=-19, name="optI32Val", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptI32Val(com.facebook.thrift.op.I32Patch optI32Val) { + this.optI32Val = optI32Val; return this; } - public test.fixtures.patch.LateDefStructPatch getLateStructVal() { return lateStructVal; } + public com.facebook.thrift.op.I32Patch getOptI32Val() { return optI32Val; } - @com.facebook.swift.codec.ThriftField(value=-14, name="durationVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setDurationVal(com.facebook.thrift.op.DurationPatch durationVal) { - this.durationVal = durationVal; + @com.facebook.swift.codec.ThriftField(value=-18, name="optI16Val", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptI16Val(com.facebook.thrift.op.I16Patch optI16Val) { + this.optI16Val = optI16Val; return this; } - public com.facebook.thrift.op.DurationPatch getDurationVal() { return durationVal; } + public com.facebook.thrift.op.I16Patch getOptI16Val() { return optI16Val; } - @com.facebook.swift.codec.ThriftField(value=-15, name="timeVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setTimeVal(com.facebook.thrift.op.TimePatch timeVal) { - this.timeVal = timeVal; + @com.facebook.swift.codec.ThriftField(value=-17, name="optByteVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setOptByteVal(com.facebook.thrift.op.BytePatch optByteVal) { + this.optByteVal = optByteVal; return this; } - public com.facebook.thrift.op.TimePatch getTimeVal() { return timeVal; } + public com.facebook.thrift.op.BytePatch getOptByteVal() { return optByteVal; } @com.facebook.swift.codec.ThriftField(value=-16, name="optBoolVal", isLegacyId=true, requiredness=Requiredness.NONE) public Builder setOptBoolVal(com.facebook.thrift.op.BoolPatch optBoolVal) { @@ -283,185 +275,193 @@ public final class MyStructFieldPatch implements com.facebook.thrift.payload.Thr public com.facebook.thrift.op.BoolPatch getOptBoolVal() { return optBoolVal; } - @com.facebook.swift.codec.ThriftField(value=-17, name="optByteVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptByteVal(com.facebook.thrift.op.BytePatch optByteVal) { - this.optByteVal = optByteVal; + @com.facebook.swift.codec.ThriftField(value=-15, name="timeVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setTimeVal(com.facebook.thrift.op.TimePatch timeVal) { + this.timeVal = timeVal; return this; } - public com.facebook.thrift.op.BytePatch getOptByteVal() { return optByteVal; } + public com.facebook.thrift.op.TimePatch getTimeVal() { return timeVal; } - @com.facebook.swift.codec.ThriftField(value=-18, name="optI16Val", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptI16Val(com.facebook.thrift.op.I16Patch optI16Val) { - this.optI16Val = optI16Val; + @com.facebook.swift.codec.ThriftField(value=-14, name="durationVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setDurationVal(com.facebook.thrift.op.DurationPatch durationVal) { + this.durationVal = durationVal; return this; } - public com.facebook.thrift.op.I16Patch getOptI16Val() { return optI16Val; } + public com.facebook.thrift.op.DurationPatch getDurationVal() { return durationVal; } - @com.facebook.swift.codec.ThriftField(value=-19, name="optI32Val", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptI32Val(com.facebook.thrift.op.I32Patch optI32Val) { - this.optI32Val = optI32Val; + @com.facebook.swift.codec.ThriftField(value=-13, name="lateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setLateStructVal(test.fixtures.patch.LateDefStructPatch lateStructVal) { + this.lateStructVal = lateStructVal; return this; } - public com.facebook.thrift.op.I32Patch getOptI32Val() { return optI32Val; } + public test.fixtures.patch.LateDefStructPatch getLateStructVal() { return lateStructVal; } - @com.facebook.swift.codec.ThriftField(value=-20, name="optI64Val", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptI64Val(com.facebook.thrift.op.I64Patch optI64Val) { - this.optI64Val = optI64Val; + @com.facebook.swift.codec.ThriftField(value=-12, name="unionVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setUnionVal(test.fixtures.patch.MyUnionPatch unionVal) { + this.unionVal = unionVal; return this; } - public com.facebook.thrift.op.I64Patch getOptI64Val() { return optI64Val; } + public test.fixtures.patch.MyUnionPatch getUnionVal() { return unionVal; } - @com.facebook.swift.codec.ThriftField(value=-21, name="optFloatVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptFloatVal(com.facebook.thrift.op.FloatPatch optFloatVal) { - this.optFloatVal = optFloatVal; + @com.facebook.swift.codec.ThriftField(value=-11, name="structVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setStructVal(test.fixtures.patch.MyDataPatch structVal) { + this.structVal = structVal; return this; } - public com.facebook.thrift.op.FloatPatch getOptFloatVal() { return optFloatVal; } + public test.fixtures.patch.MyDataPatch getStructVal() { return structVal; } - @com.facebook.swift.codec.ThriftField(value=-22, name="optDoubleVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptDoubleVal(com.facebook.thrift.op.DoublePatch optDoubleVal) { - this.optDoubleVal = optDoubleVal; + @com.facebook.swift.codec.ThriftField(value=-10, name="enumVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setEnumVal(test.fixtures.patch.MyStructFieldN10Patch enumVal) { + this.enumVal = enumVal; return this; } - public com.facebook.thrift.op.DoublePatch getOptDoubleVal() { return optDoubleVal; } + public test.fixtures.patch.MyStructFieldN10Patch getEnumVal() { return enumVal; } - @com.facebook.swift.codec.ThriftField(value=-23, name="optStringVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptStringVal(com.facebook.thrift.op.StringPatch optStringVal) { - this.optStringVal = optStringVal; + @com.facebook.swift.codec.ThriftField(value=-9, name="binaryVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setBinaryVal(com.facebook.thrift.op.BinaryPatch binaryVal) { + this.binaryVal = binaryVal; return this; } - public com.facebook.thrift.op.StringPatch getOptStringVal() { return optStringVal; } + public com.facebook.thrift.op.BinaryPatch getBinaryVal() { return binaryVal; } - @com.facebook.swift.codec.ThriftField(value=-24, name="optBinaryVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptBinaryVal(com.facebook.thrift.op.BinaryPatch optBinaryVal) { - this.optBinaryVal = optBinaryVal; + @com.facebook.swift.codec.ThriftField(value=-8, name="stringVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setStringVal(com.facebook.thrift.op.StringPatch stringVal) { + this.stringVal = stringVal; return this; } - public com.facebook.thrift.op.BinaryPatch getOptBinaryVal() { return optBinaryVal; } + public com.facebook.thrift.op.StringPatch getStringVal() { return stringVal; } - @com.facebook.swift.codec.ThriftField(value=-25, name="optEnumVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptEnumVal(test.fixtures.patch.MyStructFieldN25Patch optEnumVal) { - this.optEnumVal = optEnumVal; + @com.facebook.swift.codec.ThriftField(value=-7, name="doubleVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setDoubleVal(com.facebook.thrift.op.DoublePatch doubleVal) { + this.doubleVal = doubleVal; return this; } - public test.fixtures.patch.MyStructFieldN25Patch getOptEnumVal() { return optEnumVal; } + public com.facebook.thrift.op.DoublePatch getDoubleVal() { return doubleVal; } - @com.facebook.swift.codec.ThriftField(value=-26, name="optStructVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptStructVal(test.fixtures.patch.MyDataPatch optStructVal) { - this.optStructVal = optStructVal; + @com.facebook.swift.codec.ThriftField(value=-6, name="floatVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setFloatVal(com.facebook.thrift.op.FloatPatch floatVal) { + this.floatVal = floatVal; return this; } - public test.fixtures.patch.MyDataPatch getOptStructVal() { return optStructVal; } + public com.facebook.thrift.op.FloatPatch getFloatVal() { return floatVal; } - @com.facebook.swift.codec.ThriftField(value=-27, name="optLateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptLateStructVal(test.fixtures.patch.LateDefStructPatch optLateStructVal) { - this.optLateStructVal = optLateStructVal; + @com.facebook.swift.codec.ThriftField(value=-5, name="i64Val", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setI64Val(com.facebook.thrift.op.I64Patch i64Val) { + this.i64Val = i64Val; return this; } - public test.fixtures.patch.LateDefStructPatch getOptLateStructVal() { return optLateStructVal; } + public com.facebook.thrift.op.I64Patch getI64Val() { return i64Val; } - @com.facebook.swift.codec.ThriftField(value=-28, name="optListVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptListVal(test.fixtures.patch.MyStructFieldN28Patch optListVal) { - this.optListVal = optListVal; + @com.facebook.swift.codec.ThriftField(value=-4, name="i32Val", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setI32Val(com.facebook.thrift.op.I32Patch i32Val) { + this.i32Val = i32Val; return this; } - public test.fixtures.patch.MyStructFieldN28Patch getOptListVal() { return optListVal; } + public com.facebook.thrift.op.I32Patch getI32Val() { return i32Val; } - @com.facebook.swift.codec.ThriftField(value=-29, name="optSetVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptSetVal(test.fixtures.patch.MyStructFieldN29Patch optSetVal) { - this.optSetVal = optSetVal; + @com.facebook.swift.codec.ThriftField(value=-3, name="i16Val", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setI16Val(com.facebook.thrift.op.I16Patch i16Val) { + this.i16Val = i16Val; return this; } - public test.fixtures.patch.MyStructFieldN29Patch getOptSetVal() { return optSetVal; } + public com.facebook.thrift.op.I16Patch getI16Val() { return i16Val; } - @com.facebook.swift.codec.ThriftField(value=-30, name="optMapVal", isLegacyId=true, requiredness=Requiredness.NONE) - public Builder setOptMapVal(test.fixtures.patch.MyStructFieldN30Patch optMapVal) { - this.optMapVal = optMapVal; + @com.facebook.swift.codec.ThriftField(value=-2, name="byteVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setByteVal(com.facebook.thrift.op.BytePatch byteVal) { + this.byteVal = byteVal; return this; } - public test.fixtures.patch.MyStructFieldN30Patch getOptMapVal() { return optMapVal; } + public com.facebook.thrift.op.BytePatch getByteVal() { return byteVal; } + + @com.facebook.swift.codec.ThriftField(value=-1, name="boolVal", isLegacyId=true, requiredness=Requiredness.NONE) + public Builder setBoolVal(com.facebook.thrift.op.BoolPatch boolVal) { + this.boolVal = boolVal; + return this; + } + + public com.facebook.thrift.op.BoolPatch getBoolVal() { return boolVal; } public Builder() { } public Builder(MyStructFieldPatch other) { - this.boolVal = other.boolVal; - this.byteVal = other.byteVal; - this.i16Val = other.i16Val; - this.i32Val = other.i32Val; - this.i64Val = other.i64Val; - this.floatVal = other.floatVal; - this.doubleVal = other.doubleVal; - this.stringVal = other.stringVal; - this.binaryVal = other.binaryVal; - this.enumVal = other.enumVal; - this.structVal = other.structVal; - this.unionVal = other.unionVal; - this.lateStructVal = other.lateStructVal; - this.durationVal = other.durationVal; - this.timeVal = other.timeVal; - this.optBoolVal = other.optBoolVal; - this.optByteVal = other.optByteVal; - this.optI16Val = other.optI16Val; - this.optI32Val = other.optI32Val; - this.optI64Val = other.optI64Val; - this.optFloatVal = other.optFloatVal; - this.optDoubleVal = other.optDoubleVal; - this.optStringVal = other.optStringVal; - this.optBinaryVal = other.optBinaryVal; - this.optEnumVal = other.optEnumVal; - this.optStructVal = other.optStructVal; - this.optLateStructVal = other.optLateStructVal; - this.optListVal = other.optListVal; - this.optSetVal = other.optSetVal; this.optMapVal = other.optMapVal; - } - - @ThriftConstructor - public MyStructFieldPatch build() { - MyStructFieldPatch result = new MyStructFieldPatch ( - this.boolVal, - this.byteVal, - this.i16Val, - this.i32Val, - this.i64Val, - this.floatVal, - this.doubleVal, - this.stringVal, - this.binaryVal, - this.enumVal, - this.structVal, - this.unionVal, - this.lateStructVal, - this.durationVal, - this.timeVal, - this.optBoolVal, - this.optByteVal, - this.optI16Val, - this.optI32Val, - this.optI64Val, - this.optFloatVal, - this.optDoubleVal, - this.optStringVal, - this.optBinaryVal, - this.optEnumVal, - this.optStructVal, - this.optLateStructVal, - this.optListVal, + this.optSetVal = other.optSetVal; + this.optListVal = other.optListVal; + this.optLateStructVal = other.optLateStructVal; + this.optStructVal = other.optStructVal; + this.optEnumVal = other.optEnumVal; + this.optBinaryVal = other.optBinaryVal; + this.optStringVal = other.optStringVal; + this.optDoubleVal = other.optDoubleVal; + this.optFloatVal = other.optFloatVal; + this.optI64Val = other.optI64Val; + this.optI32Val = other.optI32Val; + this.optI16Val = other.optI16Val; + this.optByteVal = other.optByteVal; + this.optBoolVal = other.optBoolVal; + this.timeVal = other.timeVal; + this.durationVal = other.durationVal; + this.lateStructVal = other.lateStructVal; + this.unionVal = other.unionVal; + this.structVal = other.structVal; + this.enumVal = other.enumVal; + this.binaryVal = other.binaryVal; + this.stringVal = other.stringVal; + this.doubleVal = other.doubleVal; + this.floatVal = other.floatVal; + this.i64Val = other.i64Val; + this.i32Val = other.i32Val; + this.i16Val = other.i16Val; + this.byteVal = other.byteVal; + this.boolVal = other.boolVal; + } + + @ThriftConstructor + public MyStructFieldPatch build() { + MyStructFieldPatch result = new MyStructFieldPatch ( + this.optMapVal, this.optSetVal, - this.optMapVal + this.optListVal, + this.optLateStructVal, + this.optStructVal, + this.optEnumVal, + this.optBinaryVal, + this.optStringVal, + this.optDoubleVal, + this.optFloatVal, + this.optI64Val, + this.optI32Val, + this.optI16Val, + this.optByteVal, + this.optBoolVal, + this.timeVal, + this.durationVal, + this.lateStructVal, + this.unionVal, + this.structVal, + this.enumVal, + this.binaryVal, + this.stringVal, + this.doubleVal, + this.floatVal, + this.i64Val, + this.i32Val, + this.i16Val, + this.byteVal, + this.boolVal ); return result; } @@ -471,265 +471,260 @@ public final class MyStructFieldPatch implements com.facebook.thrift.payload.Thr public static final Map THRIFT_NAMES_TO_IDS = new HashMap(); public static final Map FIELD_METADATA = new HashMap<>(); private static final TStruct STRUCT_DESC = new TStruct("MyStructFieldPatch"); - private final com.facebook.thrift.op.BoolPatch boolVal; - public static final int _BOOLVAL = -1; - private static final TField BOOL_VAL_FIELD_DESC = new TField("boolVal", TType.STRUCT, (short)-1); - private final com.facebook.thrift.op.BytePatch byteVal; - public static final int _BYTEVAL = -2; - private static final TField BYTE_VAL_FIELD_DESC = new TField("byteVal", TType.STRUCT, (short)-2); - private final com.facebook.thrift.op.I16Patch i16Val; - public static final int _I16VAL = -3; - private static final TField I16_VAL_FIELD_DESC = new TField("i16Val", TType.STRUCT, (short)-3); - private final com.facebook.thrift.op.I32Patch i32Val; - public static final int _I32VAL = -4; - private static final TField I32_VAL_FIELD_DESC = new TField("i32Val", TType.STRUCT, (short)-4); - private final com.facebook.thrift.op.I64Patch i64Val; - public static final int _I64VAL = -5; - private static final TField I64_VAL_FIELD_DESC = new TField("i64Val", TType.STRUCT, (short)-5); - private final com.facebook.thrift.op.FloatPatch floatVal; - public static final int _FLOATVAL = -6; - private static final TField FLOAT_VAL_FIELD_DESC = new TField("floatVal", TType.STRUCT, (short)-6); - private final com.facebook.thrift.op.DoublePatch doubleVal; - public static final int _DOUBLEVAL = -7; - private static final TField DOUBLE_VAL_FIELD_DESC = new TField("doubleVal", TType.STRUCT, (short)-7); - private final com.facebook.thrift.op.StringPatch stringVal; - public static final int _STRINGVAL = -8; - private static final TField STRING_VAL_FIELD_DESC = new TField("stringVal", TType.STRUCT, (short)-8); - private final com.facebook.thrift.op.BinaryPatch binaryVal; - public static final int _BINARYVAL = -9; - private static final TField BINARY_VAL_FIELD_DESC = new TField("binaryVal", TType.STRUCT, (short)-9); - private final test.fixtures.patch.MyStructFieldN10Patch enumVal; - public static final int _ENUMVAL = -10; - private static final TField ENUM_VAL_FIELD_DESC = new TField("enumVal", TType.STRUCT, (short)-10); - private final test.fixtures.patch.MyDataPatch structVal; - public static final int _STRUCTVAL = -11; - private static final TField STRUCT_VAL_FIELD_DESC = new TField("structVal", TType.STRUCT, (short)-11); - private final test.fixtures.patch.MyUnionPatch unionVal; - public static final int _UNIONVAL = -12; - private static final TField UNION_VAL_FIELD_DESC = new TField("unionVal", TType.STRUCT, (short)-12); - private final test.fixtures.patch.LateDefStructPatch lateStructVal; - public static final int _LATESTRUCTVAL = -13; - private static final TField LATE_STRUCT_VAL_FIELD_DESC = new TField("lateStructVal", TType.STRUCT, (short)-13); - private final com.facebook.thrift.op.DurationPatch durationVal; - public static final int _DURATIONVAL = -14; - private static final TField DURATION_VAL_FIELD_DESC = new TField("durationVal", TType.STRUCT, (short)-14); - private final com.facebook.thrift.op.TimePatch timeVal; - public static final int _TIMEVAL = -15; - private static final TField TIME_VAL_FIELD_DESC = new TField("timeVal", TType.STRUCT, (short)-15); - private final com.facebook.thrift.op.BoolPatch optBoolVal; - public static final int _OPTBOOLVAL = -16; - private static final TField OPT_BOOL_VAL_FIELD_DESC = new TField("optBoolVal", TType.STRUCT, (short)-16); - private final com.facebook.thrift.op.BytePatch optByteVal; - public static final int _OPTBYTEVAL = -17; - private static final TField OPT_BYTE_VAL_FIELD_DESC = new TField("optByteVal", TType.STRUCT, (short)-17); - private final com.facebook.thrift.op.I16Patch optI16Val; - public static final int _OPTI16VAL = -18; - private static final TField OPT_I16_VAL_FIELD_DESC = new TField("optI16Val", TType.STRUCT, (short)-18); - private final com.facebook.thrift.op.I32Patch optI32Val; - public static final int _OPTI32VAL = -19; - private static final TField OPT_I32_VAL_FIELD_DESC = new TField("optI32Val", TType.STRUCT, (short)-19); - private final com.facebook.thrift.op.I64Patch optI64Val; - public static final int _OPTI64VAL = -20; - private static final TField OPT_I64_VAL_FIELD_DESC = new TField("optI64Val", TType.STRUCT, (short)-20); - private final com.facebook.thrift.op.FloatPatch optFloatVal; - public static final int _OPTFLOATVAL = -21; - private static final TField OPT_FLOAT_VAL_FIELD_DESC = new TField("optFloatVal", TType.STRUCT, (short)-21); - private final com.facebook.thrift.op.DoublePatch optDoubleVal; - public static final int _OPTDOUBLEVAL = -22; - private static final TField OPT_DOUBLE_VAL_FIELD_DESC = new TField("optDoubleVal", TType.STRUCT, (short)-22); - private final com.facebook.thrift.op.StringPatch optStringVal; - public static final int _OPTSTRINGVAL = -23; - private static final TField OPT_STRING_VAL_FIELD_DESC = new TField("optStringVal", TType.STRUCT, (short)-23); - private final com.facebook.thrift.op.BinaryPatch optBinaryVal; - public static final int _OPTBINARYVAL = -24; - private static final TField OPT_BINARY_VAL_FIELD_DESC = new TField("optBinaryVal", TType.STRUCT, (short)-24); - private final test.fixtures.patch.MyStructFieldN25Patch optEnumVal; - public static final int _OPTENUMVAL = -25; - private static final TField OPT_ENUM_VAL_FIELD_DESC = new TField("optEnumVal", TType.STRUCT, (short)-25); - private final test.fixtures.patch.MyDataPatch optStructVal; - public static final int _OPTSTRUCTVAL = -26; - private static final TField OPT_STRUCT_VAL_FIELD_DESC = new TField("optStructVal", TType.STRUCT, (short)-26); - private final test.fixtures.patch.LateDefStructPatch optLateStructVal; - public static final int _OPTLATESTRUCTVAL = -27; - private static final TField OPT_LATE_STRUCT_VAL_FIELD_DESC = new TField("optLateStructVal", TType.STRUCT, (short)-27); - private final test.fixtures.patch.MyStructFieldN28Patch optListVal; - public static final int _OPTLISTVAL = -28; - private static final TField OPT_LIST_VAL_FIELD_DESC = new TField("optListVal", TType.STRUCT, (short)-28); + private final test.fixtures.patch.MyStructFieldN30Patch optMapVal; + public static final int _OPTMAPVAL = -30; + private static final TField OPT_MAP_VAL_FIELD_DESC = new TField("optMapVal", TType.STRUCT, (short)-30); private final test.fixtures.patch.MyStructFieldN29Patch optSetVal; public static final int _OPTSETVAL = -29; private static final TField OPT_SET_VAL_FIELD_DESC = new TField("optSetVal", TType.STRUCT, (short)-29); - private final test.fixtures.patch.MyStructFieldN30Patch optMapVal; - public static final int _OPTMAPVAL = -30; - private static final TField OPT_MAP_VAL_FIELD_DESC = new TField("optMapVal", TType.STRUCT, (short)-30); - static { - NAMES_TO_IDS.put("boolVal", -1); - THRIFT_NAMES_TO_IDS.put("boolVal", -1); - FIELD_METADATA.put(-1, BOOL_VAL_FIELD_DESC); - NAMES_TO_IDS.put("byteVal", -2); - THRIFT_NAMES_TO_IDS.put("byteVal", -2); - FIELD_METADATA.put(-2, BYTE_VAL_FIELD_DESC); - NAMES_TO_IDS.put("i16Val", -3); - THRIFT_NAMES_TO_IDS.put("i16Val", -3); - FIELD_METADATA.put(-3, I16_VAL_FIELD_DESC); - NAMES_TO_IDS.put("i32Val", -4); - THRIFT_NAMES_TO_IDS.put("i32Val", -4); - FIELD_METADATA.put(-4, I32_VAL_FIELD_DESC); - NAMES_TO_IDS.put("i64Val", -5); - THRIFT_NAMES_TO_IDS.put("i64Val", -5); - FIELD_METADATA.put(-5, I64_VAL_FIELD_DESC); - NAMES_TO_IDS.put("floatVal", -6); - THRIFT_NAMES_TO_IDS.put("floatVal", -6); - FIELD_METADATA.put(-6, FLOAT_VAL_FIELD_DESC); - NAMES_TO_IDS.put("doubleVal", -7); - THRIFT_NAMES_TO_IDS.put("doubleVal", -7); - FIELD_METADATA.put(-7, DOUBLE_VAL_FIELD_DESC); - NAMES_TO_IDS.put("stringVal", -8); - THRIFT_NAMES_TO_IDS.put("stringVal", -8); - FIELD_METADATA.put(-8, STRING_VAL_FIELD_DESC); - NAMES_TO_IDS.put("binaryVal", -9); - THRIFT_NAMES_TO_IDS.put("binaryVal", -9); - FIELD_METADATA.put(-9, BINARY_VAL_FIELD_DESC); - NAMES_TO_IDS.put("enumVal", -10); - THRIFT_NAMES_TO_IDS.put("enumVal", -10); - FIELD_METADATA.put(-10, ENUM_VAL_FIELD_DESC); - NAMES_TO_IDS.put("structVal", -11); - THRIFT_NAMES_TO_IDS.put("structVal", -11); - FIELD_METADATA.put(-11, STRUCT_VAL_FIELD_DESC); - NAMES_TO_IDS.put("unionVal", -12); - THRIFT_NAMES_TO_IDS.put("unionVal", -12); - FIELD_METADATA.put(-12, UNION_VAL_FIELD_DESC); - NAMES_TO_IDS.put("lateStructVal", -13); - THRIFT_NAMES_TO_IDS.put("lateStructVal", -13); - FIELD_METADATA.put(-13, LATE_STRUCT_VAL_FIELD_DESC); - NAMES_TO_IDS.put("durationVal", -14); - THRIFT_NAMES_TO_IDS.put("durationVal", -14); - FIELD_METADATA.put(-14, DURATION_VAL_FIELD_DESC); - NAMES_TO_IDS.put("timeVal", -15); - THRIFT_NAMES_TO_IDS.put("timeVal", -15); - FIELD_METADATA.put(-15, TIME_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optBoolVal", -16); - THRIFT_NAMES_TO_IDS.put("optBoolVal", -16); - FIELD_METADATA.put(-16, OPT_BOOL_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optByteVal", -17); - THRIFT_NAMES_TO_IDS.put("optByteVal", -17); - FIELD_METADATA.put(-17, OPT_BYTE_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optI16Val", -18); - THRIFT_NAMES_TO_IDS.put("optI16Val", -18); - FIELD_METADATA.put(-18, OPT_I16_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optI32Val", -19); - THRIFT_NAMES_TO_IDS.put("optI32Val", -19); - FIELD_METADATA.put(-19, OPT_I32_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optI64Val", -20); - THRIFT_NAMES_TO_IDS.put("optI64Val", -20); - FIELD_METADATA.put(-20, OPT_I64_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optFloatVal", -21); - THRIFT_NAMES_TO_IDS.put("optFloatVal", -21); - FIELD_METADATA.put(-21, OPT_FLOAT_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optDoubleVal", -22); - THRIFT_NAMES_TO_IDS.put("optDoubleVal", -22); - FIELD_METADATA.put(-22, OPT_DOUBLE_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optStringVal", -23); - THRIFT_NAMES_TO_IDS.put("optStringVal", -23); - FIELD_METADATA.put(-23, OPT_STRING_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optBinaryVal", -24); - THRIFT_NAMES_TO_IDS.put("optBinaryVal", -24); - FIELD_METADATA.put(-24, OPT_BINARY_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optEnumVal", -25); - THRIFT_NAMES_TO_IDS.put("optEnumVal", -25); - FIELD_METADATA.put(-25, OPT_ENUM_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optStructVal", -26); - THRIFT_NAMES_TO_IDS.put("optStructVal", -26); - FIELD_METADATA.put(-26, OPT_STRUCT_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optLateStructVal", -27); - THRIFT_NAMES_TO_IDS.put("optLateStructVal", -27); - FIELD_METADATA.put(-27, OPT_LATE_STRUCT_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optListVal", -28); - THRIFT_NAMES_TO_IDS.put("optListVal", -28); - FIELD_METADATA.put(-28, OPT_LIST_VAL_FIELD_DESC); - NAMES_TO_IDS.put("optSetVal", -29); - THRIFT_NAMES_TO_IDS.put("optSetVal", -29); - FIELD_METADATA.put(-29, OPT_SET_VAL_FIELD_DESC); + private final test.fixtures.patch.MyStructFieldN28Patch optListVal; + public static final int _OPTLISTVAL = -28; + private static final TField OPT_LIST_VAL_FIELD_DESC = new TField("optListVal", TType.STRUCT, (short)-28); + private final test.fixtures.patch.LateDefStructPatch optLateStructVal; + public static final int _OPTLATESTRUCTVAL = -27; + private static final TField OPT_LATE_STRUCT_VAL_FIELD_DESC = new TField("optLateStructVal", TType.STRUCT, (short)-27); + private final test.fixtures.patch.MyDataPatch optStructVal; + public static final int _OPTSTRUCTVAL = -26; + private static final TField OPT_STRUCT_VAL_FIELD_DESC = new TField("optStructVal", TType.STRUCT, (short)-26); + private final test.fixtures.patch.MyStructFieldN25Patch optEnumVal; + public static final int _OPTENUMVAL = -25; + private static final TField OPT_ENUM_VAL_FIELD_DESC = new TField("optEnumVal", TType.STRUCT, (short)-25); + private final com.facebook.thrift.op.BinaryPatch optBinaryVal; + public static final int _OPTBINARYVAL = -24; + private static final TField OPT_BINARY_VAL_FIELD_DESC = new TField("optBinaryVal", TType.STRUCT, (short)-24); + private final com.facebook.thrift.op.StringPatch optStringVal; + public static final int _OPTSTRINGVAL = -23; + private static final TField OPT_STRING_VAL_FIELD_DESC = new TField("optStringVal", TType.STRUCT, (short)-23); + private final com.facebook.thrift.op.DoublePatch optDoubleVal; + public static final int _OPTDOUBLEVAL = -22; + private static final TField OPT_DOUBLE_VAL_FIELD_DESC = new TField("optDoubleVal", TType.STRUCT, (short)-22); + private final com.facebook.thrift.op.FloatPatch optFloatVal; + public static final int _OPTFLOATVAL = -21; + private static final TField OPT_FLOAT_VAL_FIELD_DESC = new TField("optFloatVal", TType.STRUCT, (short)-21); + private final com.facebook.thrift.op.I64Patch optI64Val; + public static final int _OPTI64VAL = -20; + private static final TField OPT_I64_VAL_FIELD_DESC = new TField("optI64Val", TType.STRUCT, (short)-20); + private final com.facebook.thrift.op.I32Patch optI32Val; + public static final int _OPTI32VAL = -19; + private static final TField OPT_I32_VAL_FIELD_DESC = new TField("optI32Val", TType.STRUCT, (short)-19); + private final com.facebook.thrift.op.I16Patch optI16Val; + public static final int _OPTI16VAL = -18; + private static final TField OPT_I16_VAL_FIELD_DESC = new TField("optI16Val", TType.STRUCT, (short)-18); + private final com.facebook.thrift.op.BytePatch optByteVal; + public static final int _OPTBYTEVAL = -17; + private static final TField OPT_BYTE_VAL_FIELD_DESC = new TField("optByteVal", TType.STRUCT, (short)-17); + private final com.facebook.thrift.op.BoolPatch optBoolVal; + public static final int _OPTBOOLVAL = -16; + private static final TField OPT_BOOL_VAL_FIELD_DESC = new TField("optBoolVal", TType.STRUCT, (short)-16); + private final com.facebook.thrift.op.TimePatch timeVal; + public static final int _TIMEVAL = -15; + private static final TField TIME_VAL_FIELD_DESC = new TField("timeVal", TType.STRUCT, (short)-15); + private final com.facebook.thrift.op.DurationPatch durationVal; + public static final int _DURATIONVAL = -14; + private static final TField DURATION_VAL_FIELD_DESC = new TField("durationVal", TType.STRUCT, (short)-14); + private final test.fixtures.patch.LateDefStructPatch lateStructVal; + public static final int _LATESTRUCTVAL = -13; + private static final TField LATE_STRUCT_VAL_FIELD_DESC = new TField("lateStructVal", TType.STRUCT, (short)-13); + private final test.fixtures.patch.MyUnionPatch unionVal; + public static final int _UNIONVAL = -12; + private static final TField UNION_VAL_FIELD_DESC = new TField("unionVal", TType.STRUCT, (short)-12); + private final test.fixtures.patch.MyDataPatch structVal; + public static final int _STRUCTVAL = -11; + private static final TField STRUCT_VAL_FIELD_DESC = new TField("structVal", TType.STRUCT, (short)-11); + private final test.fixtures.patch.MyStructFieldN10Patch enumVal; + public static final int _ENUMVAL = -10; + private static final TField ENUM_VAL_FIELD_DESC = new TField("enumVal", TType.STRUCT, (short)-10); + private final com.facebook.thrift.op.BinaryPatch binaryVal; + public static final int _BINARYVAL = -9; + private static final TField BINARY_VAL_FIELD_DESC = new TField("binaryVal", TType.STRUCT, (short)-9); + private final com.facebook.thrift.op.StringPatch stringVal; + public static final int _STRINGVAL = -8; + private static final TField STRING_VAL_FIELD_DESC = new TField("stringVal", TType.STRUCT, (short)-8); + private final com.facebook.thrift.op.DoublePatch doubleVal; + public static final int _DOUBLEVAL = -7; + private static final TField DOUBLE_VAL_FIELD_DESC = new TField("doubleVal", TType.STRUCT, (short)-7); + private final com.facebook.thrift.op.FloatPatch floatVal; + public static final int _FLOATVAL = -6; + private static final TField FLOAT_VAL_FIELD_DESC = new TField("floatVal", TType.STRUCT, (short)-6); + private final com.facebook.thrift.op.I64Patch i64Val; + public static final int _I64VAL = -5; + private static final TField I64_VAL_FIELD_DESC = new TField("i64Val", TType.STRUCT, (short)-5); + private final com.facebook.thrift.op.I32Patch i32Val; + public static final int _I32VAL = -4; + private static final TField I32_VAL_FIELD_DESC = new TField("i32Val", TType.STRUCT, (short)-4); + private final com.facebook.thrift.op.I16Patch i16Val; + public static final int _I16VAL = -3; + private static final TField I16_VAL_FIELD_DESC = new TField("i16Val", TType.STRUCT, (short)-3); + private final com.facebook.thrift.op.BytePatch byteVal; + public static final int _BYTEVAL = -2; + private static final TField BYTE_VAL_FIELD_DESC = new TField("byteVal", TType.STRUCT, (short)-2); + private final com.facebook.thrift.op.BoolPatch boolVal; + public static final int _BOOLVAL = -1; + private static final TField BOOL_VAL_FIELD_DESC = new TField("boolVal", TType.STRUCT, (short)-1); + static { NAMES_TO_IDS.put("optMapVal", -30); THRIFT_NAMES_TO_IDS.put("optMapVal", -30); FIELD_METADATA.put(-30, OPT_MAP_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optSetVal", -29); + THRIFT_NAMES_TO_IDS.put("optSetVal", -29); + FIELD_METADATA.put(-29, OPT_SET_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optListVal", -28); + THRIFT_NAMES_TO_IDS.put("optListVal", -28); + FIELD_METADATA.put(-28, OPT_LIST_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optLateStructVal", -27); + THRIFT_NAMES_TO_IDS.put("optLateStructVal", -27); + FIELD_METADATA.put(-27, OPT_LATE_STRUCT_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optStructVal", -26); + THRIFT_NAMES_TO_IDS.put("optStructVal", -26); + FIELD_METADATA.put(-26, OPT_STRUCT_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optEnumVal", -25); + THRIFT_NAMES_TO_IDS.put("optEnumVal", -25); + FIELD_METADATA.put(-25, OPT_ENUM_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optBinaryVal", -24); + THRIFT_NAMES_TO_IDS.put("optBinaryVal", -24); + FIELD_METADATA.put(-24, OPT_BINARY_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optStringVal", -23); + THRIFT_NAMES_TO_IDS.put("optStringVal", -23); + FIELD_METADATA.put(-23, OPT_STRING_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optDoubleVal", -22); + THRIFT_NAMES_TO_IDS.put("optDoubleVal", -22); + FIELD_METADATA.put(-22, OPT_DOUBLE_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optFloatVal", -21); + THRIFT_NAMES_TO_IDS.put("optFloatVal", -21); + FIELD_METADATA.put(-21, OPT_FLOAT_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optI64Val", -20); + THRIFT_NAMES_TO_IDS.put("optI64Val", -20); + FIELD_METADATA.put(-20, OPT_I64_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optI32Val", -19); + THRIFT_NAMES_TO_IDS.put("optI32Val", -19); + FIELD_METADATA.put(-19, OPT_I32_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optI16Val", -18); + THRIFT_NAMES_TO_IDS.put("optI16Val", -18); + FIELD_METADATA.put(-18, OPT_I16_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optByteVal", -17); + THRIFT_NAMES_TO_IDS.put("optByteVal", -17); + FIELD_METADATA.put(-17, OPT_BYTE_VAL_FIELD_DESC); + NAMES_TO_IDS.put("optBoolVal", -16); + THRIFT_NAMES_TO_IDS.put("optBoolVal", -16); + FIELD_METADATA.put(-16, OPT_BOOL_VAL_FIELD_DESC); + NAMES_TO_IDS.put("timeVal", -15); + THRIFT_NAMES_TO_IDS.put("timeVal", -15); + FIELD_METADATA.put(-15, TIME_VAL_FIELD_DESC); + NAMES_TO_IDS.put("durationVal", -14); + THRIFT_NAMES_TO_IDS.put("durationVal", -14); + FIELD_METADATA.put(-14, DURATION_VAL_FIELD_DESC); + NAMES_TO_IDS.put("lateStructVal", -13); + THRIFT_NAMES_TO_IDS.put("lateStructVal", -13); + FIELD_METADATA.put(-13, LATE_STRUCT_VAL_FIELD_DESC); + NAMES_TO_IDS.put("unionVal", -12); + THRIFT_NAMES_TO_IDS.put("unionVal", -12); + FIELD_METADATA.put(-12, UNION_VAL_FIELD_DESC); + NAMES_TO_IDS.put("structVal", -11); + THRIFT_NAMES_TO_IDS.put("structVal", -11); + FIELD_METADATA.put(-11, STRUCT_VAL_FIELD_DESC); + NAMES_TO_IDS.put("enumVal", -10); + THRIFT_NAMES_TO_IDS.put("enumVal", -10); + FIELD_METADATA.put(-10, ENUM_VAL_FIELD_DESC); + NAMES_TO_IDS.put("binaryVal", -9); + THRIFT_NAMES_TO_IDS.put("binaryVal", -9); + FIELD_METADATA.put(-9, BINARY_VAL_FIELD_DESC); + NAMES_TO_IDS.put("stringVal", -8); + THRIFT_NAMES_TO_IDS.put("stringVal", -8); + FIELD_METADATA.put(-8, STRING_VAL_FIELD_DESC); + NAMES_TO_IDS.put("doubleVal", -7); + THRIFT_NAMES_TO_IDS.put("doubleVal", -7); + FIELD_METADATA.put(-7, DOUBLE_VAL_FIELD_DESC); + NAMES_TO_IDS.put("floatVal", -6); + THRIFT_NAMES_TO_IDS.put("floatVal", -6); + FIELD_METADATA.put(-6, FLOAT_VAL_FIELD_DESC); + NAMES_TO_IDS.put("i64Val", -5); + THRIFT_NAMES_TO_IDS.put("i64Val", -5); + FIELD_METADATA.put(-5, I64_VAL_FIELD_DESC); + NAMES_TO_IDS.put("i32Val", -4); + THRIFT_NAMES_TO_IDS.put("i32Val", -4); + FIELD_METADATA.put(-4, I32_VAL_FIELD_DESC); + NAMES_TO_IDS.put("i16Val", -3); + THRIFT_NAMES_TO_IDS.put("i16Val", -3); + FIELD_METADATA.put(-3, I16_VAL_FIELD_DESC); + NAMES_TO_IDS.put("byteVal", -2); + THRIFT_NAMES_TO_IDS.put("byteVal", -2); + FIELD_METADATA.put(-2, BYTE_VAL_FIELD_DESC); + NAMES_TO_IDS.put("boolVal", -1); + THRIFT_NAMES_TO_IDS.put("boolVal", -1); + FIELD_METADATA.put(-1, BOOL_VAL_FIELD_DESC); com.facebook.thrift.type.TypeRegistry.add(new com.facebook.thrift.type.Type( new com.facebook.thrift.type.UniversalName("test.dev/fixtures/patch/MyStructFieldPatch"), MyStructFieldPatch.class, MyStructFieldPatch::read0)); } @Nullable - @com.facebook.swift.codec.ThriftField(value=-1, name="boolVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.BoolPatch getBoolVal() { return boolVal; } - - - @Nullable - @com.facebook.swift.codec.ThriftField(value=-2, name="byteVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.BytePatch getByteVal() { return byteVal; } + @com.facebook.swift.codec.ThriftField(value=-30, name="optMapVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.MyStructFieldN30Patch getOptMapVal() { return optMapVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-3, name="i16Val", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.I16Patch getI16Val() { return i16Val; } + @com.facebook.swift.codec.ThriftField(value=-29, name="optSetVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.MyStructFieldN29Patch getOptSetVal() { return optSetVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-4, name="i32Val", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.I32Patch getI32Val() { return i32Val; } + @com.facebook.swift.codec.ThriftField(value=-28, name="optListVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.MyStructFieldN28Patch getOptListVal() { return optListVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-5, name="i64Val", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.I64Patch getI64Val() { return i64Val; } + @com.facebook.swift.codec.ThriftField(value=-27, name="optLateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.LateDefStructPatch getOptLateStructVal() { return optLateStructVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-6, name="floatVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.FloatPatch getFloatVal() { return floatVal; } + @com.facebook.swift.codec.ThriftField(value=-26, name="optStructVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.MyDataPatch getOptStructVal() { return optStructVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-7, name="doubleVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.DoublePatch getDoubleVal() { return doubleVal; } + @com.facebook.swift.codec.ThriftField(value=-25, name="optEnumVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.MyStructFieldN25Patch getOptEnumVal() { return optEnumVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-8, name="stringVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.StringPatch getStringVal() { return stringVal; } + @com.facebook.swift.codec.ThriftField(value=-24, name="optBinaryVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.BinaryPatch getOptBinaryVal() { return optBinaryVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-9, name="binaryVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.BinaryPatch getBinaryVal() { return binaryVal; } + @com.facebook.swift.codec.ThriftField(value=-23, name="optStringVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.StringPatch getOptStringVal() { return optStringVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-10, name="enumVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.MyStructFieldN10Patch getEnumVal() { return enumVal; } + @com.facebook.swift.codec.ThriftField(value=-22, name="optDoubleVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.DoublePatch getOptDoubleVal() { return optDoubleVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-11, name="structVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.MyDataPatch getStructVal() { return structVal; } + @com.facebook.swift.codec.ThriftField(value=-21, name="optFloatVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.FloatPatch getOptFloatVal() { return optFloatVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-12, name="unionVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.MyUnionPatch getUnionVal() { return unionVal; } + @com.facebook.swift.codec.ThriftField(value=-20, name="optI64Val", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.I64Patch getOptI64Val() { return optI64Val; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-13, name="lateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.LateDefStructPatch getLateStructVal() { return lateStructVal; } + @com.facebook.swift.codec.ThriftField(value=-19, name="optI32Val", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.I32Patch getOptI32Val() { return optI32Val; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-14, name="durationVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.DurationPatch getDurationVal() { return durationVal; } + @com.facebook.swift.codec.ThriftField(value=-18, name="optI16Val", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.I16Patch getOptI16Val() { return optI16Val; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-15, name="timeVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.TimePatch getTimeVal() { return timeVal; } + @com.facebook.swift.codec.ThriftField(value=-17, name="optByteVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.BytePatch getOptByteVal() { return optByteVal; } @Nullable @@ -738,107 +733,112 @@ public final class MyStructFieldPatch implements com.facebook.thrift.payload.Thr @Nullable - @com.facebook.swift.codec.ThriftField(value=-17, name="optByteVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.BytePatch getOptByteVal() { return optByteVal; } - - - @Nullable - @com.facebook.swift.codec.ThriftField(value=-18, name="optI16Val", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.I16Patch getOptI16Val() { return optI16Val; } + @com.facebook.swift.codec.ThriftField(value=-15, name="timeVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.TimePatch getTimeVal() { return timeVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-19, name="optI32Val", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.I32Patch getOptI32Val() { return optI32Val; } + @com.facebook.swift.codec.ThriftField(value=-14, name="durationVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.DurationPatch getDurationVal() { return durationVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-20, name="optI64Val", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.I64Patch getOptI64Val() { return optI64Val; } + @com.facebook.swift.codec.ThriftField(value=-13, name="lateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.LateDefStructPatch getLateStructVal() { return lateStructVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-21, name="optFloatVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.FloatPatch getOptFloatVal() { return optFloatVal; } + @com.facebook.swift.codec.ThriftField(value=-12, name="unionVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.MyUnionPatch getUnionVal() { return unionVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-22, name="optDoubleVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.DoublePatch getOptDoubleVal() { return optDoubleVal; } + @com.facebook.swift.codec.ThriftField(value=-11, name="structVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.MyDataPatch getStructVal() { return structVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-23, name="optStringVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.StringPatch getOptStringVal() { return optStringVal; } + @com.facebook.swift.codec.ThriftField(value=-10, name="enumVal", isLegacyId=true, requiredness=Requiredness.NONE) + public test.fixtures.patch.MyStructFieldN10Patch getEnumVal() { return enumVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-24, name="optBinaryVal", isLegacyId=true, requiredness=Requiredness.NONE) - public com.facebook.thrift.op.BinaryPatch getOptBinaryVal() { return optBinaryVal; } + @com.facebook.swift.codec.ThriftField(value=-9, name="binaryVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.BinaryPatch getBinaryVal() { return binaryVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-25, name="optEnumVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.MyStructFieldN25Patch getOptEnumVal() { return optEnumVal; } + @com.facebook.swift.codec.ThriftField(value=-8, name="stringVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.StringPatch getStringVal() { return stringVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-26, name="optStructVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.MyDataPatch getOptStructVal() { return optStructVal; } + @com.facebook.swift.codec.ThriftField(value=-7, name="doubleVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.DoublePatch getDoubleVal() { return doubleVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-27, name="optLateStructVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.LateDefStructPatch getOptLateStructVal() { return optLateStructVal; } + @com.facebook.swift.codec.ThriftField(value=-6, name="floatVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.FloatPatch getFloatVal() { return floatVal; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-28, name="optListVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.MyStructFieldN28Patch getOptListVal() { return optListVal; } + @com.facebook.swift.codec.ThriftField(value=-5, name="i64Val", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.I64Patch getI64Val() { return i64Val; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-29, name="optSetVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.MyStructFieldN29Patch getOptSetVal() { return optSetVal; } + @com.facebook.swift.codec.ThriftField(value=-4, name="i32Val", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.I32Patch getI32Val() { return i32Val; } @Nullable - @com.facebook.swift.codec.ThriftField(value=-30, name="optMapVal", isLegacyId=true, requiredness=Requiredness.NONE) - public test.fixtures.patch.MyStructFieldN30Patch getOptMapVal() { return optMapVal; } + @com.facebook.swift.codec.ThriftField(value=-3, name="i16Val", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.I16Patch getI16Val() { return i16Val; } - @java.lang.Override - public String toString() { - ToStringHelper helper = toStringHelper(this); - helper.add("boolVal", boolVal); - helper.add("byteVal", byteVal); - helper.add("i16Val", i16Val); - helper.add("i32Val", i32Val); - helper.add("i64Val", i64Val); - helper.add("floatVal", floatVal); - helper.add("doubleVal", doubleVal); - helper.add("stringVal", stringVal); - helper.add("binaryVal", binaryVal); - helper.add("enumVal", enumVal); - helper.add("structVal", structVal); - helper.add("unionVal", unionVal); - helper.add("lateStructVal", lateStructVal); - helper.add("durationVal", durationVal); - helper.add("timeVal", timeVal); - helper.add("optBoolVal", optBoolVal); - helper.add("optByteVal", optByteVal); - helper.add("optI16Val", optI16Val); - helper.add("optI32Val", optI32Val); - helper.add("optI64Val", optI64Val); - helper.add("optFloatVal", optFloatVal); - helper.add("optDoubleVal", optDoubleVal); - helper.add("optStringVal", optStringVal); - helper.add("optBinaryVal", optBinaryVal); - helper.add("optEnumVal", optEnumVal); - helper.add("optStructVal", optStructVal); - helper.add("optLateStructVal", optLateStructVal); - helper.add("optListVal", optListVal); - helper.add("optSetVal", optSetVal); + + @Nullable + @com.facebook.swift.codec.ThriftField(value=-2, name="byteVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.BytePatch getByteVal() { return byteVal; } + + + @Nullable + @com.facebook.swift.codec.ThriftField(value=-1, name="boolVal", isLegacyId=true, requiredness=Requiredness.NONE) + public com.facebook.thrift.op.BoolPatch getBoolVal() { return boolVal; } + + @java.lang.Override + public String toString() { + ToStringHelper helper = toStringHelper(this); helper.add("optMapVal", optMapVal); + helper.add("optSetVal", optSetVal); + helper.add("optListVal", optListVal); + helper.add("optLateStructVal", optLateStructVal); + helper.add("optStructVal", optStructVal); + helper.add("optEnumVal", optEnumVal); + helper.add("optBinaryVal", optBinaryVal); + helper.add("optStringVal", optStringVal); + helper.add("optDoubleVal", optDoubleVal); + helper.add("optFloatVal", optFloatVal); + helper.add("optI64Val", optI64Val); + helper.add("optI32Val", optI32Val); + helper.add("optI16Val", optI16Val); + helper.add("optByteVal", optByteVal); + helper.add("optBoolVal", optBoolVal); + helper.add("timeVal", timeVal); + helper.add("durationVal", durationVal); + helper.add("lateStructVal", lateStructVal); + helper.add("unionVal", unionVal); + helper.add("structVal", structVal); + helper.add("enumVal", enumVal); + helper.add("binaryVal", binaryVal); + helper.add("stringVal", stringVal); + helper.add("doubleVal", doubleVal); + helper.add("floatVal", floatVal); + helper.add("i64Val", i64Val); + helper.add("i32Val", i32Val); + helper.add("i16Val", i16Val); + helper.add("byteVal", byteVal); + helper.add("boolVal", boolVal); return helper.toString(); } @@ -854,72 +854,72 @@ public final class MyStructFieldPatch implements com.facebook.thrift.payload.Thr MyStructFieldPatch other = (MyStructFieldPatch)o; return - Objects.equals(boolVal, other.boolVal) && - Objects.equals(byteVal, other.byteVal) && - Objects.equals(i16Val, other.i16Val) && - Objects.equals(i32Val, other.i32Val) && - Objects.equals(i64Val, other.i64Val) && - Objects.equals(floatVal, other.floatVal) && - Objects.equals(doubleVal, other.doubleVal) && - Objects.equals(stringVal, other.stringVal) && - Objects.equals(binaryVal, other.binaryVal) && - Objects.equals(enumVal, other.enumVal) && - Objects.equals(structVal, other.structVal) && - Objects.equals(unionVal, other.unionVal) && - Objects.equals(lateStructVal, other.lateStructVal) && - Objects.equals(durationVal, other.durationVal) && - Objects.equals(timeVal, other.timeVal) && - Objects.equals(optBoolVal, other.optBoolVal) && - Objects.equals(optByteVal, other.optByteVal) && - Objects.equals(optI16Val, other.optI16Val) && - Objects.equals(optI32Val, other.optI32Val) && - Objects.equals(optI64Val, other.optI64Val) && - Objects.equals(optFloatVal, other.optFloatVal) && - Objects.equals(optDoubleVal, other.optDoubleVal) && - Objects.equals(optStringVal, other.optStringVal) && - Objects.equals(optBinaryVal, other.optBinaryVal) && - Objects.equals(optEnumVal, other.optEnumVal) && - Objects.equals(optStructVal, other.optStructVal) && - Objects.equals(optLateStructVal, other.optLateStructVal) && - Objects.equals(optListVal, other.optListVal) && - Objects.equals(optSetVal, other.optSetVal) && Objects.equals(optMapVal, other.optMapVal) && + Objects.equals(optSetVal, other.optSetVal) && + Objects.equals(optListVal, other.optListVal) && + Objects.equals(optLateStructVal, other.optLateStructVal) && + Objects.equals(optStructVal, other.optStructVal) && + Objects.equals(optEnumVal, other.optEnumVal) && + Objects.equals(optBinaryVal, other.optBinaryVal) && + Objects.equals(optStringVal, other.optStringVal) && + Objects.equals(optDoubleVal, other.optDoubleVal) && + Objects.equals(optFloatVal, other.optFloatVal) && + Objects.equals(optI64Val, other.optI64Val) && + Objects.equals(optI32Val, other.optI32Val) && + Objects.equals(optI16Val, other.optI16Val) && + Objects.equals(optByteVal, other.optByteVal) && + Objects.equals(optBoolVal, other.optBoolVal) && + Objects.equals(timeVal, other.timeVal) && + Objects.equals(durationVal, other.durationVal) && + Objects.equals(lateStructVal, other.lateStructVal) && + Objects.equals(unionVal, other.unionVal) && + Objects.equals(structVal, other.structVal) && + Objects.equals(enumVal, other.enumVal) && + Objects.equals(binaryVal, other.binaryVal) && + Objects.equals(stringVal, other.stringVal) && + Objects.equals(doubleVal, other.doubleVal) && + Objects.equals(floatVal, other.floatVal) && + Objects.equals(i64Val, other.i64Val) && + Objects.equals(i32Val, other.i32Val) && + Objects.equals(i16Val, other.i16Val) && + Objects.equals(byteVal, other.byteVal) && + Objects.equals(boolVal, other.boolVal) && true; } @java.lang.Override public int hashCode() { return Arrays.deepHashCode(new java.lang.Object[] { - boolVal, - byteVal, - i16Val, - i32Val, - i64Val, - floatVal, - doubleVal, - stringVal, - binaryVal, - enumVal, - structVal, - unionVal, - lateStructVal, - durationVal, - timeVal, - optBoolVal, - optByteVal, - optI16Val, - optI32Val, - optI64Val, - optFloatVal, - optDoubleVal, - optStringVal, - optBinaryVal, - optEnumVal, - optStructVal, - optLateStructVal, - optListVal, + optMapVal, optSetVal, - optMapVal + optListVal, + optLateStructVal, + optStructVal, + optEnumVal, + optBinaryVal, + optStringVal, + optDoubleVal, + optFloatVal, + optI64Val, + optI32Val, + optI16Val, + optByteVal, + optBoolVal, + timeVal, + durationVal, + lateStructVal, + unionVal, + structVal, + enumVal, + binaryVal, + stringVal, + doubleVal, + floatVal, + i64Val, + i32Val, + i16Val, + byteVal, + boolVal }); } @@ -936,242 +936,242 @@ public final class MyStructFieldPatch implements com.facebook.thrift.payload.Thr __field = oprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { - case _BOOLVAL: + case _OPTMAPVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.BoolPatch boolVal = com.facebook.thrift.op.BoolPatch.read0(oprot); - builder.setBoolVal(boolVal); + test.fixtures.patch.MyStructFieldN30Patch optMapVal = test.fixtures.patch.MyStructFieldN30Patch.read0(oprot); + builder.setOptMapVal(optMapVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _BYTEVAL: + case _OPTSETVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.BytePatch byteVal = com.facebook.thrift.op.BytePatch.read0(oprot); - builder.setByteVal(byteVal); + test.fixtures.patch.MyStructFieldN29Patch optSetVal = test.fixtures.patch.MyStructFieldN29Patch.read0(oprot); + builder.setOptSetVal(optSetVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _I16VAL: + case _OPTLISTVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.I16Patch i16Val = com.facebook.thrift.op.I16Patch.read0(oprot); - builder.setI16Val(i16Val); + test.fixtures.patch.MyStructFieldN28Patch optListVal = test.fixtures.patch.MyStructFieldN28Patch.read0(oprot); + builder.setOptListVal(optListVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _I32VAL: + case _OPTLATESTRUCTVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.I32Patch i32Val = com.facebook.thrift.op.I32Patch.read0(oprot); - builder.setI32Val(i32Val); + test.fixtures.patch.LateDefStructPatch optLateStructVal = test.fixtures.patch.LateDefStructPatch.read0(oprot); + builder.setOptLateStructVal(optLateStructVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _I64VAL: + case _OPTSTRUCTVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.I64Patch i64Val = com.facebook.thrift.op.I64Patch.read0(oprot); - builder.setI64Val(i64Val); + test.fixtures.patch.MyDataPatch optStructVal = test.fixtures.patch.MyDataPatch.read0(oprot); + builder.setOptStructVal(optStructVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _FLOATVAL: + case _OPTENUMVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.FloatPatch floatVal = com.facebook.thrift.op.FloatPatch.read0(oprot); - builder.setFloatVal(floatVal); + test.fixtures.patch.MyStructFieldN25Patch optEnumVal = test.fixtures.patch.MyStructFieldN25Patch.read0(oprot); + builder.setOptEnumVal(optEnumVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _DOUBLEVAL: + case _OPTBINARYVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.DoublePatch doubleVal = com.facebook.thrift.op.DoublePatch.read0(oprot); - builder.setDoubleVal(doubleVal); + com.facebook.thrift.op.BinaryPatch optBinaryVal = com.facebook.thrift.op.BinaryPatch.read0(oprot); + builder.setOptBinaryVal(optBinaryVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _STRINGVAL: + case _OPTSTRINGVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.StringPatch stringVal = com.facebook.thrift.op.StringPatch.read0(oprot); - builder.setStringVal(stringVal); + com.facebook.thrift.op.StringPatch optStringVal = com.facebook.thrift.op.StringPatch.read0(oprot); + builder.setOptStringVal(optStringVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _BINARYVAL: + case _OPTDOUBLEVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.BinaryPatch binaryVal = com.facebook.thrift.op.BinaryPatch.read0(oprot); - builder.setBinaryVal(binaryVal); + com.facebook.thrift.op.DoublePatch optDoubleVal = com.facebook.thrift.op.DoublePatch.read0(oprot); + builder.setOptDoubleVal(optDoubleVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _ENUMVAL: + case _OPTFLOATVAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.MyStructFieldN10Patch enumVal = test.fixtures.patch.MyStructFieldN10Patch.read0(oprot); - builder.setEnumVal(enumVal); + com.facebook.thrift.op.FloatPatch optFloatVal = com.facebook.thrift.op.FloatPatch.read0(oprot); + builder.setOptFloatVal(optFloatVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _STRUCTVAL: + case _OPTI64VAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.MyDataPatch structVal = test.fixtures.patch.MyDataPatch.read0(oprot); - builder.setStructVal(structVal); + com.facebook.thrift.op.I64Patch optI64Val = com.facebook.thrift.op.I64Patch.read0(oprot); + builder.setOptI64Val(optI64Val); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _UNIONVAL: + case _OPTI32VAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.MyUnionPatch unionVal = test.fixtures.patch.MyUnionPatch.read0(oprot); - builder.setUnionVal(unionVal); + com.facebook.thrift.op.I32Patch optI32Val = com.facebook.thrift.op.I32Patch.read0(oprot); + builder.setOptI32Val(optI32Val); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _LATESTRUCTVAL: + case _OPTI16VAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.LateDefStructPatch lateStructVal = test.fixtures.patch.LateDefStructPatch.read0(oprot); - builder.setLateStructVal(lateStructVal); + com.facebook.thrift.op.I16Patch optI16Val = com.facebook.thrift.op.I16Patch.read0(oprot); + builder.setOptI16Val(optI16Val); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _DURATIONVAL: + case _OPTBYTEVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.DurationPatch durationVal = com.facebook.thrift.op.DurationPatch.read0(oprot); - builder.setDurationVal(durationVal); + com.facebook.thrift.op.BytePatch optByteVal = com.facebook.thrift.op.BytePatch.read0(oprot); + builder.setOptByteVal(optByteVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _TIMEVAL: + case _OPTBOOLVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.TimePatch timeVal = com.facebook.thrift.op.TimePatch.read0(oprot); - builder.setTimeVal(timeVal); + com.facebook.thrift.op.BoolPatch optBoolVal = com.facebook.thrift.op.BoolPatch.read0(oprot); + builder.setOptBoolVal(optBoolVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTBOOLVAL: + case _TIMEVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.BoolPatch optBoolVal = com.facebook.thrift.op.BoolPatch.read0(oprot); - builder.setOptBoolVal(optBoolVal); + com.facebook.thrift.op.TimePatch timeVal = com.facebook.thrift.op.TimePatch.read0(oprot); + builder.setTimeVal(timeVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTBYTEVAL: + case _DURATIONVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.BytePatch optByteVal = com.facebook.thrift.op.BytePatch.read0(oprot); - builder.setOptByteVal(optByteVal); + com.facebook.thrift.op.DurationPatch durationVal = com.facebook.thrift.op.DurationPatch.read0(oprot); + builder.setDurationVal(durationVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTI16VAL: + case _LATESTRUCTVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.I16Patch optI16Val = com.facebook.thrift.op.I16Patch.read0(oprot); - builder.setOptI16Val(optI16Val); + test.fixtures.patch.LateDefStructPatch lateStructVal = test.fixtures.patch.LateDefStructPatch.read0(oprot); + builder.setLateStructVal(lateStructVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTI32VAL: + case _UNIONVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.I32Patch optI32Val = com.facebook.thrift.op.I32Patch.read0(oprot); - builder.setOptI32Val(optI32Val); + test.fixtures.patch.MyUnionPatch unionVal = test.fixtures.patch.MyUnionPatch.read0(oprot); + builder.setUnionVal(unionVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTI64VAL: + case _STRUCTVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.I64Patch optI64Val = com.facebook.thrift.op.I64Patch.read0(oprot); - builder.setOptI64Val(optI64Val); + test.fixtures.patch.MyDataPatch structVal = test.fixtures.patch.MyDataPatch.read0(oprot); + builder.setStructVal(structVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTFLOATVAL: + case _ENUMVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.FloatPatch optFloatVal = com.facebook.thrift.op.FloatPatch.read0(oprot); - builder.setOptFloatVal(optFloatVal); + test.fixtures.patch.MyStructFieldN10Patch enumVal = test.fixtures.patch.MyStructFieldN10Patch.read0(oprot); + builder.setEnumVal(enumVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTDOUBLEVAL: + case _BINARYVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.DoublePatch optDoubleVal = com.facebook.thrift.op.DoublePatch.read0(oprot); - builder.setOptDoubleVal(optDoubleVal); + com.facebook.thrift.op.BinaryPatch binaryVal = com.facebook.thrift.op.BinaryPatch.read0(oprot); + builder.setBinaryVal(binaryVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTSTRINGVAL: + case _STRINGVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.StringPatch optStringVal = com.facebook.thrift.op.StringPatch.read0(oprot); - builder.setOptStringVal(optStringVal); + com.facebook.thrift.op.StringPatch stringVal = com.facebook.thrift.op.StringPatch.read0(oprot); + builder.setStringVal(stringVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTBINARYVAL: + case _DOUBLEVAL: if (__field.type == TType.STRUCT) { - com.facebook.thrift.op.BinaryPatch optBinaryVal = com.facebook.thrift.op.BinaryPatch.read0(oprot); - builder.setOptBinaryVal(optBinaryVal); + com.facebook.thrift.op.DoublePatch doubleVal = com.facebook.thrift.op.DoublePatch.read0(oprot); + builder.setDoubleVal(doubleVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTENUMVAL: + case _FLOATVAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.MyStructFieldN25Patch optEnumVal = test.fixtures.patch.MyStructFieldN25Patch.read0(oprot); - builder.setOptEnumVal(optEnumVal); + com.facebook.thrift.op.FloatPatch floatVal = com.facebook.thrift.op.FloatPatch.read0(oprot); + builder.setFloatVal(floatVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTSTRUCTVAL: + case _I64VAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.MyDataPatch optStructVal = test.fixtures.patch.MyDataPatch.read0(oprot); - builder.setOptStructVal(optStructVal); + com.facebook.thrift.op.I64Patch i64Val = com.facebook.thrift.op.I64Patch.read0(oprot); + builder.setI64Val(i64Val); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTLATESTRUCTVAL: + case _I32VAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.LateDefStructPatch optLateStructVal = test.fixtures.patch.LateDefStructPatch.read0(oprot); - builder.setOptLateStructVal(optLateStructVal); + com.facebook.thrift.op.I32Patch i32Val = com.facebook.thrift.op.I32Patch.read0(oprot); + builder.setI32Val(i32Val); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTLISTVAL: + case _I16VAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.MyStructFieldN28Patch optListVal = test.fixtures.patch.MyStructFieldN28Patch.read0(oprot); - builder.setOptListVal(optListVal); + com.facebook.thrift.op.I16Patch i16Val = com.facebook.thrift.op.I16Patch.read0(oprot); + builder.setI16Val(i16Val); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTSETVAL: + case _BYTEVAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.MyStructFieldN29Patch optSetVal = test.fixtures.patch.MyStructFieldN29Patch.read0(oprot); - builder.setOptSetVal(optSetVal); + com.facebook.thrift.op.BytePatch byteVal = com.facebook.thrift.op.BytePatch.read0(oprot); + builder.setByteVal(byteVal); } else { TProtocolUtil.skip(oprot, __field.type); } break; - case _OPTMAPVAL: + case _BOOLVAL: if (__field.type == TType.STRUCT) { - test.fixtures.patch.MyStructFieldN30Patch optMapVal = test.fixtures.patch.MyStructFieldN30Patch.read0(oprot); - builder.setOptMapVal(optMapVal); + com.facebook.thrift.op.BoolPatch boolVal = com.facebook.thrift.op.BoolPatch.read0(oprot); + builder.setBoolVal(boolVal); } else { TProtocolUtil.skip(oprot, __field.type); } @@ -1188,79 +1188,74 @@ public final class MyStructFieldPatch implements com.facebook.thrift.payload.Thr public void write0(TProtocol oprot) throws TException { oprot.writeStructBegin(STRUCT_DESC); - if (boolVal != null) { - oprot.writeFieldBegin(BOOL_VAL_FIELD_DESC); - this.boolVal.write0(oprot); - oprot.writeFieldEnd(); - } - if (byteVal != null) { - oprot.writeFieldBegin(BYTE_VAL_FIELD_DESC); - this.byteVal.write0(oprot); + if (optMapVal != null) { + oprot.writeFieldBegin(OPT_MAP_VAL_FIELD_DESC); + this.optMapVal.write0(oprot); oprot.writeFieldEnd(); } - if (i16Val != null) { - oprot.writeFieldBegin(I16_VAL_FIELD_DESC); - this.i16Val.write0(oprot); + if (optSetVal != null) { + oprot.writeFieldBegin(OPT_SET_VAL_FIELD_DESC); + this.optSetVal.write0(oprot); oprot.writeFieldEnd(); } - if (i32Val != null) { - oprot.writeFieldBegin(I32_VAL_FIELD_DESC); - this.i32Val.write0(oprot); + if (optListVal != null) { + oprot.writeFieldBegin(OPT_LIST_VAL_FIELD_DESC); + this.optListVal.write0(oprot); oprot.writeFieldEnd(); } - if (i64Val != null) { - oprot.writeFieldBegin(I64_VAL_FIELD_DESC); - this.i64Val.write0(oprot); + if (optLateStructVal != null) { + oprot.writeFieldBegin(OPT_LATE_STRUCT_VAL_FIELD_DESC); + this.optLateStructVal.write0(oprot); oprot.writeFieldEnd(); } - if (floatVal != null) { - oprot.writeFieldBegin(FLOAT_VAL_FIELD_DESC); - this.floatVal.write0(oprot); + if (optStructVal != null) { + oprot.writeFieldBegin(OPT_STRUCT_VAL_FIELD_DESC); + this.optStructVal.write0(oprot); oprot.writeFieldEnd(); } - if (doubleVal != null) { - oprot.writeFieldBegin(DOUBLE_VAL_FIELD_DESC); - this.doubleVal.write0(oprot); + if (optEnumVal != null) { + oprot.writeFieldBegin(OPT_ENUM_VAL_FIELD_DESC); + this.optEnumVal.write0(oprot); oprot.writeFieldEnd(); } - if (stringVal != null) { - oprot.writeFieldBegin(STRING_VAL_FIELD_DESC); - this.stringVal.write0(oprot); + if (optBinaryVal != null) { + oprot.writeFieldBegin(OPT_BINARY_VAL_FIELD_DESC); + this.optBinaryVal.write0(oprot); oprot.writeFieldEnd(); } - if (binaryVal != null) { - oprot.writeFieldBegin(BINARY_VAL_FIELD_DESC); - this.binaryVal.write0(oprot); + if (optStringVal != null) { + oprot.writeFieldBegin(OPT_STRING_VAL_FIELD_DESC); + this.optStringVal.write0(oprot); oprot.writeFieldEnd(); } - if (enumVal != null) { - oprot.writeFieldBegin(ENUM_VAL_FIELD_DESC); - this.enumVal.write0(oprot); + if (optDoubleVal != null) { + oprot.writeFieldBegin(OPT_DOUBLE_VAL_FIELD_DESC); + this.optDoubleVal.write0(oprot); oprot.writeFieldEnd(); } - if (structVal != null) { - oprot.writeFieldBegin(STRUCT_VAL_FIELD_DESC); - this.structVal.write0(oprot); + if (optFloatVal != null) { + oprot.writeFieldBegin(OPT_FLOAT_VAL_FIELD_DESC); + this.optFloatVal.write0(oprot); oprot.writeFieldEnd(); } - if (unionVal != null) { - oprot.writeFieldBegin(UNION_VAL_FIELD_DESC); - this.unionVal.write0(oprot); + if (optI64Val != null) { + oprot.writeFieldBegin(OPT_I64_VAL_FIELD_DESC); + this.optI64Val.write0(oprot); oprot.writeFieldEnd(); } - if (lateStructVal != null) { - oprot.writeFieldBegin(LATE_STRUCT_VAL_FIELD_DESC); - this.lateStructVal.write0(oprot); + if (optI32Val != null) { + oprot.writeFieldBegin(OPT_I32_VAL_FIELD_DESC); + this.optI32Val.write0(oprot); oprot.writeFieldEnd(); } - if (durationVal != null) { - oprot.writeFieldBegin(DURATION_VAL_FIELD_DESC); - this.durationVal.write0(oprot); + if (optI16Val != null) { + oprot.writeFieldBegin(OPT_I16_VAL_FIELD_DESC); + this.optI16Val.write0(oprot); oprot.writeFieldEnd(); } - if (timeVal != null) { - oprot.writeFieldBegin(TIME_VAL_FIELD_DESC); - this.timeVal.write0(oprot); + if (optByteVal != null) { + oprot.writeFieldBegin(OPT_BYTE_VAL_FIELD_DESC); + this.optByteVal.write0(oprot); oprot.writeFieldEnd(); } if (optBoolVal != null) { @@ -1268,74 +1263,79 @@ public final class MyStructFieldPatch implements com.facebook.thrift.payload.Thr this.optBoolVal.write0(oprot); oprot.writeFieldEnd(); } - if (optByteVal != null) { - oprot.writeFieldBegin(OPT_BYTE_VAL_FIELD_DESC); - this.optByteVal.write0(oprot); + if (timeVal != null) { + oprot.writeFieldBegin(TIME_VAL_FIELD_DESC); + this.timeVal.write0(oprot); oprot.writeFieldEnd(); } - if (optI16Val != null) { - oprot.writeFieldBegin(OPT_I16_VAL_FIELD_DESC); - this.optI16Val.write0(oprot); + if (durationVal != null) { + oprot.writeFieldBegin(DURATION_VAL_FIELD_DESC); + this.durationVal.write0(oprot); oprot.writeFieldEnd(); } - if (optI32Val != null) { - oprot.writeFieldBegin(OPT_I32_VAL_FIELD_DESC); - this.optI32Val.write0(oprot); + if (lateStructVal != null) { + oprot.writeFieldBegin(LATE_STRUCT_VAL_FIELD_DESC); + this.lateStructVal.write0(oprot); oprot.writeFieldEnd(); } - if (optI64Val != null) { - oprot.writeFieldBegin(OPT_I64_VAL_FIELD_DESC); - this.optI64Val.write0(oprot); + if (unionVal != null) { + oprot.writeFieldBegin(UNION_VAL_FIELD_DESC); + this.unionVal.write0(oprot); oprot.writeFieldEnd(); } - if (optFloatVal != null) { - oprot.writeFieldBegin(OPT_FLOAT_VAL_FIELD_DESC); - this.optFloatVal.write0(oprot); + if (structVal != null) { + oprot.writeFieldBegin(STRUCT_VAL_FIELD_DESC); + this.structVal.write0(oprot); oprot.writeFieldEnd(); } - if (optDoubleVal != null) { - oprot.writeFieldBegin(OPT_DOUBLE_VAL_FIELD_DESC); - this.optDoubleVal.write0(oprot); + if (enumVal != null) { + oprot.writeFieldBegin(ENUM_VAL_FIELD_DESC); + this.enumVal.write0(oprot); oprot.writeFieldEnd(); } - if (optStringVal != null) { - oprot.writeFieldBegin(OPT_STRING_VAL_FIELD_DESC); - this.optStringVal.write0(oprot); + if (binaryVal != null) { + oprot.writeFieldBegin(BINARY_VAL_FIELD_DESC); + this.binaryVal.write0(oprot); oprot.writeFieldEnd(); } - if (optBinaryVal != null) { - oprot.writeFieldBegin(OPT_BINARY_VAL_FIELD_DESC); - this.optBinaryVal.write0(oprot); + if (stringVal != null) { + oprot.writeFieldBegin(STRING_VAL_FIELD_DESC); + this.stringVal.write0(oprot); oprot.writeFieldEnd(); } - if (optEnumVal != null) { - oprot.writeFieldBegin(OPT_ENUM_VAL_FIELD_DESC); - this.optEnumVal.write0(oprot); + if (doubleVal != null) { + oprot.writeFieldBegin(DOUBLE_VAL_FIELD_DESC); + this.doubleVal.write0(oprot); oprot.writeFieldEnd(); } - if (optStructVal != null) { - oprot.writeFieldBegin(OPT_STRUCT_VAL_FIELD_DESC); - this.optStructVal.write0(oprot); + if (floatVal != null) { + oprot.writeFieldBegin(FLOAT_VAL_FIELD_DESC); + this.floatVal.write0(oprot); oprot.writeFieldEnd(); } - if (optLateStructVal != null) { - oprot.writeFieldBegin(OPT_LATE_STRUCT_VAL_FIELD_DESC); - this.optLateStructVal.write0(oprot); + if (i64Val != null) { + oprot.writeFieldBegin(I64_VAL_FIELD_DESC); + this.i64Val.write0(oprot); oprot.writeFieldEnd(); } - if (optListVal != null) { - oprot.writeFieldBegin(OPT_LIST_VAL_FIELD_DESC); - this.optListVal.write0(oprot); + if (i32Val != null) { + oprot.writeFieldBegin(I32_VAL_FIELD_DESC); + this.i32Val.write0(oprot); oprot.writeFieldEnd(); } - if (optSetVal != null) { - oprot.writeFieldBegin(OPT_SET_VAL_FIELD_DESC); - this.optSetVal.write0(oprot); + if (i16Val != null) { + oprot.writeFieldBegin(I16_VAL_FIELD_DESC); + this.i16Val.write0(oprot); oprot.writeFieldEnd(); } - if (optMapVal != null) { - oprot.writeFieldBegin(OPT_MAP_VAL_FIELD_DESC); - this.optMapVal.write0(oprot); + if (byteVal != null) { + oprot.writeFieldBegin(BYTE_VAL_FIELD_DESC); + this.byteVal.write0(oprot); + oprot.writeFieldEnd(); + } + if (boolVal != null) { + oprot.writeFieldBegin(BOOL_VAL_FIELD_DESC); + this.boolVal.write0(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/__fbthrift_TypeList_1644c1a9.java b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/__fbthrift_TypeList_c6fa3293.java similarity index 97% rename from third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/__fbthrift_TypeList_1644c1a9.java rename to third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/__fbthrift_TypeList_c6fa3293.java index c75ab584993..7208ace5c23 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/__fbthrift_TypeList_1644c1a9.java +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-java/test/fixtures/patch/__fbthrift_TypeList_c6fa3293.java @@ -11,7 +11,7 @@ import com.facebook.thrift.type.TypeList; import java.util.ArrayList; import java.util.List; -public class __fbthrift_TypeList_1644c1a9 implements TypeList { +public class __fbthrift_TypeList_c6fa3293 implements TypeList { private static List list = new ArrayList<>(); @@ -27,12 +27,12 @@ public class __fbthrift_TypeList_1644c1a9 implements TypeList { list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/InnerUnionPatch", "test.fixtures.patch.InnerUnionPatch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyUnionFieldPatch", "test.fixtures.patch.MyUnionFieldPatch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyUnionPatch", "test.fixtures.patch.MyUnionPatch")); - list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyStructFieldPatch", "test.fixtures.patch.MyStructFieldPatch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyStructFieldN10Patch", "test.fixtures.patch.MyStructFieldN10Patch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyStructFieldN25Patch", "test.fixtures.patch.MyStructFieldN25Patch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyStructFieldN28Patch", "test.fixtures.patch.MyStructFieldN28Patch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyStructFieldN29Patch", "test.fixtures.patch.MyStructFieldN29Patch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyStructFieldN30Patch", "test.fixtures.patch.MyStructFieldN30Patch")); + list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyStructFieldPatch", "test.fixtures.patch.MyStructFieldPatch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/MyStructPatch", "test.fixtures.patch.MyStructPatch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/LateDefStructFieldPatch", "test.fixtures.patch.LateDefStructFieldPatch")); list.add(new TypeList.TypeMapping("test.dev/fixtures/patch/LateDefStructPatch", "test.fixtures.patch.LateDefStructPatch")); diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-javadeprecated/test/fixtures/patch/MyStructFieldPatch.java b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-javadeprecated/test/fixtures/patch/MyStructFieldPatch.java index f5553b850d1..84baad69753 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-javadeprecated/test/fixtures/patch/MyStructFieldPatch.java +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-javadeprecated/test/fixtures/patch/MyStructFieldPatch.java @@ -26,97 +26,97 @@ import com.facebook.thrift.protocol.*; @SuppressWarnings({ "unused", "serial" }) public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneable, Comparable { private static final TStruct STRUCT_DESC = new TStruct("MyStructFieldPatch"); - private static final TField BOOL_VAL_FIELD_DESC = new TField("boolVal", TType.STRUCT, (short)-1); - private static final TField BYTE_VAL_FIELD_DESC = new TField("byteVal", TType.STRUCT, (short)-2); - private static final TField I16_VAL_FIELD_DESC = new TField("i16Val", TType.STRUCT, (short)-3); - private static final TField I32_VAL_FIELD_DESC = new TField("i32Val", TType.STRUCT, (short)-4); - private static final TField I64_VAL_FIELD_DESC = new TField("i64Val", TType.STRUCT, (short)-5); - private static final TField FLOAT_VAL_FIELD_DESC = new TField("floatVal", TType.STRUCT, (short)-6); - private static final TField DOUBLE_VAL_FIELD_DESC = new TField("doubleVal", TType.STRUCT, (short)-7); - private static final TField STRING_VAL_FIELD_DESC = new TField("stringVal", TType.STRUCT, (short)-8); - private static final TField BINARY_VAL_FIELD_DESC = new TField("binaryVal", TType.STRUCT, (short)-9); - private static final TField ENUM_VAL_FIELD_DESC = new TField("enumVal", TType.STRUCT, (short)-10); - private static final TField STRUCT_VAL_FIELD_DESC = new TField("structVal", TType.STRUCT, (short)-11); - private static final TField UNION_VAL_FIELD_DESC = new TField("unionVal", TType.STRUCT, (short)-12); - private static final TField LATE_STRUCT_VAL_FIELD_DESC = new TField("lateStructVal", TType.STRUCT, (short)-13); - private static final TField DURATION_VAL_FIELD_DESC = new TField("durationVal", TType.STRUCT, (short)-14); - private static final TField TIME_VAL_FIELD_DESC = new TField("timeVal", TType.STRUCT, (short)-15); - private static final TField OPT_BOOL_VAL_FIELD_DESC = new TField("optBoolVal", TType.STRUCT, (short)-16); - private static final TField OPT_BYTE_VAL_FIELD_DESC = new TField("optByteVal", TType.STRUCT, (short)-17); - private static final TField OPT_I16_VAL_FIELD_DESC = new TField("optI16Val", TType.STRUCT, (short)-18); - private static final TField OPT_I32_VAL_FIELD_DESC = new TField("optI32Val", TType.STRUCT, (short)-19); - private static final TField OPT_I64_VAL_FIELD_DESC = new TField("optI64Val", TType.STRUCT, (short)-20); - private static final TField OPT_FLOAT_VAL_FIELD_DESC = new TField("optFloatVal", TType.STRUCT, (short)-21); - private static final TField OPT_DOUBLE_VAL_FIELD_DESC = new TField("optDoubleVal", TType.STRUCT, (short)-22); - private static final TField OPT_STRING_VAL_FIELD_DESC = new TField("optStringVal", TType.STRUCT, (short)-23); - private static final TField OPT_BINARY_VAL_FIELD_DESC = new TField("optBinaryVal", TType.STRUCT, (short)-24); - private static final TField OPT_ENUM_VAL_FIELD_DESC = new TField("optEnumVal", TType.STRUCT, (short)-25); - private static final TField OPT_STRUCT_VAL_FIELD_DESC = new TField("optStructVal", TType.STRUCT, (short)-26); - private static final TField OPT_LATE_STRUCT_VAL_FIELD_DESC = new TField("optLateStructVal", TType.STRUCT, (short)-27); - private static final TField OPT_LIST_VAL_FIELD_DESC = new TField("optListVal", TType.STRUCT, (short)-28); - private static final TField OPT_SET_VAL_FIELD_DESC = new TField("optSetVal", TType.STRUCT, (short)-29); private static final TField OPT_MAP_VAL_FIELD_DESC = new TField("optMapVal", TType.STRUCT, (short)-30); + private static final TField OPT_SET_VAL_FIELD_DESC = new TField("optSetVal", TType.STRUCT, (short)-29); + private static final TField OPT_LIST_VAL_FIELD_DESC = new TField("optListVal", TType.STRUCT, (short)-28); + private static final TField OPT_LATE_STRUCT_VAL_FIELD_DESC = new TField("optLateStructVal", TType.STRUCT, (short)-27); + private static final TField OPT_STRUCT_VAL_FIELD_DESC = new TField("optStructVal", TType.STRUCT, (short)-26); + private static final TField OPT_ENUM_VAL_FIELD_DESC = new TField("optEnumVal", TType.STRUCT, (short)-25); + private static final TField OPT_BINARY_VAL_FIELD_DESC = new TField("optBinaryVal", TType.STRUCT, (short)-24); + private static final TField OPT_STRING_VAL_FIELD_DESC = new TField("optStringVal", TType.STRUCT, (short)-23); + private static final TField OPT_DOUBLE_VAL_FIELD_DESC = new TField("optDoubleVal", TType.STRUCT, (short)-22); + private static final TField OPT_FLOAT_VAL_FIELD_DESC = new TField("optFloatVal", TType.STRUCT, (short)-21); + private static final TField OPT_I64_VAL_FIELD_DESC = new TField("optI64Val", TType.STRUCT, (short)-20); + private static final TField OPT_I32_VAL_FIELD_DESC = new TField("optI32Val", TType.STRUCT, (short)-19); + private static final TField OPT_I16_VAL_FIELD_DESC = new TField("optI16Val", TType.STRUCT, (short)-18); + private static final TField OPT_BYTE_VAL_FIELD_DESC = new TField("optByteVal", TType.STRUCT, (short)-17); + private static final TField OPT_BOOL_VAL_FIELD_DESC = new TField("optBoolVal", TType.STRUCT, (short)-16); + private static final TField TIME_VAL_FIELD_DESC = new TField("timeVal", TType.STRUCT, (short)-15); + private static final TField DURATION_VAL_FIELD_DESC = new TField("durationVal", TType.STRUCT, (short)-14); + private static final TField LATE_STRUCT_VAL_FIELD_DESC = new TField("lateStructVal", TType.STRUCT, (short)-13); + private static final TField UNION_VAL_FIELD_DESC = new TField("unionVal", TType.STRUCT, (short)-12); + private static final TField STRUCT_VAL_FIELD_DESC = new TField("structVal", TType.STRUCT, (short)-11); + private static final TField ENUM_VAL_FIELD_DESC = new TField("enumVal", TType.STRUCT, (short)-10); + private static final TField BINARY_VAL_FIELD_DESC = new TField("binaryVal", TType.STRUCT, (short)-9); + private static final TField STRING_VAL_FIELD_DESC = new TField("stringVal", TType.STRUCT, (short)-8); + private static final TField DOUBLE_VAL_FIELD_DESC = new TField("doubleVal", TType.STRUCT, (short)-7); + private static final TField FLOAT_VAL_FIELD_DESC = new TField("floatVal", TType.STRUCT, (short)-6); + private static final TField I64_VAL_FIELD_DESC = new TField("i64Val", TType.STRUCT, (short)-5); + private static final TField I32_VAL_FIELD_DESC = new TField("i32Val", TType.STRUCT, (short)-4); + private static final TField I16_VAL_FIELD_DESC = new TField("i16Val", TType.STRUCT, (short)-3); + private static final TField BYTE_VAL_FIELD_DESC = new TField("byteVal", TType.STRUCT, (short)-2); + private static final TField BOOL_VAL_FIELD_DESC = new TField("boolVal", TType.STRUCT, (short)-1); - public com.facebook.thrift.op.BoolPatch boolVal; - public com.facebook.thrift.op.BytePatch byteVal; - public com.facebook.thrift.op.I16Patch i16Val; - public com.facebook.thrift.op.I32Patch i32Val; - public com.facebook.thrift.op.I64Patch i64Val; - public com.facebook.thrift.op.FloatPatch floatVal; - public com.facebook.thrift.op.DoublePatch doubleVal; - public com.facebook.thrift.op.StringPatch stringVal; - public com.facebook.thrift.op.BinaryPatch binaryVal; - public MyStructFieldN10Patch enumVal; - public MyDataPatch structVal; - public MyUnionPatch unionVal; - public LateDefStructPatch lateStructVal; - public com.facebook.thrift.op.DurationPatch durationVal; - public com.facebook.thrift.op.TimePatch timeVal; - public com.facebook.thrift.op.BoolPatch optBoolVal; - public com.facebook.thrift.op.BytePatch optByteVal; - public com.facebook.thrift.op.I16Patch optI16Val; - public com.facebook.thrift.op.I32Patch optI32Val; - public com.facebook.thrift.op.I64Patch optI64Val; - public com.facebook.thrift.op.FloatPatch optFloatVal; - public com.facebook.thrift.op.DoublePatch optDoubleVal; - public com.facebook.thrift.op.StringPatch optStringVal; - public com.facebook.thrift.op.BinaryPatch optBinaryVal; - public MyStructFieldN25Patch optEnumVal; - public MyDataPatch optStructVal; - public LateDefStructPatch optLateStructVal; - public MyStructFieldN28Patch optListVal; - public MyStructFieldN29Patch optSetVal; public MyStructFieldN30Patch optMapVal; - public static final int BOOLVAL = -1; - public static final int BYTEVAL = -2; - public static final int I16VAL = -3; - public static final int I32VAL = -4; - public static final int I64VAL = -5; - public static final int FLOATVAL = -6; - public static final int DOUBLEVAL = -7; - public static final int STRINGVAL = -8; - public static final int BINARYVAL = -9; - public static final int ENUMVAL = -10; - public static final int STRUCTVAL = -11; - public static final int UNIONVAL = -12; - public static final int LATESTRUCTVAL = -13; - public static final int DURATIONVAL = -14; - public static final int TIMEVAL = -15; - public static final int OPTBOOLVAL = -16; - public static final int OPTBYTEVAL = -17; - public static final int OPTI16VAL = -18; - public static final int OPTI32VAL = -19; - public static final int OPTI64VAL = -20; - public static final int OPTFLOATVAL = -21; - public static final int OPTDOUBLEVAL = -22; - public static final int OPTSTRINGVAL = -23; - public static final int OPTBINARYVAL = -24; - public static final int OPTENUMVAL = -25; - public static final int OPTSTRUCTVAL = -26; - public static final int OPTLATESTRUCTVAL = -27; - public static final int OPTLISTVAL = -28; - public static final int OPTSETVAL = -29; + public MyStructFieldN29Patch optSetVal; + public MyStructFieldN28Patch optListVal; + public LateDefStructPatch optLateStructVal; + public MyDataPatch optStructVal; + public MyStructFieldN25Patch optEnumVal; + public com.facebook.thrift.op.BinaryPatch optBinaryVal; + public com.facebook.thrift.op.StringPatch optStringVal; + public com.facebook.thrift.op.DoublePatch optDoubleVal; + public com.facebook.thrift.op.FloatPatch optFloatVal; + public com.facebook.thrift.op.I64Patch optI64Val; + public com.facebook.thrift.op.I32Patch optI32Val; + public com.facebook.thrift.op.I16Patch optI16Val; + public com.facebook.thrift.op.BytePatch optByteVal; + public com.facebook.thrift.op.BoolPatch optBoolVal; + public com.facebook.thrift.op.TimePatch timeVal; + public com.facebook.thrift.op.DurationPatch durationVal; + public LateDefStructPatch lateStructVal; + public MyUnionPatch unionVal; + public MyDataPatch structVal; + public MyStructFieldN10Patch enumVal; + public com.facebook.thrift.op.BinaryPatch binaryVal; + public com.facebook.thrift.op.StringPatch stringVal; + public com.facebook.thrift.op.DoublePatch doubleVal; + public com.facebook.thrift.op.FloatPatch floatVal; + public com.facebook.thrift.op.I64Patch i64Val; + public com.facebook.thrift.op.I32Patch i32Val; + public com.facebook.thrift.op.I16Patch i16Val; + public com.facebook.thrift.op.BytePatch byteVal; + public com.facebook.thrift.op.BoolPatch boolVal; public static final int OPTMAPVAL = -30; + public static final int OPTSETVAL = -29; + public static final int OPTLISTVAL = -28; + public static final int OPTLATESTRUCTVAL = -27; + public static final int OPTSTRUCTVAL = -26; + public static final int OPTENUMVAL = -25; + public static final int OPTBINARYVAL = -24; + public static final int OPTSTRINGVAL = -23; + public static final int OPTDOUBLEVAL = -22; + public static final int OPTFLOATVAL = -21; + public static final int OPTI64VAL = -20; + public static final int OPTI32VAL = -19; + public static final int OPTI16VAL = -18; + public static final int OPTBYTEVAL = -17; + public static final int OPTBOOLVAL = -16; + public static final int TIMEVAL = -15; + public static final int DURATIONVAL = -14; + public static final int LATESTRUCTVAL = -13; + public static final int UNIONVAL = -12; + public static final int STRUCTVAL = -11; + public static final int ENUMVAL = -10; + public static final int BINARYVAL = -9; + public static final int STRINGVAL = -8; + public static final int DOUBLEVAL = -7; + public static final int FLOATVAL = -6; + public static final int I64VAL = -5; + public static final int I32VAL = -4; + public static final int I16VAL = -3; + public static final int BYTEVAL = -2; + public static final int BOOLVAL = -1; // isset id assignments @@ -124,66 +124,66 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl static { Map tmpMetaDataMap = new HashMap(); - tmpMetaDataMap.put(BOOLVAL, new FieldMetaData("boolVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BoolPatch.class))); - tmpMetaDataMap.put(BYTEVAL, new FieldMetaData("byteVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BytePatch.class))); - tmpMetaDataMap.put(I16VAL, new FieldMetaData("i16Val", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I16Patch.class))); - tmpMetaDataMap.put(I32VAL, new FieldMetaData("i32Val", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I32Patch.class))); - tmpMetaDataMap.put(I64VAL, new FieldMetaData("i64Val", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I64Patch.class))); - tmpMetaDataMap.put(FLOATVAL, new FieldMetaData("floatVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.FloatPatch.class))); - tmpMetaDataMap.put(DOUBLEVAL, new FieldMetaData("doubleVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.DoublePatch.class))); - tmpMetaDataMap.put(STRINGVAL, new FieldMetaData("stringVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.StringPatch.class))); - tmpMetaDataMap.put(BINARYVAL, new FieldMetaData("binaryVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BinaryPatch.class))); - tmpMetaDataMap.put(ENUMVAL, new FieldMetaData("enumVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, MyStructFieldN10Patch.class))); - tmpMetaDataMap.put(STRUCTVAL, new FieldMetaData("structVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, MyDataPatch.class))); - tmpMetaDataMap.put(UNIONVAL, new FieldMetaData("unionVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, MyUnionPatch.class))); - tmpMetaDataMap.put(LATESTRUCTVAL, new FieldMetaData("lateStructVal", TFieldRequirementType.DEFAULT, + tmpMetaDataMap.put(OPTMAPVAL, new FieldMetaData("optMapVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, MyStructFieldN30Patch.class))); + tmpMetaDataMap.put(OPTSETVAL, new FieldMetaData("optSetVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, MyStructFieldN29Patch.class))); + tmpMetaDataMap.put(OPTLISTVAL, new FieldMetaData("optListVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, MyStructFieldN28Patch.class))); + tmpMetaDataMap.put(OPTLATESTRUCTVAL, new FieldMetaData("optLateStructVal", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, LateDefStructPatch.class))); - tmpMetaDataMap.put(DURATIONVAL, new FieldMetaData("durationVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.DurationPatch.class))); - tmpMetaDataMap.put(TIMEVAL, new FieldMetaData("timeVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.TimePatch.class))); - tmpMetaDataMap.put(OPTBOOLVAL, new FieldMetaData("optBoolVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BoolPatch.class))); - tmpMetaDataMap.put(OPTBYTEVAL, new FieldMetaData("optByteVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BytePatch.class))); - tmpMetaDataMap.put(OPTI16VAL, new FieldMetaData("optI16Val", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I16Patch.class))); - tmpMetaDataMap.put(OPTI32VAL, new FieldMetaData("optI32Val", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I32Patch.class))); - tmpMetaDataMap.put(OPTI64VAL, new FieldMetaData("optI64Val", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I64Patch.class))); - tmpMetaDataMap.put(OPTFLOATVAL, new FieldMetaData("optFloatVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.FloatPatch.class))); - tmpMetaDataMap.put(OPTDOUBLEVAL, new FieldMetaData("optDoubleVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.DoublePatch.class))); - tmpMetaDataMap.put(OPTSTRINGVAL, new FieldMetaData("optStringVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.StringPatch.class))); - tmpMetaDataMap.put(OPTBINARYVAL, new FieldMetaData("optBinaryVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BinaryPatch.class))); - tmpMetaDataMap.put(OPTENUMVAL, new FieldMetaData("optEnumVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, MyStructFieldN25Patch.class))); tmpMetaDataMap.put(OPTSTRUCTVAL, new FieldMetaData("optStructVal", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, MyDataPatch.class))); - tmpMetaDataMap.put(OPTLATESTRUCTVAL, new FieldMetaData("optLateStructVal", TFieldRequirementType.DEFAULT, + tmpMetaDataMap.put(OPTENUMVAL, new FieldMetaData("optEnumVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, MyStructFieldN25Patch.class))); + tmpMetaDataMap.put(OPTBINARYVAL, new FieldMetaData("optBinaryVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BinaryPatch.class))); + tmpMetaDataMap.put(OPTSTRINGVAL, new FieldMetaData("optStringVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.StringPatch.class))); + tmpMetaDataMap.put(OPTDOUBLEVAL, new FieldMetaData("optDoubleVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.DoublePatch.class))); + tmpMetaDataMap.put(OPTFLOATVAL, new FieldMetaData("optFloatVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.FloatPatch.class))); + tmpMetaDataMap.put(OPTI64VAL, new FieldMetaData("optI64Val", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I64Patch.class))); + tmpMetaDataMap.put(OPTI32VAL, new FieldMetaData("optI32Val", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I32Patch.class))); + tmpMetaDataMap.put(OPTI16VAL, new FieldMetaData("optI16Val", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I16Patch.class))); + tmpMetaDataMap.put(OPTBYTEVAL, new FieldMetaData("optByteVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BytePatch.class))); + tmpMetaDataMap.put(OPTBOOLVAL, new FieldMetaData("optBoolVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BoolPatch.class))); + tmpMetaDataMap.put(TIMEVAL, new FieldMetaData("timeVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.TimePatch.class))); + tmpMetaDataMap.put(DURATIONVAL, new FieldMetaData("durationVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.DurationPatch.class))); + tmpMetaDataMap.put(LATESTRUCTVAL, new FieldMetaData("lateStructVal", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, LateDefStructPatch.class))); - tmpMetaDataMap.put(OPTLISTVAL, new FieldMetaData("optListVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, MyStructFieldN28Patch.class))); - tmpMetaDataMap.put(OPTSETVAL, new FieldMetaData("optSetVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, MyStructFieldN29Patch.class))); - tmpMetaDataMap.put(OPTMAPVAL, new FieldMetaData("optMapVal", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, MyStructFieldN30Patch.class))); + tmpMetaDataMap.put(UNIONVAL, new FieldMetaData("unionVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, MyUnionPatch.class))); + tmpMetaDataMap.put(STRUCTVAL, new FieldMetaData("structVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, MyDataPatch.class))); + tmpMetaDataMap.put(ENUMVAL, new FieldMetaData("enumVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, MyStructFieldN10Patch.class))); + tmpMetaDataMap.put(BINARYVAL, new FieldMetaData("binaryVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BinaryPatch.class))); + tmpMetaDataMap.put(STRINGVAL, new FieldMetaData("stringVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.StringPatch.class))); + tmpMetaDataMap.put(DOUBLEVAL, new FieldMetaData("doubleVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.DoublePatch.class))); + tmpMetaDataMap.put(FLOATVAL, new FieldMetaData("floatVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.FloatPatch.class))); + tmpMetaDataMap.put(I64VAL, new FieldMetaData("i64Val", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I64Patch.class))); + tmpMetaDataMap.put(I32VAL, new FieldMetaData("i32Val", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I32Patch.class))); + tmpMetaDataMap.put(I16VAL, new FieldMetaData("i16Val", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.I16Patch.class))); + tmpMetaDataMap.put(BYTEVAL, new FieldMetaData("byteVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BytePatch.class))); + tmpMetaDataMap.put(BOOLVAL, new FieldMetaData("boolVal", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, com.facebook.thrift.op.BoolPatch.class))); metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap); } @@ -195,176 +195,171 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl } public MyStructFieldPatch( - com.facebook.thrift.op.BoolPatch boolVal, - com.facebook.thrift.op.BytePatch byteVal, - com.facebook.thrift.op.I16Patch i16Val, - com.facebook.thrift.op.I32Patch i32Val, - com.facebook.thrift.op.I64Patch i64Val, - com.facebook.thrift.op.FloatPatch floatVal, - com.facebook.thrift.op.DoublePatch doubleVal, - com.facebook.thrift.op.StringPatch stringVal, - com.facebook.thrift.op.BinaryPatch binaryVal, - MyStructFieldN10Patch enumVal, - MyDataPatch structVal, - MyUnionPatch unionVal, - LateDefStructPatch lateStructVal, - com.facebook.thrift.op.DurationPatch durationVal, - com.facebook.thrift.op.TimePatch timeVal, - com.facebook.thrift.op.BoolPatch optBoolVal, - com.facebook.thrift.op.BytePatch optByteVal, - com.facebook.thrift.op.I16Patch optI16Val, - com.facebook.thrift.op.I32Patch optI32Val, - com.facebook.thrift.op.I64Patch optI64Val, - com.facebook.thrift.op.FloatPatch optFloatVal, - com.facebook.thrift.op.DoublePatch optDoubleVal, - com.facebook.thrift.op.StringPatch optStringVal, - com.facebook.thrift.op.BinaryPatch optBinaryVal, - MyStructFieldN25Patch optEnumVal, - MyDataPatch optStructVal, - LateDefStructPatch optLateStructVal, - MyStructFieldN28Patch optListVal, + MyStructFieldN30Patch optMapVal, MyStructFieldN29Patch optSetVal, - MyStructFieldN30Patch optMapVal) { + MyStructFieldN28Patch optListVal, + LateDefStructPatch optLateStructVal, + MyDataPatch optStructVal, + MyStructFieldN25Patch optEnumVal, + com.facebook.thrift.op.BinaryPatch optBinaryVal, + com.facebook.thrift.op.StringPatch optStringVal, + com.facebook.thrift.op.DoublePatch optDoubleVal, + com.facebook.thrift.op.FloatPatch optFloatVal, + com.facebook.thrift.op.I64Patch optI64Val, + com.facebook.thrift.op.I32Patch optI32Val, + com.facebook.thrift.op.I16Patch optI16Val, + com.facebook.thrift.op.BytePatch optByteVal, + com.facebook.thrift.op.BoolPatch optBoolVal, + com.facebook.thrift.op.TimePatch timeVal, + com.facebook.thrift.op.DurationPatch durationVal, + LateDefStructPatch lateStructVal, + MyUnionPatch unionVal, + MyDataPatch structVal, + MyStructFieldN10Patch enumVal, + com.facebook.thrift.op.BinaryPatch binaryVal, + com.facebook.thrift.op.StringPatch stringVal, + com.facebook.thrift.op.DoublePatch doubleVal, + com.facebook.thrift.op.FloatPatch floatVal, + com.facebook.thrift.op.I64Patch i64Val, + com.facebook.thrift.op.I32Patch i32Val, + com.facebook.thrift.op.I16Patch i16Val, + com.facebook.thrift.op.BytePatch byteVal, + com.facebook.thrift.op.BoolPatch boolVal) { this(); - this.boolVal = boolVal; - this.byteVal = byteVal; - this.i16Val = i16Val; - this.i32Val = i32Val; - this.i64Val = i64Val; - this.floatVal = floatVal; - this.doubleVal = doubleVal; - this.stringVal = stringVal; - this.binaryVal = binaryVal; - this.enumVal = enumVal; - this.structVal = structVal; - this.unionVal = unionVal; - this.lateStructVal = lateStructVal; - this.durationVal = durationVal; - this.timeVal = timeVal; - this.optBoolVal = optBoolVal; - this.optByteVal = optByteVal; - this.optI16Val = optI16Val; - this.optI32Val = optI32Val; - this.optI64Val = optI64Val; - this.optFloatVal = optFloatVal; - this.optDoubleVal = optDoubleVal; - this.optStringVal = optStringVal; - this.optBinaryVal = optBinaryVal; - this.optEnumVal = optEnumVal; - this.optStructVal = optStructVal; - this.optLateStructVal = optLateStructVal; - this.optListVal = optListVal; - this.optSetVal = optSetVal; this.optMapVal = optMapVal; + this.optSetVal = optSetVal; + this.optListVal = optListVal; + this.optLateStructVal = optLateStructVal; + this.optStructVal = optStructVal; + this.optEnumVal = optEnumVal; + this.optBinaryVal = optBinaryVal; + this.optStringVal = optStringVal; + this.optDoubleVal = optDoubleVal; + this.optFloatVal = optFloatVal; + this.optI64Val = optI64Val; + this.optI32Val = optI32Val; + this.optI16Val = optI16Val; + this.optByteVal = optByteVal; + this.optBoolVal = optBoolVal; + this.timeVal = timeVal; + this.durationVal = durationVal; + this.lateStructVal = lateStructVal; + this.unionVal = unionVal; + this.structVal = structVal; + this.enumVal = enumVal; + this.binaryVal = binaryVal; + this.stringVal = stringVal; + this.doubleVal = doubleVal; + this.floatVal = floatVal; + this.i64Val = i64Val; + this.i32Val = i32Val; + this.i16Val = i16Val; + this.byteVal = byteVal; + this.boolVal = boolVal; } public static class Builder { - private com.facebook.thrift.op.BoolPatch boolVal; - private com.facebook.thrift.op.BytePatch byteVal; - private com.facebook.thrift.op.I16Patch i16Val; - private com.facebook.thrift.op.I32Patch i32Val; - private com.facebook.thrift.op.I64Patch i64Val; - private com.facebook.thrift.op.FloatPatch floatVal; - private com.facebook.thrift.op.DoublePatch doubleVal; - private com.facebook.thrift.op.StringPatch stringVal; - private com.facebook.thrift.op.BinaryPatch binaryVal; - private MyStructFieldN10Patch enumVal; - private MyDataPatch structVal; - private MyUnionPatch unionVal; - private LateDefStructPatch lateStructVal; - private com.facebook.thrift.op.DurationPatch durationVal; - private com.facebook.thrift.op.TimePatch timeVal; - private com.facebook.thrift.op.BoolPatch optBoolVal; - private com.facebook.thrift.op.BytePatch optByteVal; - private com.facebook.thrift.op.I16Patch optI16Val; - private com.facebook.thrift.op.I32Patch optI32Val; - private com.facebook.thrift.op.I64Patch optI64Val; - private com.facebook.thrift.op.FloatPatch optFloatVal; - private com.facebook.thrift.op.DoublePatch optDoubleVal; - private com.facebook.thrift.op.StringPatch optStringVal; - private com.facebook.thrift.op.BinaryPatch optBinaryVal; - private MyStructFieldN25Patch optEnumVal; - private MyDataPatch optStructVal; - private LateDefStructPatch optLateStructVal; - private MyStructFieldN28Patch optListVal; - private MyStructFieldN29Patch optSetVal; private MyStructFieldN30Patch optMapVal; + private MyStructFieldN29Patch optSetVal; + private MyStructFieldN28Patch optListVal; + private LateDefStructPatch optLateStructVal; + private MyDataPatch optStructVal; + private MyStructFieldN25Patch optEnumVal; + private com.facebook.thrift.op.BinaryPatch optBinaryVal; + private com.facebook.thrift.op.StringPatch optStringVal; + private com.facebook.thrift.op.DoublePatch optDoubleVal; + private com.facebook.thrift.op.FloatPatch optFloatVal; + private com.facebook.thrift.op.I64Patch optI64Val; + private com.facebook.thrift.op.I32Patch optI32Val; + private com.facebook.thrift.op.I16Patch optI16Val; + private com.facebook.thrift.op.BytePatch optByteVal; + private com.facebook.thrift.op.BoolPatch optBoolVal; + private com.facebook.thrift.op.TimePatch timeVal; + private com.facebook.thrift.op.DurationPatch durationVal; + private LateDefStructPatch lateStructVal; + private MyUnionPatch unionVal; + private MyDataPatch structVal; + private MyStructFieldN10Patch enumVal; + private com.facebook.thrift.op.BinaryPatch binaryVal; + private com.facebook.thrift.op.StringPatch stringVal; + private com.facebook.thrift.op.DoublePatch doubleVal; + private com.facebook.thrift.op.FloatPatch floatVal; + private com.facebook.thrift.op.I64Patch i64Val; + private com.facebook.thrift.op.I32Patch i32Val; + private com.facebook.thrift.op.I16Patch i16Val; + private com.facebook.thrift.op.BytePatch byteVal; + private com.facebook.thrift.op.BoolPatch boolVal; public Builder() { } - public Builder setBoolVal(final com.facebook.thrift.op.BoolPatch boolVal) { - this.boolVal = boolVal; - return this; - } - - public Builder setByteVal(final com.facebook.thrift.op.BytePatch byteVal) { - this.byteVal = byteVal; + public Builder setOptMapVal(final MyStructFieldN30Patch optMapVal) { + this.optMapVal = optMapVal; return this; } - public Builder setI16Val(final com.facebook.thrift.op.I16Patch i16Val) { - this.i16Val = i16Val; + public Builder setOptSetVal(final MyStructFieldN29Patch optSetVal) { + this.optSetVal = optSetVal; return this; } - public Builder setI32Val(final com.facebook.thrift.op.I32Patch i32Val) { - this.i32Val = i32Val; + public Builder setOptListVal(final MyStructFieldN28Patch optListVal) { + this.optListVal = optListVal; return this; } - public Builder setI64Val(final com.facebook.thrift.op.I64Patch i64Val) { - this.i64Val = i64Val; + public Builder setOptLateStructVal(final LateDefStructPatch optLateStructVal) { + this.optLateStructVal = optLateStructVal; return this; } - public Builder setFloatVal(final com.facebook.thrift.op.FloatPatch floatVal) { - this.floatVal = floatVal; + public Builder setOptStructVal(final MyDataPatch optStructVal) { + this.optStructVal = optStructVal; return this; } - public Builder setDoubleVal(final com.facebook.thrift.op.DoublePatch doubleVal) { - this.doubleVal = doubleVal; + public Builder setOptEnumVal(final MyStructFieldN25Patch optEnumVal) { + this.optEnumVal = optEnumVal; return this; } - public Builder setStringVal(final com.facebook.thrift.op.StringPatch stringVal) { - this.stringVal = stringVal; + public Builder setOptBinaryVal(final com.facebook.thrift.op.BinaryPatch optBinaryVal) { + this.optBinaryVal = optBinaryVal; return this; } - public Builder setBinaryVal(final com.facebook.thrift.op.BinaryPatch binaryVal) { - this.binaryVal = binaryVal; + public Builder setOptStringVal(final com.facebook.thrift.op.StringPatch optStringVal) { + this.optStringVal = optStringVal; return this; } - public Builder setEnumVal(final MyStructFieldN10Patch enumVal) { - this.enumVal = enumVal; + public Builder setOptDoubleVal(final com.facebook.thrift.op.DoublePatch optDoubleVal) { + this.optDoubleVal = optDoubleVal; return this; } - public Builder setStructVal(final MyDataPatch structVal) { - this.structVal = structVal; + public Builder setOptFloatVal(final com.facebook.thrift.op.FloatPatch optFloatVal) { + this.optFloatVal = optFloatVal; return this; } - public Builder setUnionVal(final MyUnionPatch unionVal) { - this.unionVal = unionVal; + public Builder setOptI64Val(final com.facebook.thrift.op.I64Patch optI64Val) { + this.optI64Val = optI64Val; return this; } - public Builder setLateStructVal(final LateDefStructPatch lateStructVal) { - this.lateStructVal = lateStructVal; + public Builder setOptI32Val(final com.facebook.thrift.op.I32Patch optI32Val) { + this.optI32Val = optI32Val; return this; } - public Builder setDurationVal(final com.facebook.thrift.op.DurationPatch durationVal) { - this.durationVal = durationVal; + public Builder setOptI16Val(final com.facebook.thrift.op.I16Patch optI16Val) { + this.optI16Val = optI16Val; return this; } - public Builder setTimeVal(final com.facebook.thrift.op.TimePatch timeVal) { - this.timeVal = timeVal; + public Builder setOptByteVal(final com.facebook.thrift.op.BytePatch optByteVal) { + this.optByteVal = optByteVal; return this; } @@ -373,108 +368,113 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl return this; } - public Builder setOptByteVal(final com.facebook.thrift.op.BytePatch optByteVal) { - this.optByteVal = optByteVal; + public Builder setTimeVal(final com.facebook.thrift.op.TimePatch timeVal) { + this.timeVal = timeVal; return this; } - public Builder setOptI16Val(final com.facebook.thrift.op.I16Patch optI16Val) { - this.optI16Val = optI16Val; + public Builder setDurationVal(final com.facebook.thrift.op.DurationPatch durationVal) { + this.durationVal = durationVal; return this; } - public Builder setOptI32Val(final com.facebook.thrift.op.I32Patch optI32Val) { - this.optI32Val = optI32Val; + public Builder setLateStructVal(final LateDefStructPatch lateStructVal) { + this.lateStructVal = lateStructVal; return this; } - public Builder setOptI64Val(final com.facebook.thrift.op.I64Patch optI64Val) { - this.optI64Val = optI64Val; + public Builder setUnionVal(final MyUnionPatch unionVal) { + this.unionVal = unionVal; return this; } - public Builder setOptFloatVal(final com.facebook.thrift.op.FloatPatch optFloatVal) { - this.optFloatVal = optFloatVal; + public Builder setStructVal(final MyDataPatch structVal) { + this.structVal = structVal; return this; } - public Builder setOptDoubleVal(final com.facebook.thrift.op.DoublePatch optDoubleVal) { - this.optDoubleVal = optDoubleVal; + public Builder setEnumVal(final MyStructFieldN10Patch enumVal) { + this.enumVal = enumVal; return this; } - public Builder setOptStringVal(final com.facebook.thrift.op.StringPatch optStringVal) { - this.optStringVal = optStringVal; + public Builder setBinaryVal(final com.facebook.thrift.op.BinaryPatch binaryVal) { + this.binaryVal = binaryVal; return this; } - public Builder setOptBinaryVal(final com.facebook.thrift.op.BinaryPatch optBinaryVal) { - this.optBinaryVal = optBinaryVal; + public Builder setStringVal(final com.facebook.thrift.op.StringPatch stringVal) { + this.stringVal = stringVal; return this; } - public Builder setOptEnumVal(final MyStructFieldN25Patch optEnumVal) { - this.optEnumVal = optEnumVal; + public Builder setDoubleVal(final com.facebook.thrift.op.DoublePatch doubleVal) { + this.doubleVal = doubleVal; return this; } - public Builder setOptStructVal(final MyDataPatch optStructVal) { - this.optStructVal = optStructVal; + public Builder setFloatVal(final com.facebook.thrift.op.FloatPatch floatVal) { + this.floatVal = floatVal; return this; } - public Builder setOptLateStructVal(final LateDefStructPatch optLateStructVal) { - this.optLateStructVal = optLateStructVal; + public Builder setI64Val(final com.facebook.thrift.op.I64Patch i64Val) { + this.i64Val = i64Val; return this; } - public Builder setOptListVal(final MyStructFieldN28Patch optListVal) { - this.optListVal = optListVal; + public Builder setI32Val(final com.facebook.thrift.op.I32Patch i32Val) { + this.i32Val = i32Val; return this; } - public Builder setOptSetVal(final MyStructFieldN29Patch optSetVal) { - this.optSetVal = optSetVal; + public Builder setI16Val(final com.facebook.thrift.op.I16Patch i16Val) { + this.i16Val = i16Val; return this; } - public Builder setOptMapVal(final MyStructFieldN30Patch optMapVal) { - this.optMapVal = optMapVal; + public Builder setByteVal(final com.facebook.thrift.op.BytePatch byteVal) { + this.byteVal = byteVal; + return this; + } + + public Builder setBoolVal(final com.facebook.thrift.op.BoolPatch boolVal) { + this.boolVal = boolVal; return this; } public MyStructFieldPatch build() { MyStructFieldPatch result = new MyStructFieldPatch(); - result.setBoolVal(this.boolVal); - result.setByteVal(this.byteVal); - result.setI16Val(this.i16Val); - result.setI32Val(this.i32Val); - result.setI64Val(this.i64Val); - result.setFloatVal(this.floatVal); - result.setDoubleVal(this.doubleVal); - result.setStringVal(this.stringVal); - result.setBinaryVal(this.binaryVal); - result.setEnumVal(this.enumVal); - result.setStructVal(this.structVal); - result.setUnionVal(this.unionVal); - result.setLateStructVal(this.lateStructVal); - result.setDurationVal(this.durationVal); - result.setTimeVal(this.timeVal); - result.setOptBoolVal(this.optBoolVal); - result.setOptByteVal(this.optByteVal); - result.setOptI16Val(this.optI16Val); - result.setOptI32Val(this.optI32Val); - result.setOptI64Val(this.optI64Val); - result.setOptFloatVal(this.optFloatVal); - result.setOptDoubleVal(this.optDoubleVal); - result.setOptStringVal(this.optStringVal); - result.setOptBinaryVal(this.optBinaryVal); - result.setOptEnumVal(this.optEnumVal); - result.setOptStructVal(this.optStructVal); - result.setOptLateStructVal(this.optLateStructVal); - result.setOptListVal(this.optListVal); - result.setOptSetVal(this.optSetVal); result.setOptMapVal(this.optMapVal); + result.setOptSetVal(this.optSetVal); + result.setOptListVal(this.optListVal); + result.setOptLateStructVal(this.optLateStructVal); + result.setOptStructVal(this.optStructVal); + result.setOptEnumVal(this.optEnumVal); + result.setOptBinaryVal(this.optBinaryVal); + result.setOptStringVal(this.optStringVal); + result.setOptDoubleVal(this.optDoubleVal); + result.setOptFloatVal(this.optFloatVal); + result.setOptI64Val(this.optI64Val); + result.setOptI32Val(this.optI32Val); + result.setOptI16Val(this.optI16Val); + result.setOptByteVal(this.optByteVal); + result.setOptBoolVal(this.optBoolVal); + result.setTimeVal(this.timeVal); + result.setDurationVal(this.durationVal); + result.setLateStructVal(this.lateStructVal); + result.setUnionVal(this.unionVal); + result.setStructVal(this.structVal); + result.setEnumVal(this.enumVal); + result.setBinaryVal(this.binaryVal); + result.setStringVal(this.stringVal); + result.setDoubleVal(this.doubleVal); + result.setFloatVal(this.floatVal); + result.setI64Val(this.i64Val); + result.setI32Val(this.i32Val); + result.setI16Val(this.i16Val); + result.setByteVal(this.byteVal); + result.setBoolVal(this.boolVal); return result; } } @@ -487,95 +487,95 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl * Performs a deep copy on other. */ public MyStructFieldPatch(MyStructFieldPatch other) { - if (other.isSetBoolVal()) { - this.boolVal = TBaseHelper.deepCopy(other.boolVal); - } - if (other.isSetByteVal()) { - this.byteVal = TBaseHelper.deepCopy(other.byteVal); + if (other.isSetOptMapVal()) { + this.optMapVal = TBaseHelper.deepCopy(other.optMapVal); } - if (other.isSetI16Val()) { - this.i16Val = TBaseHelper.deepCopy(other.i16Val); + if (other.isSetOptSetVal()) { + this.optSetVal = TBaseHelper.deepCopy(other.optSetVal); } - if (other.isSetI32Val()) { - this.i32Val = TBaseHelper.deepCopy(other.i32Val); + if (other.isSetOptListVal()) { + this.optListVal = TBaseHelper.deepCopy(other.optListVal); } - if (other.isSetI64Val()) { - this.i64Val = TBaseHelper.deepCopy(other.i64Val); + if (other.isSetOptLateStructVal()) { + this.optLateStructVal = TBaseHelper.deepCopy(other.optLateStructVal); } - if (other.isSetFloatVal()) { - this.floatVal = TBaseHelper.deepCopy(other.floatVal); + if (other.isSetOptStructVal()) { + this.optStructVal = TBaseHelper.deepCopy(other.optStructVal); } - if (other.isSetDoubleVal()) { - this.doubleVal = TBaseHelper.deepCopy(other.doubleVal); + if (other.isSetOptEnumVal()) { + this.optEnumVal = TBaseHelper.deepCopy(other.optEnumVal); } - if (other.isSetStringVal()) { - this.stringVal = TBaseHelper.deepCopy(other.stringVal); + if (other.isSetOptBinaryVal()) { + this.optBinaryVal = TBaseHelper.deepCopy(other.optBinaryVal); } - if (other.isSetBinaryVal()) { - this.binaryVal = TBaseHelper.deepCopy(other.binaryVal); + if (other.isSetOptStringVal()) { + this.optStringVal = TBaseHelper.deepCopy(other.optStringVal); } - if (other.isSetEnumVal()) { - this.enumVal = TBaseHelper.deepCopy(other.enumVal); + if (other.isSetOptDoubleVal()) { + this.optDoubleVal = TBaseHelper.deepCopy(other.optDoubleVal); } - if (other.isSetStructVal()) { - this.structVal = TBaseHelper.deepCopy(other.structVal); + if (other.isSetOptFloatVal()) { + this.optFloatVal = TBaseHelper.deepCopy(other.optFloatVal); } - if (other.isSetUnionVal()) { - this.unionVal = TBaseHelper.deepCopy(other.unionVal); + if (other.isSetOptI64Val()) { + this.optI64Val = TBaseHelper.deepCopy(other.optI64Val); } - if (other.isSetLateStructVal()) { - this.lateStructVal = TBaseHelper.deepCopy(other.lateStructVal); + if (other.isSetOptI32Val()) { + this.optI32Val = TBaseHelper.deepCopy(other.optI32Val); } - if (other.isSetDurationVal()) { - this.durationVal = TBaseHelper.deepCopy(other.durationVal); + if (other.isSetOptI16Val()) { + this.optI16Val = TBaseHelper.deepCopy(other.optI16Val); } - if (other.isSetTimeVal()) { - this.timeVal = TBaseHelper.deepCopy(other.timeVal); + if (other.isSetOptByteVal()) { + this.optByteVal = TBaseHelper.deepCopy(other.optByteVal); } if (other.isSetOptBoolVal()) { this.optBoolVal = TBaseHelper.deepCopy(other.optBoolVal); } - if (other.isSetOptByteVal()) { - this.optByteVal = TBaseHelper.deepCopy(other.optByteVal); + if (other.isSetTimeVal()) { + this.timeVal = TBaseHelper.deepCopy(other.timeVal); } - if (other.isSetOptI16Val()) { - this.optI16Val = TBaseHelper.deepCopy(other.optI16Val); + if (other.isSetDurationVal()) { + this.durationVal = TBaseHelper.deepCopy(other.durationVal); } - if (other.isSetOptI32Val()) { - this.optI32Val = TBaseHelper.deepCopy(other.optI32Val); + if (other.isSetLateStructVal()) { + this.lateStructVal = TBaseHelper.deepCopy(other.lateStructVal); } - if (other.isSetOptI64Val()) { - this.optI64Val = TBaseHelper.deepCopy(other.optI64Val); + if (other.isSetUnionVal()) { + this.unionVal = TBaseHelper.deepCopy(other.unionVal); } - if (other.isSetOptFloatVal()) { - this.optFloatVal = TBaseHelper.deepCopy(other.optFloatVal); + if (other.isSetStructVal()) { + this.structVal = TBaseHelper.deepCopy(other.structVal); } - if (other.isSetOptDoubleVal()) { - this.optDoubleVal = TBaseHelper.deepCopy(other.optDoubleVal); + if (other.isSetEnumVal()) { + this.enumVal = TBaseHelper.deepCopy(other.enumVal); } - if (other.isSetOptStringVal()) { - this.optStringVal = TBaseHelper.deepCopy(other.optStringVal); + if (other.isSetBinaryVal()) { + this.binaryVal = TBaseHelper.deepCopy(other.binaryVal); + } + if (other.isSetStringVal()) { + this.stringVal = TBaseHelper.deepCopy(other.stringVal); } - if (other.isSetOptBinaryVal()) { - this.optBinaryVal = TBaseHelper.deepCopy(other.optBinaryVal); + if (other.isSetDoubleVal()) { + this.doubleVal = TBaseHelper.deepCopy(other.doubleVal); } - if (other.isSetOptEnumVal()) { - this.optEnumVal = TBaseHelper.deepCopy(other.optEnumVal); + if (other.isSetFloatVal()) { + this.floatVal = TBaseHelper.deepCopy(other.floatVal); } - if (other.isSetOptStructVal()) { - this.optStructVal = TBaseHelper.deepCopy(other.optStructVal); + if (other.isSetI64Val()) { + this.i64Val = TBaseHelper.deepCopy(other.i64Val); } - if (other.isSetOptLateStructVal()) { - this.optLateStructVal = TBaseHelper.deepCopy(other.optLateStructVal); + if (other.isSetI32Val()) { + this.i32Val = TBaseHelper.deepCopy(other.i32Val); } - if (other.isSetOptListVal()) { - this.optListVal = TBaseHelper.deepCopy(other.optListVal); + if (other.isSetI16Val()) { + this.i16Val = TBaseHelper.deepCopy(other.i16Val); } - if (other.isSetOptSetVal()) { - this.optSetVal = TBaseHelper.deepCopy(other.optSetVal); + if (other.isSetByteVal()) { + this.byteVal = TBaseHelper.deepCopy(other.byteVal); } - if (other.isSetOptMapVal()) { - this.optMapVal = TBaseHelper.deepCopy(other.optMapVal); + if (other.isSetBoolVal()) { + this.boolVal = TBaseHelper.deepCopy(other.boolVal); } } @@ -583,363 +583,339 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl return new MyStructFieldPatch(this); } - public com.facebook.thrift.op.BoolPatch getBoolVal() { - return this.boolVal; - } - - public MyStructFieldPatch setBoolVal(com.facebook.thrift.op.BoolPatch boolVal) { - this.boolVal = boolVal; - return this; - } - - public void unsetBoolVal() { - this.boolVal = null; - } - - // Returns true if field boolVal is set (has been assigned a value) and false otherwise - public boolean isSetBoolVal() { - return this.boolVal != null; - } - - public void setBoolValIsSet(boolean __value) { - if (!__value) { - this.boolVal = null; - } - } - - public com.facebook.thrift.op.BytePatch getByteVal() { - return this.byteVal; + public MyStructFieldN30Patch getOptMapVal() { + return this.optMapVal; } - public MyStructFieldPatch setByteVal(com.facebook.thrift.op.BytePatch byteVal) { - this.byteVal = byteVal; + public MyStructFieldPatch setOptMapVal(MyStructFieldN30Patch optMapVal) { + this.optMapVal = optMapVal; return this; } - public void unsetByteVal() { - this.byteVal = null; + public void unsetOptMapVal() { + this.optMapVal = null; } - // Returns true if field byteVal is set (has been assigned a value) and false otherwise - public boolean isSetByteVal() { - return this.byteVal != null; + // Returns true if field optMapVal is set (has been assigned a value) and false otherwise + public boolean isSetOptMapVal() { + return this.optMapVal != null; } - public void setByteValIsSet(boolean __value) { + public void setOptMapValIsSet(boolean __value) { if (!__value) { - this.byteVal = null; + this.optMapVal = null; } } - public com.facebook.thrift.op.I16Patch getI16Val() { - return this.i16Val; + public MyStructFieldN29Patch getOptSetVal() { + return this.optSetVal; } - public MyStructFieldPatch setI16Val(com.facebook.thrift.op.I16Patch i16Val) { - this.i16Val = i16Val; + public MyStructFieldPatch setOptSetVal(MyStructFieldN29Patch optSetVal) { + this.optSetVal = optSetVal; return this; } - public void unsetI16Val() { - this.i16Val = null; + public void unsetOptSetVal() { + this.optSetVal = null; } - // Returns true if field i16Val is set (has been assigned a value) and false otherwise - public boolean isSetI16Val() { - return this.i16Val != null; + // Returns true if field optSetVal is set (has been assigned a value) and false otherwise + public boolean isSetOptSetVal() { + return this.optSetVal != null; } - public void setI16ValIsSet(boolean __value) { + public void setOptSetValIsSet(boolean __value) { if (!__value) { - this.i16Val = null; + this.optSetVal = null; } } - public com.facebook.thrift.op.I32Patch getI32Val() { - return this.i32Val; + public MyStructFieldN28Patch getOptListVal() { + return this.optListVal; } - public MyStructFieldPatch setI32Val(com.facebook.thrift.op.I32Patch i32Val) { - this.i32Val = i32Val; + public MyStructFieldPatch setOptListVal(MyStructFieldN28Patch optListVal) { + this.optListVal = optListVal; return this; } - public void unsetI32Val() { - this.i32Val = null; + public void unsetOptListVal() { + this.optListVal = null; } - // Returns true if field i32Val is set (has been assigned a value) and false otherwise - public boolean isSetI32Val() { - return this.i32Val != null; + // Returns true if field optListVal is set (has been assigned a value) and false otherwise + public boolean isSetOptListVal() { + return this.optListVal != null; } - public void setI32ValIsSet(boolean __value) { + public void setOptListValIsSet(boolean __value) { if (!__value) { - this.i32Val = null; + this.optListVal = null; } } - public com.facebook.thrift.op.I64Patch getI64Val() { - return this.i64Val; + public LateDefStructPatch getOptLateStructVal() { + return this.optLateStructVal; } - public MyStructFieldPatch setI64Val(com.facebook.thrift.op.I64Patch i64Val) { - this.i64Val = i64Val; + public MyStructFieldPatch setOptLateStructVal(LateDefStructPatch optLateStructVal) { + this.optLateStructVal = optLateStructVal; return this; } - public void unsetI64Val() { - this.i64Val = null; + public void unsetOptLateStructVal() { + this.optLateStructVal = null; } - // Returns true if field i64Val is set (has been assigned a value) and false otherwise - public boolean isSetI64Val() { - return this.i64Val != null; + // Returns true if field optLateStructVal is set (has been assigned a value) and false otherwise + public boolean isSetOptLateStructVal() { + return this.optLateStructVal != null; } - public void setI64ValIsSet(boolean __value) { + public void setOptLateStructValIsSet(boolean __value) { if (!__value) { - this.i64Val = null; + this.optLateStructVal = null; } } - public com.facebook.thrift.op.FloatPatch getFloatVal() { - return this.floatVal; + public MyDataPatch getOptStructVal() { + return this.optStructVal; } - public MyStructFieldPatch setFloatVal(com.facebook.thrift.op.FloatPatch floatVal) { - this.floatVal = floatVal; + public MyStructFieldPatch setOptStructVal(MyDataPatch optStructVal) { + this.optStructVal = optStructVal; return this; } - public void unsetFloatVal() { - this.floatVal = null; + public void unsetOptStructVal() { + this.optStructVal = null; } - // Returns true if field floatVal is set (has been assigned a value) and false otherwise - public boolean isSetFloatVal() { - return this.floatVal != null; + // Returns true if field optStructVal is set (has been assigned a value) and false otherwise + public boolean isSetOptStructVal() { + return this.optStructVal != null; } - public void setFloatValIsSet(boolean __value) { + public void setOptStructValIsSet(boolean __value) { if (!__value) { - this.floatVal = null; + this.optStructVal = null; } } - public com.facebook.thrift.op.DoublePatch getDoubleVal() { - return this.doubleVal; + public MyStructFieldN25Patch getOptEnumVal() { + return this.optEnumVal; } - public MyStructFieldPatch setDoubleVal(com.facebook.thrift.op.DoublePatch doubleVal) { - this.doubleVal = doubleVal; + public MyStructFieldPatch setOptEnumVal(MyStructFieldN25Patch optEnumVal) { + this.optEnumVal = optEnumVal; return this; } - public void unsetDoubleVal() { - this.doubleVal = null; + public void unsetOptEnumVal() { + this.optEnumVal = null; } - // Returns true if field doubleVal is set (has been assigned a value) and false otherwise - public boolean isSetDoubleVal() { - return this.doubleVal != null; + // Returns true if field optEnumVal is set (has been assigned a value) and false otherwise + public boolean isSetOptEnumVal() { + return this.optEnumVal != null; } - public void setDoubleValIsSet(boolean __value) { + public void setOptEnumValIsSet(boolean __value) { if (!__value) { - this.doubleVal = null; + this.optEnumVal = null; } } - public com.facebook.thrift.op.StringPatch getStringVal() { - return this.stringVal; + public com.facebook.thrift.op.BinaryPatch getOptBinaryVal() { + return this.optBinaryVal; } - public MyStructFieldPatch setStringVal(com.facebook.thrift.op.StringPatch stringVal) { - this.stringVal = stringVal; + public MyStructFieldPatch setOptBinaryVal(com.facebook.thrift.op.BinaryPatch optBinaryVal) { + this.optBinaryVal = optBinaryVal; return this; } - public void unsetStringVal() { - this.stringVal = null; + public void unsetOptBinaryVal() { + this.optBinaryVal = null; } - // Returns true if field stringVal is set (has been assigned a value) and false otherwise - public boolean isSetStringVal() { - return this.stringVal != null; + // Returns true if field optBinaryVal is set (has been assigned a value) and false otherwise + public boolean isSetOptBinaryVal() { + return this.optBinaryVal != null; } - public void setStringValIsSet(boolean __value) { + public void setOptBinaryValIsSet(boolean __value) { if (!__value) { - this.stringVal = null; + this.optBinaryVal = null; } } - public com.facebook.thrift.op.BinaryPatch getBinaryVal() { - return this.binaryVal; + public com.facebook.thrift.op.StringPatch getOptStringVal() { + return this.optStringVal; } - public MyStructFieldPatch setBinaryVal(com.facebook.thrift.op.BinaryPatch binaryVal) { - this.binaryVal = binaryVal; + public MyStructFieldPatch setOptStringVal(com.facebook.thrift.op.StringPatch optStringVal) { + this.optStringVal = optStringVal; return this; } - public void unsetBinaryVal() { - this.binaryVal = null; + public void unsetOptStringVal() { + this.optStringVal = null; } - // Returns true if field binaryVal is set (has been assigned a value) and false otherwise - public boolean isSetBinaryVal() { - return this.binaryVal != null; + // Returns true if field optStringVal is set (has been assigned a value) and false otherwise + public boolean isSetOptStringVal() { + return this.optStringVal != null; } - public void setBinaryValIsSet(boolean __value) { + public void setOptStringValIsSet(boolean __value) { if (!__value) { - this.binaryVal = null; + this.optStringVal = null; } } - public MyStructFieldN10Patch getEnumVal() { - return this.enumVal; + public com.facebook.thrift.op.DoublePatch getOptDoubleVal() { + return this.optDoubleVal; } - public MyStructFieldPatch setEnumVal(MyStructFieldN10Patch enumVal) { - this.enumVal = enumVal; + public MyStructFieldPatch setOptDoubleVal(com.facebook.thrift.op.DoublePatch optDoubleVal) { + this.optDoubleVal = optDoubleVal; return this; } - public void unsetEnumVal() { - this.enumVal = null; + public void unsetOptDoubleVal() { + this.optDoubleVal = null; } - // Returns true if field enumVal is set (has been assigned a value) and false otherwise - public boolean isSetEnumVal() { - return this.enumVal != null; + // Returns true if field optDoubleVal is set (has been assigned a value) and false otherwise + public boolean isSetOptDoubleVal() { + return this.optDoubleVal != null; } - public void setEnumValIsSet(boolean __value) { + public void setOptDoubleValIsSet(boolean __value) { if (!__value) { - this.enumVal = null; + this.optDoubleVal = null; } } - public MyDataPatch getStructVal() { - return this.structVal; + public com.facebook.thrift.op.FloatPatch getOptFloatVal() { + return this.optFloatVal; } - public MyStructFieldPatch setStructVal(MyDataPatch structVal) { - this.structVal = structVal; + public MyStructFieldPatch setOptFloatVal(com.facebook.thrift.op.FloatPatch optFloatVal) { + this.optFloatVal = optFloatVal; return this; } - public void unsetStructVal() { - this.structVal = null; + public void unsetOptFloatVal() { + this.optFloatVal = null; } - // Returns true if field structVal is set (has been assigned a value) and false otherwise - public boolean isSetStructVal() { - return this.structVal != null; + // Returns true if field optFloatVal is set (has been assigned a value) and false otherwise + public boolean isSetOptFloatVal() { + return this.optFloatVal != null; } - public void setStructValIsSet(boolean __value) { + public void setOptFloatValIsSet(boolean __value) { if (!__value) { - this.structVal = null; + this.optFloatVal = null; } } - public MyUnionPatch getUnionVal() { - return this.unionVal; + public com.facebook.thrift.op.I64Patch getOptI64Val() { + return this.optI64Val; } - public MyStructFieldPatch setUnionVal(MyUnionPatch unionVal) { - this.unionVal = unionVal; + public MyStructFieldPatch setOptI64Val(com.facebook.thrift.op.I64Patch optI64Val) { + this.optI64Val = optI64Val; return this; } - public void unsetUnionVal() { - this.unionVal = null; + public void unsetOptI64Val() { + this.optI64Val = null; } - // Returns true if field unionVal is set (has been assigned a value) and false otherwise - public boolean isSetUnionVal() { - return this.unionVal != null; + // Returns true if field optI64Val is set (has been assigned a value) and false otherwise + public boolean isSetOptI64Val() { + return this.optI64Val != null; } - public void setUnionValIsSet(boolean __value) { + public void setOptI64ValIsSet(boolean __value) { if (!__value) { - this.unionVal = null; + this.optI64Val = null; } } - public LateDefStructPatch getLateStructVal() { - return this.lateStructVal; + public com.facebook.thrift.op.I32Patch getOptI32Val() { + return this.optI32Val; } - public MyStructFieldPatch setLateStructVal(LateDefStructPatch lateStructVal) { - this.lateStructVal = lateStructVal; + public MyStructFieldPatch setOptI32Val(com.facebook.thrift.op.I32Patch optI32Val) { + this.optI32Val = optI32Val; return this; } - public void unsetLateStructVal() { - this.lateStructVal = null; + public void unsetOptI32Val() { + this.optI32Val = null; } - // Returns true if field lateStructVal is set (has been assigned a value) and false otherwise - public boolean isSetLateStructVal() { - return this.lateStructVal != null; + // Returns true if field optI32Val is set (has been assigned a value) and false otherwise + public boolean isSetOptI32Val() { + return this.optI32Val != null; } - public void setLateStructValIsSet(boolean __value) { + public void setOptI32ValIsSet(boolean __value) { if (!__value) { - this.lateStructVal = null; + this.optI32Val = null; } } - public com.facebook.thrift.op.DurationPatch getDurationVal() { - return this.durationVal; + public com.facebook.thrift.op.I16Patch getOptI16Val() { + return this.optI16Val; } - public MyStructFieldPatch setDurationVal(com.facebook.thrift.op.DurationPatch durationVal) { - this.durationVal = durationVal; + public MyStructFieldPatch setOptI16Val(com.facebook.thrift.op.I16Patch optI16Val) { + this.optI16Val = optI16Val; return this; } - public void unsetDurationVal() { - this.durationVal = null; + public void unsetOptI16Val() { + this.optI16Val = null; } - // Returns true if field durationVal is set (has been assigned a value) and false otherwise - public boolean isSetDurationVal() { - return this.durationVal != null; + // Returns true if field optI16Val is set (has been assigned a value) and false otherwise + public boolean isSetOptI16Val() { + return this.optI16Val != null; } - public void setDurationValIsSet(boolean __value) { + public void setOptI16ValIsSet(boolean __value) { if (!__value) { - this.durationVal = null; + this.optI16Val = null; } } - public com.facebook.thrift.op.TimePatch getTimeVal() { - return this.timeVal; + public com.facebook.thrift.op.BytePatch getOptByteVal() { + return this.optByteVal; } - public MyStructFieldPatch setTimeVal(com.facebook.thrift.op.TimePatch timeVal) { - this.timeVal = timeVal; + public MyStructFieldPatch setOptByteVal(com.facebook.thrift.op.BytePatch optByteVal) { + this.optByteVal = optByteVal; return this; } - public void unsetTimeVal() { - this.timeVal = null; + public void unsetOptByteVal() { + this.optByteVal = null; } - // Returns true if field timeVal is set (has been assigned a value) and false otherwise - public boolean isSetTimeVal() { - return this.timeVal != null; + // Returns true if field optByteVal is set (has been assigned a value) and false otherwise + public boolean isSetOptByteVal() { + return this.optByteVal != null; } - public void setTimeValIsSet(boolean __value) { + public void setOptByteValIsSet(boolean __value) { if (!__value) { - this.timeVal = null; + this.optByteVal = null; } } @@ -967,461 +943,477 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl } } - public com.facebook.thrift.op.BytePatch getOptByteVal() { - return this.optByteVal; + public com.facebook.thrift.op.TimePatch getTimeVal() { + return this.timeVal; } - public MyStructFieldPatch setOptByteVal(com.facebook.thrift.op.BytePatch optByteVal) { - this.optByteVal = optByteVal; + public MyStructFieldPatch setTimeVal(com.facebook.thrift.op.TimePatch timeVal) { + this.timeVal = timeVal; return this; } - public void unsetOptByteVal() { - this.optByteVal = null; + public void unsetTimeVal() { + this.timeVal = null; } - // Returns true if field optByteVal is set (has been assigned a value) and false otherwise - public boolean isSetOptByteVal() { - return this.optByteVal != null; + // Returns true if field timeVal is set (has been assigned a value) and false otherwise + public boolean isSetTimeVal() { + return this.timeVal != null; } - public void setOptByteValIsSet(boolean __value) { + public void setTimeValIsSet(boolean __value) { if (!__value) { - this.optByteVal = null; + this.timeVal = null; } } - public com.facebook.thrift.op.I16Patch getOptI16Val() { - return this.optI16Val; + public com.facebook.thrift.op.DurationPatch getDurationVal() { + return this.durationVal; } - public MyStructFieldPatch setOptI16Val(com.facebook.thrift.op.I16Patch optI16Val) { - this.optI16Val = optI16Val; + public MyStructFieldPatch setDurationVal(com.facebook.thrift.op.DurationPatch durationVal) { + this.durationVal = durationVal; return this; } - public void unsetOptI16Val() { - this.optI16Val = null; + public void unsetDurationVal() { + this.durationVal = null; } - // Returns true if field optI16Val is set (has been assigned a value) and false otherwise - public boolean isSetOptI16Val() { - return this.optI16Val != null; + // Returns true if field durationVal is set (has been assigned a value) and false otherwise + public boolean isSetDurationVal() { + return this.durationVal != null; } - public void setOptI16ValIsSet(boolean __value) { + public void setDurationValIsSet(boolean __value) { if (!__value) { - this.optI16Val = null; + this.durationVal = null; } } - public com.facebook.thrift.op.I32Patch getOptI32Val() { - return this.optI32Val; + public LateDefStructPatch getLateStructVal() { + return this.lateStructVal; } - public MyStructFieldPatch setOptI32Val(com.facebook.thrift.op.I32Patch optI32Val) { - this.optI32Val = optI32Val; + public MyStructFieldPatch setLateStructVal(LateDefStructPatch lateStructVal) { + this.lateStructVal = lateStructVal; return this; } - public void unsetOptI32Val() { - this.optI32Val = null; + public void unsetLateStructVal() { + this.lateStructVal = null; } - // Returns true if field optI32Val is set (has been assigned a value) and false otherwise - public boolean isSetOptI32Val() { - return this.optI32Val != null; + // Returns true if field lateStructVal is set (has been assigned a value) and false otherwise + public boolean isSetLateStructVal() { + return this.lateStructVal != null; } - public void setOptI32ValIsSet(boolean __value) { + public void setLateStructValIsSet(boolean __value) { if (!__value) { - this.optI32Val = null; + this.lateStructVal = null; } } - public com.facebook.thrift.op.I64Patch getOptI64Val() { - return this.optI64Val; + public MyUnionPatch getUnionVal() { + return this.unionVal; } - public MyStructFieldPatch setOptI64Val(com.facebook.thrift.op.I64Patch optI64Val) { - this.optI64Val = optI64Val; + public MyStructFieldPatch setUnionVal(MyUnionPatch unionVal) { + this.unionVal = unionVal; return this; } - public void unsetOptI64Val() { - this.optI64Val = null; + public void unsetUnionVal() { + this.unionVal = null; } - // Returns true if field optI64Val is set (has been assigned a value) and false otherwise - public boolean isSetOptI64Val() { - return this.optI64Val != null; + // Returns true if field unionVal is set (has been assigned a value) and false otherwise + public boolean isSetUnionVal() { + return this.unionVal != null; } - public void setOptI64ValIsSet(boolean __value) { + public void setUnionValIsSet(boolean __value) { if (!__value) { - this.optI64Val = null; + this.unionVal = null; } } - public com.facebook.thrift.op.FloatPatch getOptFloatVal() { - return this.optFloatVal; + public MyDataPatch getStructVal() { + return this.structVal; } - public MyStructFieldPatch setOptFloatVal(com.facebook.thrift.op.FloatPatch optFloatVal) { - this.optFloatVal = optFloatVal; + public MyStructFieldPatch setStructVal(MyDataPatch structVal) { + this.structVal = structVal; return this; } - public void unsetOptFloatVal() { - this.optFloatVal = null; + public void unsetStructVal() { + this.structVal = null; } - // Returns true if field optFloatVal is set (has been assigned a value) and false otherwise - public boolean isSetOptFloatVal() { - return this.optFloatVal != null; + // Returns true if field structVal is set (has been assigned a value) and false otherwise + public boolean isSetStructVal() { + return this.structVal != null; } - public void setOptFloatValIsSet(boolean __value) { + public void setStructValIsSet(boolean __value) { if (!__value) { - this.optFloatVal = null; + this.structVal = null; } } - public com.facebook.thrift.op.DoublePatch getOptDoubleVal() { - return this.optDoubleVal; + public MyStructFieldN10Patch getEnumVal() { + return this.enumVal; } - public MyStructFieldPatch setOptDoubleVal(com.facebook.thrift.op.DoublePatch optDoubleVal) { - this.optDoubleVal = optDoubleVal; + public MyStructFieldPatch setEnumVal(MyStructFieldN10Patch enumVal) { + this.enumVal = enumVal; return this; } - public void unsetOptDoubleVal() { - this.optDoubleVal = null; + public void unsetEnumVal() { + this.enumVal = null; } - // Returns true if field optDoubleVal is set (has been assigned a value) and false otherwise - public boolean isSetOptDoubleVal() { - return this.optDoubleVal != null; + // Returns true if field enumVal is set (has been assigned a value) and false otherwise + public boolean isSetEnumVal() { + return this.enumVal != null; + } + + public void setEnumValIsSet(boolean __value) { + if (!__value) { + this.enumVal = null; + } + } + + public com.facebook.thrift.op.BinaryPatch getBinaryVal() { + return this.binaryVal; + } + + public MyStructFieldPatch setBinaryVal(com.facebook.thrift.op.BinaryPatch binaryVal) { + this.binaryVal = binaryVal; + return this; + } + + public void unsetBinaryVal() { + this.binaryVal = null; + } + + // Returns true if field binaryVal is set (has been assigned a value) and false otherwise + public boolean isSetBinaryVal() { + return this.binaryVal != null; } - public void setOptDoubleValIsSet(boolean __value) { + public void setBinaryValIsSet(boolean __value) { if (!__value) { - this.optDoubleVal = null; + this.binaryVal = null; } } - public com.facebook.thrift.op.StringPatch getOptStringVal() { - return this.optStringVal; + public com.facebook.thrift.op.StringPatch getStringVal() { + return this.stringVal; } - public MyStructFieldPatch setOptStringVal(com.facebook.thrift.op.StringPatch optStringVal) { - this.optStringVal = optStringVal; + public MyStructFieldPatch setStringVal(com.facebook.thrift.op.StringPatch stringVal) { + this.stringVal = stringVal; return this; } - public void unsetOptStringVal() { - this.optStringVal = null; + public void unsetStringVal() { + this.stringVal = null; } - // Returns true if field optStringVal is set (has been assigned a value) and false otherwise - public boolean isSetOptStringVal() { - return this.optStringVal != null; + // Returns true if field stringVal is set (has been assigned a value) and false otherwise + public boolean isSetStringVal() { + return this.stringVal != null; } - public void setOptStringValIsSet(boolean __value) { + public void setStringValIsSet(boolean __value) { if (!__value) { - this.optStringVal = null; + this.stringVal = null; } } - public com.facebook.thrift.op.BinaryPatch getOptBinaryVal() { - return this.optBinaryVal; + public com.facebook.thrift.op.DoublePatch getDoubleVal() { + return this.doubleVal; } - public MyStructFieldPatch setOptBinaryVal(com.facebook.thrift.op.BinaryPatch optBinaryVal) { - this.optBinaryVal = optBinaryVal; + public MyStructFieldPatch setDoubleVal(com.facebook.thrift.op.DoublePatch doubleVal) { + this.doubleVal = doubleVal; return this; } - public void unsetOptBinaryVal() { - this.optBinaryVal = null; + public void unsetDoubleVal() { + this.doubleVal = null; } - // Returns true if field optBinaryVal is set (has been assigned a value) and false otherwise - public boolean isSetOptBinaryVal() { - return this.optBinaryVal != null; + // Returns true if field doubleVal is set (has been assigned a value) and false otherwise + public boolean isSetDoubleVal() { + return this.doubleVal != null; } - public void setOptBinaryValIsSet(boolean __value) { + public void setDoubleValIsSet(boolean __value) { if (!__value) { - this.optBinaryVal = null; + this.doubleVal = null; } } - public MyStructFieldN25Patch getOptEnumVal() { - return this.optEnumVal; + public com.facebook.thrift.op.FloatPatch getFloatVal() { + return this.floatVal; } - public MyStructFieldPatch setOptEnumVal(MyStructFieldN25Patch optEnumVal) { - this.optEnumVal = optEnumVal; + public MyStructFieldPatch setFloatVal(com.facebook.thrift.op.FloatPatch floatVal) { + this.floatVal = floatVal; return this; } - public void unsetOptEnumVal() { - this.optEnumVal = null; + public void unsetFloatVal() { + this.floatVal = null; } - // Returns true if field optEnumVal is set (has been assigned a value) and false otherwise - public boolean isSetOptEnumVal() { - return this.optEnumVal != null; + // Returns true if field floatVal is set (has been assigned a value) and false otherwise + public boolean isSetFloatVal() { + return this.floatVal != null; } - public void setOptEnumValIsSet(boolean __value) { + public void setFloatValIsSet(boolean __value) { if (!__value) { - this.optEnumVal = null; + this.floatVal = null; } } - public MyDataPatch getOptStructVal() { - return this.optStructVal; + public com.facebook.thrift.op.I64Patch getI64Val() { + return this.i64Val; } - public MyStructFieldPatch setOptStructVal(MyDataPatch optStructVal) { - this.optStructVal = optStructVal; + public MyStructFieldPatch setI64Val(com.facebook.thrift.op.I64Patch i64Val) { + this.i64Val = i64Val; return this; } - public void unsetOptStructVal() { - this.optStructVal = null; + public void unsetI64Val() { + this.i64Val = null; } - // Returns true if field optStructVal is set (has been assigned a value) and false otherwise - public boolean isSetOptStructVal() { - return this.optStructVal != null; + // Returns true if field i64Val is set (has been assigned a value) and false otherwise + public boolean isSetI64Val() { + return this.i64Val != null; } - public void setOptStructValIsSet(boolean __value) { + public void setI64ValIsSet(boolean __value) { if (!__value) { - this.optStructVal = null; + this.i64Val = null; } } - public LateDefStructPatch getOptLateStructVal() { - return this.optLateStructVal; + public com.facebook.thrift.op.I32Patch getI32Val() { + return this.i32Val; } - public MyStructFieldPatch setOptLateStructVal(LateDefStructPatch optLateStructVal) { - this.optLateStructVal = optLateStructVal; + public MyStructFieldPatch setI32Val(com.facebook.thrift.op.I32Patch i32Val) { + this.i32Val = i32Val; return this; } - public void unsetOptLateStructVal() { - this.optLateStructVal = null; + public void unsetI32Val() { + this.i32Val = null; } - // Returns true if field optLateStructVal is set (has been assigned a value) and false otherwise - public boolean isSetOptLateStructVal() { - return this.optLateStructVal != null; + // Returns true if field i32Val is set (has been assigned a value) and false otherwise + public boolean isSetI32Val() { + return this.i32Val != null; } - public void setOptLateStructValIsSet(boolean __value) { + public void setI32ValIsSet(boolean __value) { if (!__value) { - this.optLateStructVal = null; + this.i32Val = null; } } - public MyStructFieldN28Patch getOptListVal() { - return this.optListVal; + public com.facebook.thrift.op.I16Patch getI16Val() { + return this.i16Val; } - public MyStructFieldPatch setOptListVal(MyStructFieldN28Patch optListVal) { - this.optListVal = optListVal; + public MyStructFieldPatch setI16Val(com.facebook.thrift.op.I16Patch i16Val) { + this.i16Val = i16Val; return this; } - public void unsetOptListVal() { - this.optListVal = null; + public void unsetI16Val() { + this.i16Val = null; } - // Returns true if field optListVal is set (has been assigned a value) and false otherwise - public boolean isSetOptListVal() { - return this.optListVal != null; + // Returns true if field i16Val is set (has been assigned a value) and false otherwise + public boolean isSetI16Val() { + return this.i16Val != null; } - public void setOptListValIsSet(boolean __value) { + public void setI16ValIsSet(boolean __value) { if (!__value) { - this.optListVal = null; + this.i16Val = null; } } - public MyStructFieldN29Patch getOptSetVal() { - return this.optSetVal; + public com.facebook.thrift.op.BytePatch getByteVal() { + return this.byteVal; } - public MyStructFieldPatch setOptSetVal(MyStructFieldN29Patch optSetVal) { - this.optSetVal = optSetVal; + public MyStructFieldPatch setByteVal(com.facebook.thrift.op.BytePatch byteVal) { + this.byteVal = byteVal; return this; } - public void unsetOptSetVal() { - this.optSetVal = null; + public void unsetByteVal() { + this.byteVal = null; } - // Returns true if field optSetVal is set (has been assigned a value) and false otherwise - public boolean isSetOptSetVal() { - return this.optSetVal != null; + // Returns true if field byteVal is set (has been assigned a value) and false otherwise + public boolean isSetByteVal() { + return this.byteVal != null; } - public void setOptSetValIsSet(boolean __value) { + public void setByteValIsSet(boolean __value) { if (!__value) { - this.optSetVal = null; + this.byteVal = null; } } - public MyStructFieldN30Patch getOptMapVal() { - return this.optMapVal; + public com.facebook.thrift.op.BoolPatch getBoolVal() { + return this.boolVal; } - public MyStructFieldPatch setOptMapVal(MyStructFieldN30Patch optMapVal) { - this.optMapVal = optMapVal; + public MyStructFieldPatch setBoolVal(com.facebook.thrift.op.BoolPatch boolVal) { + this.boolVal = boolVal; return this; } - public void unsetOptMapVal() { - this.optMapVal = null; + public void unsetBoolVal() { + this.boolVal = null; } - // Returns true if field optMapVal is set (has been assigned a value) and false otherwise - public boolean isSetOptMapVal() { - return this.optMapVal != null; + // Returns true if field boolVal is set (has been assigned a value) and false otherwise + public boolean isSetBoolVal() { + return this.boolVal != null; } - public void setOptMapValIsSet(boolean __value) { + public void setBoolValIsSet(boolean __value) { if (!__value) { - this.optMapVal = null; + this.boolVal = null; } } public void setFieldValue(int fieldID, Object __value) { switch (fieldID) { - case BOOLVAL: - if (__value == null) { - unsetBoolVal(); - } else { - setBoolVal((com.facebook.thrift.op.BoolPatch)__value); - } - break; - - case BYTEVAL: + case OPTMAPVAL: if (__value == null) { - unsetByteVal(); + unsetOptMapVal(); } else { - setByteVal((com.facebook.thrift.op.BytePatch)__value); + setOptMapVal((MyStructFieldN30Patch)__value); } break; - case I16VAL: + case OPTSETVAL: if (__value == null) { - unsetI16Val(); + unsetOptSetVal(); } else { - setI16Val((com.facebook.thrift.op.I16Patch)__value); + setOptSetVal((MyStructFieldN29Patch)__value); } break; - case I32VAL: + case OPTLISTVAL: if (__value == null) { - unsetI32Val(); + unsetOptListVal(); } else { - setI32Val((com.facebook.thrift.op.I32Patch)__value); + setOptListVal((MyStructFieldN28Patch)__value); } break; - case I64VAL: + case OPTLATESTRUCTVAL: if (__value == null) { - unsetI64Val(); + unsetOptLateStructVal(); } else { - setI64Val((com.facebook.thrift.op.I64Patch)__value); + setOptLateStructVal((LateDefStructPatch)__value); } break; - case FLOATVAL: + case OPTSTRUCTVAL: if (__value == null) { - unsetFloatVal(); + unsetOptStructVal(); } else { - setFloatVal((com.facebook.thrift.op.FloatPatch)__value); + setOptStructVal((MyDataPatch)__value); } break; - case DOUBLEVAL: + case OPTENUMVAL: if (__value == null) { - unsetDoubleVal(); + unsetOptEnumVal(); } else { - setDoubleVal((com.facebook.thrift.op.DoublePatch)__value); + setOptEnumVal((MyStructFieldN25Patch)__value); } break; - case STRINGVAL: + case OPTBINARYVAL: if (__value == null) { - unsetStringVal(); + unsetOptBinaryVal(); } else { - setStringVal((com.facebook.thrift.op.StringPatch)__value); + setOptBinaryVal((com.facebook.thrift.op.BinaryPatch)__value); } break; - case BINARYVAL: + case OPTSTRINGVAL: if (__value == null) { - unsetBinaryVal(); + unsetOptStringVal(); } else { - setBinaryVal((com.facebook.thrift.op.BinaryPatch)__value); + setOptStringVal((com.facebook.thrift.op.StringPatch)__value); } break; - case ENUMVAL: + case OPTDOUBLEVAL: if (__value == null) { - unsetEnumVal(); + unsetOptDoubleVal(); } else { - setEnumVal((MyStructFieldN10Patch)__value); + setOptDoubleVal((com.facebook.thrift.op.DoublePatch)__value); } break; - case STRUCTVAL: + case OPTFLOATVAL: if (__value == null) { - unsetStructVal(); + unsetOptFloatVal(); } else { - setStructVal((MyDataPatch)__value); + setOptFloatVal((com.facebook.thrift.op.FloatPatch)__value); } break; - case UNIONVAL: + case OPTI64VAL: if (__value == null) { - unsetUnionVal(); + unsetOptI64Val(); } else { - setUnionVal((MyUnionPatch)__value); + setOptI64Val((com.facebook.thrift.op.I64Patch)__value); } break; - case LATESTRUCTVAL: + case OPTI32VAL: if (__value == null) { - unsetLateStructVal(); + unsetOptI32Val(); } else { - setLateStructVal((LateDefStructPatch)__value); + setOptI32Val((com.facebook.thrift.op.I32Patch)__value); } break; - case DURATIONVAL: + case OPTI16VAL: if (__value == null) { - unsetDurationVal(); + unsetOptI16Val(); } else { - setDurationVal((com.facebook.thrift.op.DurationPatch)__value); + setOptI16Val((com.facebook.thrift.op.I16Patch)__value); } break; - case TIMEVAL: + case OPTBYTEVAL: if (__value == null) { - unsetTimeVal(); + unsetOptByteVal(); } else { - setTimeVal((com.facebook.thrift.op.TimePatch)__value); + setOptByteVal((com.facebook.thrift.op.BytePatch)__value); } break; @@ -1433,115 +1425,123 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl } break; - case OPTBYTEVAL: + case TIMEVAL: if (__value == null) { - unsetOptByteVal(); + unsetTimeVal(); } else { - setOptByteVal((com.facebook.thrift.op.BytePatch)__value); + setTimeVal((com.facebook.thrift.op.TimePatch)__value); } break; - case OPTI16VAL: + case DURATIONVAL: if (__value == null) { - unsetOptI16Val(); + unsetDurationVal(); } else { - setOptI16Val((com.facebook.thrift.op.I16Patch)__value); + setDurationVal((com.facebook.thrift.op.DurationPatch)__value); } break; - case OPTI32VAL: + case LATESTRUCTVAL: if (__value == null) { - unsetOptI32Val(); + unsetLateStructVal(); } else { - setOptI32Val((com.facebook.thrift.op.I32Patch)__value); + setLateStructVal((LateDefStructPatch)__value); } break; - case OPTI64VAL: + case UNIONVAL: if (__value == null) { - unsetOptI64Val(); + unsetUnionVal(); } else { - setOptI64Val((com.facebook.thrift.op.I64Patch)__value); + setUnionVal((MyUnionPatch)__value); } break; - case OPTFLOATVAL: + case STRUCTVAL: if (__value == null) { - unsetOptFloatVal(); + unsetStructVal(); } else { - setOptFloatVal((com.facebook.thrift.op.FloatPatch)__value); + setStructVal((MyDataPatch)__value); } break; - case OPTDOUBLEVAL: + case ENUMVAL: if (__value == null) { - unsetOptDoubleVal(); + unsetEnumVal(); } else { - setOptDoubleVal((com.facebook.thrift.op.DoublePatch)__value); + setEnumVal((MyStructFieldN10Patch)__value); } break; - case OPTSTRINGVAL: + case BINARYVAL: if (__value == null) { - unsetOptStringVal(); + unsetBinaryVal(); } else { - setOptStringVal((com.facebook.thrift.op.StringPatch)__value); + setBinaryVal((com.facebook.thrift.op.BinaryPatch)__value); } break; - case OPTBINARYVAL: + case STRINGVAL: if (__value == null) { - unsetOptBinaryVal(); + unsetStringVal(); } else { - setOptBinaryVal((com.facebook.thrift.op.BinaryPatch)__value); + setStringVal((com.facebook.thrift.op.StringPatch)__value); } break; - case OPTENUMVAL: + case DOUBLEVAL: if (__value == null) { - unsetOptEnumVal(); + unsetDoubleVal(); } else { - setOptEnumVal((MyStructFieldN25Patch)__value); + setDoubleVal((com.facebook.thrift.op.DoublePatch)__value); } break; - case OPTSTRUCTVAL: + case FLOATVAL: if (__value == null) { - unsetOptStructVal(); + unsetFloatVal(); } else { - setOptStructVal((MyDataPatch)__value); + setFloatVal((com.facebook.thrift.op.FloatPatch)__value); } break; - case OPTLATESTRUCTVAL: + case I64VAL: if (__value == null) { - unsetOptLateStructVal(); + unsetI64Val(); } else { - setOptLateStructVal((LateDefStructPatch)__value); + setI64Val((com.facebook.thrift.op.I64Patch)__value); } break; - case OPTLISTVAL: + case I32VAL: if (__value == null) { - unsetOptListVal(); + unsetI32Val(); } else { - setOptListVal((MyStructFieldN28Patch)__value); + setI32Val((com.facebook.thrift.op.I32Patch)__value); } break; - case OPTSETVAL: + case I16VAL: if (__value == null) { - unsetOptSetVal(); + unsetI16Val(); } else { - setOptSetVal((MyStructFieldN29Patch)__value); + setI16Val((com.facebook.thrift.op.I16Patch)__value); } break; - case OPTMAPVAL: + case BYTEVAL: if (__value == null) { - unsetOptMapVal(); + unsetByteVal(); } else { - setOptMapVal((MyStructFieldN30Patch)__value); + setByteVal((com.facebook.thrift.op.BytePatch)__value); + } + break; + + case BOOLVAL: + if (__value == null) { + unsetBoolVal(); + } else { + setBoolVal((com.facebook.thrift.op.BoolPatch)__value); } break; @@ -1552,95 +1552,95 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl public Object getFieldValue(int fieldID) { switch (fieldID) { - case BOOLVAL: - return getBoolVal(); - - case BYTEVAL: - return getByteVal(); + case OPTMAPVAL: + return getOptMapVal(); - case I16VAL: - return getI16Val(); + case OPTSETVAL: + return getOptSetVal(); - case I32VAL: - return getI32Val(); + case OPTLISTVAL: + return getOptListVal(); - case I64VAL: - return getI64Val(); + case OPTLATESTRUCTVAL: + return getOptLateStructVal(); - case FLOATVAL: - return getFloatVal(); + case OPTSTRUCTVAL: + return getOptStructVal(); - case DOUBLEVAL: - return getDoubleVal(); + case OPTENUMVAL: + return getOptEnumVal(); - case STRINGVAL: - return getStringVal(); + case OPTBINARYVAL: + return getOptBinaryVal(); - case BINARYVAL: - return getBinaryVal(); + case OPTSTRINGVAL: + return getOptStringVal(); - case ENUMVAL: - return getEnumVal(); + case OPTDOUBLEVAL: + return getOptDoubleVal(); - case STRUCTVAL: - return getStructVal(); + case OPTFLOATVAL: + return getOptFloatVal(); - case UNIONVAL: - return getUnionVal(); + case OPTI64VAL: + return getOptI64Val(); - case LATESTRUCTVAL: - return getLateStructVal(); + case OPTI32VAL: + return getOptI32Val(); - case DURATIONVAL: - return getDurationVal(); + case OPTI16VAL: + return getOptI16Val(); - case TIMEVAL: - return getTimeVal(); + case OPTBYTEVAL: + return getOptByteVal(); case OPTBOOLVAL: return getOptBoolVal(); - case OPTBYTEVAL: - return getOptByteVal(); + case TIMEVAL: + return getTimeVal(); - case OPTI16VAL: - return getOptI16Val(); + case DURATIONVAL: + return getDurationVal(); - case OPTI32VAL: - return getOptI32Val(); + case LATESTRUCTVAL: + return getLateStructVal(); - case OPTI64VAL: - return getOptI64Val(); + case UNIONVAL: + return getUnionVal(); - case OPTFLOATVAL: - return getOptFloatVal(); + case STRUCTVAL: + return getStructVal(); - case OPTDOUBLEVAL: - return getOptDoubleVal(); + case ENUMVAL: + return getEnumVal(); - case OPTSTRINGVAL: - return getOptStringVal(); + case BINARYVAL: + return getBinaryVal(); - case OPTBINARYVAL: - return getOptBinaryVal(); + case STRINGVAL: + return getStringVal(); - case OPTENUMVAL: - return getOptEnumVal(); + case DOUBLEVAL: + return getDoubleVal(); - case OPTSTRUCTVAL: - return getOptStructVal(); + case FLOATVAL: + return getFloatVal(); - case OPTLATESTRUCTVAL: - return getOptLateStructVal(); + case I64VAL: + return getI64Val(); - case OPTLISTVAL: - return getOptListVal(); + case I32VAL: + return getI32Val(); - case OPTSETVAL: - return getOptSetVal(); + case I16VAL: + return getI16Val(); - case OPTMAPVAL: - return getOptMapVal(); + case BYTEVAL: + return getByteVal(); + + case BOOLVAL: + return getBoolVal(); default: throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); @@ -1657,72 +1657,72 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl return false; MyStructFieldPatch that = (MyStructFieldPatch)_that; - if (!TBaseHelper.equalsNobinary(this.isSetBoolVal(), that.isSetBoolVal(), this.boolVal, that.boolVal)) { return false; } - - if (!TBaseHelper.equalsNobinary(this.isSetByteVal(), that.isSetByteVal(), this.byteVal, that.byteVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptMapVal(), that.isSetOptMapVal(), this.optMapVal, that.optMapVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetI16Val(), that.isSetI16Val(), this.i16Val, that.i16Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptSetVal(), that.isSetOptSetVal(), this.optSetVal, that.optSetVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetI32Val(), that.isSetI32Val(), this.i32Val, that.i32Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptListVal(), that.isSetOptListVal(), this.optListVal, that.optListVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetI64Val(), that.isSetI64Val(), this.i64Val, that.i64Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptLateStructVal(), that.isSetOptLateStructVal(), this.optLateStructVal, that.optLateStructVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetFloatVal(), that.isSetFloatVal(), this.floatVal, that.floatVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptStructVal(), that.isSetOptStructVal(), this.optStructVal, that.optStructVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetDoubleVal(), that.isSetDoubleVal(), this.doubleVal, that.doubleVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptEnumVal(), that.isSetOptEnumVal(), this.optEnumVal, that.optEnumVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetStringVal(), that.isSetStringVal(), this.stringVal, that.stringVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptBinaryVal(), that.isSetOptBinaryVal(), this.optBinaryVal, that.optBinaryVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetBinaryVal(), that.isSetBinaryVal(), this.binaryVal, that.binaryVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptStringVal(), that.isSetOptStringVal(), this.optStringVal, that.optStringVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetEnumVal(), that.isSetEnumVal(), this.enumVal, that.enumVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptDoubleVal(), that.isSetOptDoubleVal(), this.optDoubleVal, that.optDoubleVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetStructVal(), that.isSetStructVal(), this.structVal, that.structVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptFloatVal(), that.isSetOptFloatVal(), this.optFloatVal, that.optFloatVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetUnionVal(), that.isSetUnionVal(), this.unionVal, that.unionVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptI64Val(), that.isSetOptI64Val(), this.optI64Val, that.optI64Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetLateStructVal(), that.isSetLateStructVal(), this.lateStructVal, that.lateStructVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptI32Val(), that.isSetOptI32Val(), this.optI32Val, that.optI32Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetDurationVal(), that.isSetDurationVal(), this.durationVal, that.durationVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptI16Val(), that.isSetOptI16Val(), this.optI16Val, that.optI16Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetTimeVal(), that.isSetTimeVal(), this.timeVal, that.timeVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetOptByteVal(), that.isSetOptByteVal(), this.optByteVal, that.optByteVal)) { return false; } if (!TBaseHelper.equalsNobinary(this.isSetOptBoolVal(), that.isSetOptBoolVal(), this.optBoolVal, that.optBoolVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptByteVal(), that.isSetOptByteVal(), this.optByteVal, that.optByteVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetTimeVal(), that.isSetTimeVal(), this.timeVal, that.timeVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptI16Val(), that.isSetOptI16Val(), this.optI16Val, that.optI16Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetDurationVal(), that.isSetDurationVal(), this.durationVal, that.durationVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptI32Val(), that.isSetOptI32Val(), this.optI32Val, that.optI32Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetLateStructVal(), that.isSetLateStructVal(), this.lateStructVal, that.lateStructVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptI64Val(), that.isSetOptI64Val(), this.optI64Val, that.optI64Val)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetUnionVal(), that.isSetUnionVal(), this.unionVal, that.unionVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptFloatVal(), that.isSetOptFloatVal(), this.optFloatVal, that.optFloatVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetStructVal(), that.isSetStructVal(), this.structVal, that.structVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptDoubleVal(), that.isSetOptDoubleVal(), this.optDoubleVal, that.optDoubleVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetEnumVal(), that.isSetEnumVal(), this.enumVal, that.enumVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptStringVal(), that.isSetOptStringVal(), this.optStringVal, that.optStringVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetBinaryVal(), that.isSetBinaryVal(), this.binaryVal, that.binaryVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptBinaryVal(), that.isSetOptBinaryVal(), this.optBinaryVal, that.optBinaryVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetStringVal(), that.isSetStringVal(), this.stringVal, that.stringVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptEnumVal(), that.isSetOptEnumVal(), this.optEnumVal, that.optEnumVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetDoubleVal(), that.isSetDoubleVal(), this.doubleVal, that.doubleVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptStructVal(), that.isSetOptStructVal(), this.optStructVal, that.optStructVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetFloatVal(), that.isSetFloatVal(), this.floatVal, that.floatVal)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptLateStructVal(), that.isSetOptLateStructVal(), this.optLateStructVal, that.optLateStructVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetI64Val(), that.isSetI64Val(), this.i64Val, that.i64Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptListVal(), that.isSetOptListVal(), this.optListVal, that.optListVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetI32Val(), that.isSetI32Val(), this.i32Val, that.i32Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptSetVal(), that.isSetOptSetVal(), this.optSetVal, that.optSetVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetI16Val(), that.isSetI16Val(), this.i16Val, that.i16Val)) { return false; } - if (!TBaseHelper.equalsNobinary(this.isSetOptMapVal(), that.isSetOptMapVal(), this.optMapVal, that.optMapVal)) { return false; } + if (!TBaseHelper.equalsNobinary(this.isSetByteVal(), that.isSetByteVal(), this.byteVal, that.byteVal)) { return false; } + + if (!TBaseHelper.equalsNobinary(this.isSetBoolVal(), that.isSetBoolVal(), this.boolVal, that.boolVal)) { return false; } return true; } @Override public int hashCode() { - return Arrays.deepHashCode(new Object[] {boolVal, byteVal, i16Val, i32Val, i64Val, floatVal, doubleVal, stringVal, binaryVal, enumVal, structVal, unionVal, lateStructVal, durationVal, timeVal, optBoolVal, optByteVal, optI16Val, optI32Val, optI64Val, optFloatVal, optDoubleVal, optStringVal, optBinaryVal, optEnumVal, optStructVal, optLateStructVal, optListVal, optSetVal, optMapVal}); + return Arrays.deepHashCode(new Object[] {optMapVal, optSetVal, optListVal, optLateStructVal, optStructVal, optEnumVal, optBinaryVal, optStringVal, optDoubleVal, optFloatVal, optI64Val, optI32Val, optI16Val, optByteVal, optBoolVal, timeVal, durationVal, lateStructVal, unionVal, structVal, enumVal, binaryVal, stringVal, doubleVal, floatVal, i64Val, i32Val, i16Val, byteVal, boolVal}); } @Override @@ -1737,243 +1737,243 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl } int lastComparison = 0; - lastComparison = Boolean.valueOf(isSetBoolVal()).compareTo(other.isSetBoolVal()); + lastComparison = Boolean.valueOf(isSetOptMapVal()).compareTo(other.isSetOptMapVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(boolVal, other.boolVal); + lastComparison = TBaseHelper.compareTo(optMapVal, other.optMapVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetByteVal()).compareTo(other.isSetByteVal()); + lastComparison = Boolean.valueOf(isSetOptSetVal()).compareTo(other.isSetOptSetVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(byteVal, other.byteVal); + lastComparison = TBaseHelper.compareTo(optSetVal, other.optSetVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetI16Val()).compareTo(other.isSetI16Val()); + lastComparison = Boolean.valueOf(isSetOptListVal()).compareTo(other.isSetOptListVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(i16Val, other.i16Val); + lastComparison = TBaseHelper.compareTo(optListVal, other.optListVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetI32Val()).compareTo(other.isSetI32Val()); + lastComparison = Boolean.valueOf(isSetOptLateStructVal()).compareTo(other.isSetOptLateStructVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(i32Val, other.i32Val); + lastComparison = TBaseHelper.compareTo(optLateStructVal, other.optLateStructVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetI64Val()).compareTo(other.isSetI64Val()); + lastComparison = Boolean.valueOf(isSetOptStructVal()).compareTo(other.isSetOptStructVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(i64Val, other.i64Val); + lastComparison = TBaseHelper.compareTo(optStructVal, other.optStructVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetFloatVal()).compareTo(other.isSetFloatVal()); + lastComparison = Boolean.valueOf(isSetOptEnumVal()).compareTo(other.isSetOptEnumVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(floatVal, other.floatVal); + lastComparison = TBaseHelper.compareTo(optEnumVal, other.optEnumVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetDoubleVal()).compareTo(other.isSetDoubleVal()); + lastComparison = Boolean.valueOf(isSetOptBinaryVal()).compareTo(other.isSetOptBinaryVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(doubleVal, other.doubleVal); + lastComparison = TBaseHelper.compareTo(optBinaryVal, other.optBinaryVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetStringVal()).compareTo(other.isSetStringVal()); + lastComparison = Boolean.valueOf(isSetOptStringVal()).compareTo(other.isSetOptStringVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(stringVal, other.stringVal); + lastComparison = TBaseHelper.compareTo(optStringVal, other.optStringVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetBinaryVal()).compareTo(other.isSetBinaryVal()); + lastComparison = Boolean.valueOf(isSetOptDoubleVal()).compareTo(other.isSetOptDoubleVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(binaryVal, other.binaryVal); + lastComparison = TBaseHelper.compareTo(optDoubleVal, other.optDoubleVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetEnumVal()).compareTo(other.isSetEnumVal()); + lastComparison = Boolean.valueOf(isSetOptFloatVal()).compareTo(other.isSetOptFloatVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(enumVal, other.enumVal); + lastComparison = TBaseHelper.compareTo(optFloatVal, other.optFloatVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetStructVal()).compareTo(other.isSetStructVal()); + lastComparison = Boolean.valueOf(isSetOptI64Val()).compareTo(other.isSetOptI64Val()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(structVal, other.structVal); + lastComparison = TBaseHelper.compareTo(optI64Val, other.optI64Val); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetUnionVal()).compareTo(other.isSetUnionVal()); + lastComparison = Boolean.valueOf(isSetOptI32Val()).compareTo(other.isSetOptI32Val()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(unionVal, other.unionVal); + lastComparison = TBaseHelper.compareTo(optI32Val, other.optI32Val); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetLateStructVal()).compareTo(other.isSetLateStructVal()); + lastComparison = Boolean.valueOf(isSetOptI16Val()).compareTo(other.isSetOptI16Val()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(lateStructVal, other.lateStructVal); + lastComparison = TBaseHelper.compareTo(optI16Val, other.optI16Val); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetDurationVal()).compareTo(other.isSetDurationVal()); + lastComparison = Boolean.valueOf(isSetOptByteVal()).compareTo(other.isSetOptByteVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(durationVal, other.durationVal); + lastComparison = TBaseHelper.compareTo(optByteVal, other.optByteVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetTimeVal()).compareTo(other.isSetTimeVal()); + lastComparison = Boolean.valueOf(isSetOptBoolVal()).compareTo(other.isSetOptBoolVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(timeVal, other.timeVal); + lastComparison = TBaseHelper.compareTo(optBoolVal, other.optBoolVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptBoolVal()).compareTo(other.isSetOptBoolVal()); + lastComparison = Boolean.valueOf(isSetTimeVal()).compareTo(other.isSetTimeVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optBoolVal, other.optBoolVal); + lastComparison = TBaseHelper.compareTo(timeVal, other.timeVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptByteVal()).compareTo(other.isSetOptByteVal()); + lastComparison = Boolean.valueOf(isSetDurationVal()).compareTo(other.isSetDurationVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optByteVal, other.optByteVal); + lastComparison = TBaseHelper.compareTo(durationVal, other.durationVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptI16Val()).compareTo(other.isSetOptI16Val()); + lastComparison = Boolean.valueOf(isSetLateStructVal()).compareTo(other.isSetLateStructVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optI16Val, other.optI16Val); + lastComparison = TBaseHelper.compareTo(lateStructVal, other.lateStructVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptI32Val()).compareTo(other.isSetOptI32Val()); + lastComparison = Boolean.valueOf(isSetUnionVal()).compareTo(other.isSetUnionVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optI32Val, other.optI32Val); + lastComparison = TBaseHelper.compareTo(unionVal, other.unionVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptI64Val()).compareTo(other.isSetOptI64Val()); + lastComparison = Boolean.valueOf(isSetStructVal()).compareTo(other.isSetStructVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optI64Val, other.optI64Val); + lastComparison = TBaseHelper.compareTo(structVal, other.structVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptFloatVal()).compareTo(other.isSetOptFloatVal()); + lastComparison = Boolean.valueOf(isSetEnumVal()).compareTo(other.isSetEnumVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optFloatVal, other.optFloatVal); + lastComparison = TBaseHelper.compareTo(enumVal, other.enumVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptDoubleVal()).compareTo(other.isSetOptDoubleVal()); + lastComparison = Boolean.valueOf(isSetBinaryVal()).compareTo(other.isSetBinaryVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optDoubleVal, other.optDoubleVal); + lastComparison = TBaseHelper.compareTo(binaryVal, other.binaryVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptStringVal()).compareTo(other.isSetOptStringVal()); + lastComparison = Boolean.valueOf(isSetStringVal()).compareTo(other.isSetStringVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optStringVal, other.optStringVal); + lastComparison = TBaseHelper.compareTo(stringVal, other.stringVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptBinaryVal()).compareTo(other.isSetOptBinaryVal()); + lastComparison = Boolean.valueOf(isSetDoubleVal()).compareTo(other.isSetDoubleVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optBinaryVal, other.optBinaryVal); + lastComparison = TBaseHelper.compareTo(doubleVal, other.doubleVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptEnumVal()).compareTo(other.isSetOptEnumVal()); + lastComparison = Boolean.valueOf(isSetFloatVal()).compareTo(other.isSetFloatVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optEnumVal, other.optEnumVal); + lastComparison = TBaseHelper.compareTo(floatVal, other.floatVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptStructVal()).compareTo(other.isSetOptStructVal()); + lastComparison = Boolean.valueOf(isSetI64Val()).compareTo(other.isSetI64Val()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optStructVal, other.optStructVal); + lastComparison = TBaseHelper.compareTo(i64Val, other.i64Val); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptLateStructVal()).compareTo(other.isSetOptLateStructVal()); + lastComparison = Boolean.valueOf(isSetI32Val()).compareTo(other.isSetI32Val()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optLateStructVal, other.optLateStructVal); + lastComparison = TBaseHelper.compareTo(i32Val, other.i32Val); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptListVal()).compareTo(other.isSetOptListVal()); + lastComparison = Boolean.valueOf(isSetI16Val()).compareTo(other.isSetI16Val()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optListVal, other.optListVal); + lastComparison = TBaseHelper.compareTo(i16Val, other.i16Val); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptSetVal()).compareTo(other.isSetOptSetVal()); + lastComparison = Boolean.valueOf(isSetByteVal()).compareTo(other.isSetByteVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optSetVal, other.optSetVal); + lastComparison = TBaseHelper.compareTo(byteVal, other.byteVal); if (lastComparison != 0) { return lastComparison; } - lastComparison = Boolean.valueOf(isSetOptMapVal()).compareTo(other.isSetOptMapVal()); + lastComparison = Boolean.valueOf(isSetBoolVal()).compareTo(other.isSetBoolVal()); if (lastComparison != 0) { return lastComparison; } - lastComparison = TBaseHelper.compareTo(optMapVal, other.optMapVal); + lastComparison = TBaseHelper.compareTo(boolVal, other.boolVal); if (lastComparison != 0) { return lastComparison; } @@ -1991,242 +1991,242 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl } switch (__field.id) { - case BOOLVAL: + case OPTMAPVAL: if (__field.type == TType.STRUCT) { - this.boolVal = new com.facebook.thrift.op.BoolPatch(); - this.boolVal.read(iprot); + this.optMapVal = new MyStructFieldN30Patch(); + this.optMapVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case BYTEVAL: + case OPTSETVAL: if (__field.type == TType.STRUCT) { - this.byteVal = new com.facebook.thrift.op.BytePatch(); - this.byteVal.read(iprot); + this.optSetVal = new MyStructFieldN29Patch(); + this.optSetVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case I16VAL: + case OPTLISTVAL: if (__field.type == TType.STRUCT) { - this.i16Val = new com.facebook.thrift.op.I16Patch(); - this.i16Val.read(iprot); + this.optListVal = new MyStructFieldN28Patch(); + this.optListVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case I32VAL: + case OPTLATESTRUCTVAL: if (__field.type == TType.STRUCT) { - this.i32Val = new com.facebook.thrift.op.I32Patch(); - this.i32Val.read(iprot); + this.optLateStructVal = new LateDefStructPatch(); + this.optLateStructVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case I64VAL: + case OPTSTRUCTVAL: if (__field.type == TType.STRUCT) { - this.i64Val = new com.facebook.thrift.op.I64Patch(); - this.i64Val.read(iprot); + this.optStructVal = new MyDataPatch(); + this.optStructVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case FLOATVAL: + case OPTENUMVAL: if (__field.type == TType.STRUCT) { - this.floatVal = new com.facebook.thrift.op.FloatPatch(); - this.floatVal.read(iprot); + this.optEnumVal = new MyStructFieldN25Patch(); + this.optEnumVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case DOUBLEVAL: + case OPTBINARYVAL: if (__field.type == TType.STRUCT) { - this.doubleVal = new com.facebook.thrift.op.DoublePatch(); - this.doubleVal.read(iprot); + this.optBinaryVal = new com.facebook.thrift.op.BinaryPatch(); + this.optBinaryVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case STRINGVAL: + case OPTSTRINGVAL: if (__field.type == TType.STRUCT) { - this.stringVal = new com.facebook.thrift.op.StringPatch(); - this.stringVal.read(iprot); + this.optStringVal = new com.facebook.thrift.op.StringPatch(); + this.optStringVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case BINARYVAL: + case OPTDOUBLEVAL: if (__field.type == TType.STRUCT) { - this.binaryVal = new com.facebook.thrift.op.BinaryPatch(); - this.binaryVal.read(iprot); + this.optDoubleVal = new com.facebook.thrift.op.DoublePatch(); + this.optDoubleVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case ENUMVAL: + case OPTFLOATVAL: if (__field.type == TType.STRUCT) { - this.enumVal = new MyStructFieldN10Patch(); - this.enumVal.read(iprot); + this.optFloatVal = new com.facebook.thrift.op.FloatPatch(); + this.optFloatVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case STRUCTVAL: + case OPTI64VAL: if (__field.type == TType.STRUCT) { - this.structVal = new MyDataPatch(); - this.structVal.read(iprot); + this.optI64Val = new com.facebook.thrift.op.I64Patch(); + this.optI64Val.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case UNIONVAL: + case OPTI32VAL: if (__field.type == TType.STRUCT) { - this.unionVal = new MyUnionPatch(); - this.unionVal.read(iprot); + this.optI32Val = new com.facebook.thrift.op.I32Patch(); + this.optI32Val.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case LATESTRUCTVAL: + case OPTI16VAL: if (__field.type == TType.STRUCT) { - this.lateStructVal = new LateDefStructPatch(); - this.lateStructVal.read(iprot); + this.optI16Val = new com.facebook.thrift.op.I16Patch(); + this.optI16Val.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case DURATIONVAL: + case OPTBYTEVAL: if (__field.type == TType.STRUCT) { - this.durationVal = new com.facebook.thrift.op.DurationPatch(); - this.durationVal.read(iprot); + this.optByteVal = new com.facebook.thrift.op.BytePatch(); + this.optByteVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case TIMEVAL: + case OPTBOOLVAL: if (__field.type == TType.STRUCT) { - this.timeVal = new com.facebook.thrift.op.TimePatch(); - this.timeVal.read(iprot); + this.optBoolVal = new com.facebook.thrift.op.BoolPatch(); + this.optBoolVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTBOOLVAL: + case TIMEVAL: if (__field.type == TType.STRUCT) { - this.optBoolVal = new com.facebook.thrift.op.BoolPatch(); - this.optBoolVal.read(iprot); + this.timeVal = new com.facebook.thrift.op.TimePatch(); + this.timeVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTBYTEVAL: + case DURATIONVAL: if (__field.type == TType.STRUCT) { - this.optByteVal = new com.facebook.thrift.op.BytePatch(); - this.optByteVal.read(iprot); + this.durationVal = new com.facebook.thrift.op.DurationPatch(); + this.durationVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTI16VAL: + case LATESTRUCTVAL: if (__field.type == TType.STRUCT) { - this.optI16Val = new com.facebook.thrift.op.I16Patch(); - this.optI16Val.read(iprot); + this.lateStructVal = new LateDefStructPatch(); + this.lateStructVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTI32VAL: + case UNIONVAL: if (__field.type == TType.STRUCT) { - this.optI32Val = new com.facebook.thrift.op.I32Patch(); - this.optI32Val.read(iprot); + this.unionVal = new MyUnionPatch(); + this.unionVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTI64VAL: + case STRUCTVAL: if (__field.type == TType.STRUCT) { - this.optI64Val = new com.facebook.thrift.op.I64Patch(); - this.optI64Val.read(iprot); + this.structVal = new MyDataPatch(); + this.structVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTFLOATVAL: + case ENUMVAL: if (__field.type == TType.STRUCT) { - this.optFloatVal = new com.facebook.thrift.op.FloatPatch(); - this.optFloatVal.read(iprot); + this.enumVal = new MyStructFieldN10Patch(); + this.enumVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTDOUBLEVAL: + case BINARYVAL: if (__field.type == TType.STRUCT) { - this.optDoubleVal = new com.facebook.thrift.op.DoublePatch(); - this.optDoubleVal.read(iprot); + this.binaryVal = new com.facebook.thrift.op.BinaryPatch(); + this.binaryVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTSTRINGVAL: + case STRINGVAL: if (__field.type == TType.STRUCT) { - this.optStringVal = new com.facebook.thrift.op.StringPatch(); - this.optStringVal.read(iprot); + this.stringVal = new com.facebook.thrift.op.StringPatch(); + this.stringVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTBINARYVAL: + case DOUBLEVAL: if (__field.type == TType.STRUCT) { - this.optBinaryVal = new com.facebook.thrift.op.BinaryPatch(); - this.optBinaryVal.read(iprot); + this.doubleVal = new com.facebook.thrift.op.DoublePatch(); + this.doubleVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTENUMVAL: + case FLOATVAL: if (__field.type == TType.STRUCT) { - this.optEnumVal = new MyStructFieldN25Patch(); - this.optEnumVal.read(iprot); + this.floatVal = new com.facebook.thrift.op.FloatPatch(); + this.floatVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTSTRUCTVAL: + case I64VAL: if (__field.type == TType.STRUCT) { - this.optStructVal = new MyDataPatch(); - this.optStructVal.read(iprot); + this.i64Val = new com.facebook.thrift.op.I64Patch(); + this.i64Val.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTLATESTRUCTVAL: + case I32VAL: if (__field.type == TType.STRUCT) { - this.optLateStructVal = new LateDefStructPatch(); - this.optLateStructVal.read(iprot); + this.i32Val = new com.facebook.thrift.op.I32Patch(); + this.i32Val.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTLISTVAL: + case I16VAL: if (__field.type == TType.STRUCT) { - this.optListVal = new MyStructFieldN28Patch(); - this.optListVal.read(iprot); + this.i16Val = new com.facebook.thrift.op.I16Patch(); + this.i16Val.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTSETVAL: + case BYTEVAL: if (__field.type == TType.STRUCT) { - this.optSetVal = new MyStructFieldN29Patch(); - this.optSetVal.read(iprot); + this.byteVal = new com.facebook.thrift.op.BytePatch(); + this.byteVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } break; - case OPTMAPVAL: + case BOOLVAL: if (__field.type == TType.STRUCT) { - this.optMapVal = new MyStructFieldN30Patch(); - this.optMapVal.read(iprot); + this.boolVal = new com.facebook.thrift.op.BoolPatch(); + this.boolVal.read(iprot); } else { TProtocolUtil.skip(iprot, __field.type); } @@ -2419,332 +2419,332 @@ public class MyStructFieldPatch implements TBase, java.io.Serializable, Cloneabl boolean first = true; sb.append(indentStr); - sb.append("boolVal"); + sb.append("optMapVal"); sb.append(space); sb.append(":").append(space); - if (this.getBoolVal() == null) { + if (this.getOptMapVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getBoolVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptMapVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("byteVal"); + sb.append("optSetVal"); sb.append(space); sb.append(":").append(space); - if (this.getByteVal() == null) { + if (this.getOptSetVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getByteVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptSetVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("i16Val"); + sb.append("optListVal"); sb.append(space); sb.append(":").append(space); - if (this.getI16Val() == null) { + if (this.getOptListVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getI16Val(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptListVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("i32Val"); + sb.append("optLateStructVal"); sb.append(space); sb.append(":").append(space); - if (this.getI32Val() == null) { + if (this.getOptLateStructVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getI32Val(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptLateStructVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("i64Val"); + sb.append("optStructVal"); sb.append(space); sb.append(":").append(space); - if (this.getI64Val() == null) { + if (this.getOptStructVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getI64Val(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptStructVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("floatVal"); + sb.append("optEnumVal"); sb.append(space); sb.append(":").append(space); - if (this.getFloatVal() == null) { + if (this.getOptEnumVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getFloatVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptEnumVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("doubleVal"); + sb.append("optBinaryVal"); sb.append(space); sb.append(":").append(space); - if (this.getDoubleVal() == null) { + if (this.getOptBinaryVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getDoubleVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptBinaryVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("stringVal"); + sb.append("optStringVal"); sb.append(space); sb.append(":").append(space); - if (this.getStringVal() == null) { + if (this.getOptStringVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getStringVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptStringVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("binaryVal"); + sb.append("optDoubleVal"); sb.append(space); sb.append(":").append(space); - if (this.getBinaryVal() == null) { + if (this.getOptDoubleVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getBinaryVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptDoubleVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("enumVal"); + sb.append("optFloatVal"); sb.append(space); sb.append(":").append(space); - if (this.getEnumVal() == null) { + if (this.getOptFloatVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getEnumVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptFloatVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("structVal"); + sb.append("optI64Val"); sb.append(space); sb.append(":").append(space); - if (this.getStructVal() == null) { + if (this.getOptI64Val() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getStructVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptI64Val(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("unionVal"); + sb.append("optI32Val"); sb.append(space); sb.append(":").append(space); - if (this.getUnionVal() == null) { + if (this.getOptI32Val() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getUnionVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptI32Val(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("lateStructVal"); + sb.append("optI16Val"); sb.append(space); sb.append(":").append(space); - if (this.getLateStructVal() == null) { + if (this.getOptI16Val() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getLateStructVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptI16Val(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("durationVal"); + sb.append("optByteVal"); sb.append(space); sb.append(":").append(space); - if (this.getDurationVal() == null) { + if (this.getOptByteVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getDurationVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptByteVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("timeVal"); + sb.append("optBoolVal"); sb.append(space); sb.append(":").append(space); - if (this.getTimeVal() == null) { + if (this.getOptBoolVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getTimeVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getOptBoolVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optBoolVal"); + sb.append("timeVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptBoolVal() == null) { + if (this.getTimeVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptBoolVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getTimeVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optByteVal"); + sb.append("durationVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptByteVal() == null) { + if (this.getDurationVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptByteVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getDurationVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optI16Val"); + sb.append("lateStructVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptI16Val() == null) { + if (this.getLateStructVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptI16Val(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getLateStructVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optI32Val"); + sb.append("unionVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptI32Val() == null) { + if (this.getUnionVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptI32Val(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getUnionVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optI64Val"); + sb.append("structVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptI64Val() == null) { + if (this.getStructVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptI64Val(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getStructVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optFloatVal"); + sb.append("enumVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptFloatVal() == null) { + if (this.getEnumVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptFloatVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getEnumVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optDoubleVal"); + sb.append("binaryVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptDoubleVal() == null) { + if (this.getBinaryVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptDoubleVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getBinaryVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optStringVal"); + sb.append("stringVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptStringVal() == null) { + if (this.getStringVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptStringVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getStringVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optBinaryVal"); + sb.append("doubleVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptBinaryVal() == null) { + if (this.getDoubleVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptBinaryVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getDoubleVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optEnumVal"); + sb.append("floatVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptEnumVal() == null) { + if (this.getFloatVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptEnumVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getFloatVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optStructVal"); + sb.append("i64Val"); sb.append(space); sb.append(":").append(space); - if (this.getOptStructVal() == null) { + if (this.getI64Val() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptStructVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getI64Val(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optLateStructVal"); + sb.append("i32Val"); sb.append(space); sb.append(":").append(space); - if (this.getOptLateStructVal() == null) { + if (this.getI32Val() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptLateStructVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getI32Val(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optListVal"); + sb.append("i16Val"); sb.append(space); sb.append(":").append(space); - if (this.getOptListVal() == null) { + if (this.getI16Val() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptListVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getI16Val(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optSetVal"); + sb.append("byteVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptSetVal() == null) { + if (this.getByteVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptSetVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getByteVal(), indent + 1, prettyPrint)); } first = false; if (!first) sb.append("," + newLine); sb.append(indentStr); - sb.append("optMapVal"); + sb.append("boolVal"); sb.append(space); sb.append(":").append(space); - if (this.getOptMapVal() == null) { + if (this.getBoolVal() == null) { sb.append("null"); } else { - sb.append(TBaseHelper.toString(this.getOptMapVal(), indent + 1, prettyPrint)); + sb.append(TBaseHelper.toString(this.getBoolVal(), indent + 1, prettyPrint)); } first = false; sb.append(newLine + TBaseHelper.reduceIndent(indentStr)); diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-json/module.json b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-json/module.json index b614228e53b..2357660c003 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-json/module.json +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-json/module.json @@ -1074,15 +1074,15 @@ } } }, - "MyStructFieldPatch" : { + "MyStructFieldN10Patch" : { "lineno" : 22, "is_exception" : false, "is_union" : false, "fields" : { - "boolVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.BoolPatch", - "required" : true, + "assign" : { + "type_enum" : "ENUM", + "spec_args" : "MyEnum", + "required" : false, "source_range" : { "begin" : { "line" : 22, @@ -1094,9 +1094,9 @@ } } }, - "byteVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.BytePatch", + "clear" : { + "type_enum" : "BOOL", + "spec_args" : null, "required" : true, "source_range" : { "begin" : { @@ -1108,11 +1108,28 @@ "column" : 21 } } + } + }, + "source_range" : { + "begin" : { + "line" : 22, + "column" : 8 }, - "i16Val" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.I16Patch", - "required" : true, + "end" : { + "line" : 22, + "column" : 21 + } + } + }, + "MyStructFieldN25Patch" : { + "lineno" : 22, + "is_exception" : false, + "is_union" : false, + "fields" : { + "assign" : { + "type_enum" : "ENUM", + "spec_args" : "MyEnum", + "required" : false, "source_range" : { "begin" : { "line" : 22, @@ -1124,9 +1141,9 @@ } } }, - "i32Val" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.I32Patch", + "clear" : { + "type_enum" : "BOOL", + "spec_args" : null, "required" : true, "source_range" : { "begin" : { @@ -1138,11 +1155,28 @@ "column" : 21 } } + } + }, + "source_range" : { + "begin" : { + "line" : 22, + "column" : 9 }, - "i64Val" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.I64Patch", - "required" : true, + "end" : { + "line" : 22, + "column" : 21 + } + } + }, + "MyStructFieldN28Patch" : { + "lineno" : 22, + "is_exception" : false, + "is_union" : false, + "fields" : { + "assign" : { + "type_enum" : "LIST", + "spec_args" : { "type_enum" : "I16", "spec_args" : null} , + "required" : false, "source_range" : { "begin" : { "line" : 22, @@ -1154,9 +1188,9 @@ } } }, - "floatVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.FloatPatch", + "clear" : { + "type_enum" : "BOOL", + "spec_args" : null, "required" : true, "source_range" : { "begin" : { @@ -1169,9 +1203,9 @@ } } }, - "doubleVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.DoublePatch", + "patch" : { + "type_enum" : "MAP", + "spec_args" : { "key_type" : { "type_enum" : "I32", "spec_args" : null }, "val_type" : { "type_enum" : "STRUCT", "spec_args" : "patch.I16Patch"} } , "required" : true, "source_range" : { "begin" : { @@ -1184,9 +1218,9 @@ } } }, - "stringVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.StringPatch", + "remove" : { + "type_enum" : "LIST", + "spec_args" : { "type_enum" : "I16", "spec_args" : null} , "required" : true, "source_range" : { "begin" : { @@ -1199,9 +1233,9 @@ } } }, - "binaryVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.BinaryPatch", + "prepend" : { + "type_enum" : "LIST", + "spec_args" : { "type_enum" : "I16", "spec_args" : null} , "required" : true, "source_range" : { "begin" : { @@ -1214,9 +1248,9 @@ } } }, - "enumVal" : { - "type_enum" : "STRUCT", - "spec_args" : "MyStructFieldN10Patch", + "append" : { + "type_enum" : "LIST", + "spec_args" : { "type_enum" : "I16", "spec_args" : null} , "required" : true, "source_range" : { "begin" : { @@ -1228,11 +1262,28 @@ "column" : 21 } } + } + }, + "source_range" : { + "begin" : { + "line" : 22, + "column" : 10 }, - "structVal" : { - "type_enum" : "STRUCT", - "spec_args" : "MyDataPatch", - "required" : true, + "end" : { + "line" : 22, + "column" : 21 + } + } + }, + "MyStructFieldN29Patch" : { + "lineno" : 22, + "is_exception" : false, + "is_union" : false, + "fields" : { + "assign" : { + "type_enum" : "SET", + "spec_args" : { "type_enum" : "STRING", "spec_args" : null} , + "required" : false, "source_range" : { "begin" : { "line" : 22, @@ -1244,9 +1295,9 @@ } } }, - "unionVal" : { - "type_enum" : "STRUCT", - "spec_args" : "MyUnionPatch", + "clear" : { + "type_enum" : "BOOL", + "spec_args" : null, "required" : true, "source_range" : { "begin" : { @@ -1259,9 +1310,9 @@ } } }, - "lateStructVal" : { - "type_enum" : "STRUCT", - "spec_args" : "LateDefStructPatch", + "remove" : { + "type_enum" : "SET", + "spec_args" : { "type_enum" : "STRING", "spec_args" : null} , "required" : true, "source_range" : { "begin" : { @@ -1274,9 +1325,9 @@ } } }, - "durationVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.DurationPatch", + "add" : { + "type_enum" : "SET", + "spec_args" : { "type_enum" : "STRING", "spec_args" : null} , "required" : true, "source_range" : { "begin" : { @@ -1288,11 +1339,28 @@ "column" : 21 } } + } + }, + "source_range" : { + "begin" : { + "line" : 22, + "column" : 11 }, - "timeVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.TimePatch", - "required" : true, + "end" : { + "line" : 22, + "column" : 21 + } + } + }, + "MyStructFieldN30Patch" : { + "lineno" : 22, + "is_exception" : false, + "is_union" : false, + "fields" : { + "assign" : { + "type_enum" : "MAP", + "spec_args" : { "key_type" : { "type_enum" : "STRING", "spec_args" : null }, "val_type" : { "type_enum" : "STRING", "spec_args" : null} } , + "required" : false, "source_range" : { "begin" : { "line" : 22, @@ -1304,9 +1372,9 @@ } } }, - "optBoolVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.BoolPatch", + "clear" : { + "type_enum" : "BOOL", + "spec_args" : null, "required" : true, "source_range" : { "begin" : { @@ -1319,9 +1387,9 @@ } } }, - "optByteVal" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.BytePatch", + "add" : { + "type_enum" : "MAP", + "spec_args" : { "key_type" : { "type_enum" : "STRING", "spec_args" : null }, "val_type" : { "type_enum" : "STRING", "spec_args" : null} } , "required" : true, "source_range" : { "begin" : { @@ -1334,9 +1402,9 @@ } } }, - "optI16Val" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.I16Patch", + "remove" : { + "type_enum" : "SET", + "spec_args" : { "type_enum" : "STRING", "spec_args" : null} , "required" : true, "source_range" : { "begin" : { @@ -1349,9 +1417,9 @@ } } }, - "optI32Val" : { - "type_enum" : "STRUCT", - "spec_args" : "patch.I32Patch", + "put" : { + "type_enum" : "MAP", + "spec_args" : { "key_type" : { "type_enum" : "STRING", "spec_args" : null }, "val_type" : { "type_enum" : "STRING", "spec_args" : null} } , "required" : true, "source_range" : { "begin" : { @@ -1363,10 +1431,27 @@ "column" : 21 } } + } + }, + "source_range" : { + "begin" : { + "line" : 22, + "column" : 12 }, - "optI64Val" : { + "end" : { + "line" : 22, + "column" : 21 + } + } + }, + "MyStructFieldPatch" : { + "lineno" : 22, + "is_exception" : false, + "is_union" : false, + "fields" : { + "optMapVal" : { "type_enum" : "STRUCT", - "spec_args" : "patch.I64Patch", + "spec_args" : "MyStructFieldN30Patch", "required" : true, "source_range" : { "begin" : { @@ -1379,9 +1464,9 @@ } } }, - "optFloatVal" : { + "optSetVal" : { "type_enum" : "STRUCT", - "spec_args" : "patch.FloatPatch", + "spec_args" : "MyStructFieldN29Patch", "required" : true, "source_range" : { "begin" : { @@ -1394,9 +1479,9 @@ } } }, - "optDoubleVal" : { + "optListVal" : { "type_enum" : "STRUCT", - "spec_args" : "patch.DoublePatch", + "spec_args" : "MyStructFieldN28Patch", "required" : true, "source_range" : { "begin" : { @@ -1409,9 +1494,9 @@ } } }, - "optStringVal" : { + "optLateStructVal" : { "type_enum" : "STRUCT", - "spec_args" : "patch.StringPatch", + "spec_args" : "LateDefStructPatch", "required" : true, "source_range" : { "begin" : { @@ -1424,9 +1509,9 @@ } } }, - "optBinaryVal" : { + "optStructVal" : { "type_enum" : "STRUCT", - "spec_args" : "patch.BinaryPatch", + "spec_args" : "MyDataPatch", "required" : true, "source_range" : { "begin" : { @@ -1454,9 +1539,9 @@ } } }, - "optStructVal" : { + "optBinaryVal" : { "type_enum" : "STRUCT", - "spec_args" : "MyDataPatch", + "spec_args" : "patch.BinaryPatch", "required" : true, "source_range" : { "begin" : { @@ -1469,9 +1554,9 @@ } } }, - "optLateStructVal" : { + "optStringVal" : { "type_enum" : "STRUCT", - "spec_args" : "LateDefStructPatch", + "spec_args" : "patch.StringPatch", "required" : true, "source_range" : { "begin" : { @@ -1484,9 +1569,9 @@ } } }, - "optListVal" : { + "optDoubleVal" : { "type_enum" : "STRUCT", - "spec_args" : "MyStructFieldN28Patch", + "spec_args" : "patch.DoublePatch", "required" : true, "source_range" : { "begin" : { @@ -1499,9 +1584,9 @@ } } }, - "optSetVal" : { + "optFloatVal" : { "type_enum" : "STRUCT", - "spec_args" : "MyStructFieldN29Patch", + "spec_args" : "patch.FloatPatch", "required" : true, "source_range" : { "begin" : { @@ -1514,9 +1599,9 @@ } } }, - "optMapVal" : { + "optI64Val" : { "type_enum" : "STRUCT", - "spec_args" : "MyStructFieldN30Patch", + "spec_args" : "patch.I64Patch", "required" : true, "source_range" : { "begin" : { @@ -1528,28 +1613,11 @@ "column" : 21 } } - } - }, - "source_range" : { - "begin" : { - "line" : 22, - "column" : 8 }, - "end" : { - "line" : 22, - "column" : 21 - } - } - }, - "MyStructFieldN10Patch" : { - "lineno" : 22, - "is_exception" : false, - "is_union" : false, - "fields" : { - "assign" : { - "type_enum" : "ENUM", - "spec_args" : "MyEnum", - "required" : false, + "optI32Val" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.I32Patch", + "required" : true, "source_range" : { "begin" : { "line" : 22, @@ -1561,9 +1629,9 @@ } } }, - "clear" : { - "type_enum" : "BOOL", - "spec_args" : null, + "optI16Val" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.I16Patch", "required" : true, "source_range" : { "begin" : { @@ -1575,28 +1643,11 @@ "column" : 21 } } - } - }, - "source_range" : { - "begin" : { - "line" : 22, - "column" : 9 }, - "end" : { - "line" : 22, - "column" : 21 - } - } - }, - "MyStructFieldN25Patch" : { - "lineno" : 22, - "is_exception" : false, - "is_union" : false, - "fields" : { - "assign" : { - "type_enum" : "ENUM", - "spec_args" : "MyEnum", - "required" : false, + "optByteVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.BytePatch", + "required" : true, "source_range" : { "begin" : { "line" : 22, @@ -1608,9 +1659,9 @@ } } }, - "clear" : { - "type_enum" : "BOOL", - "spec_args" : null, + "optBoolVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.BoolPatch", "required" : true, "source_range" : { "begin" : { @@ -1622,28 +1673,11 @@ "column" : 21 } } - } - }, - "source_range" : { - "begin" : { - "line" : 22, - "column" : 10 }, - "end" : { - "line" : 22, - "column" : 21 - } - } - }, - "MyStructFieldN28Patch" : { - "lineno" : 22, - "is_exception" : false, - "is_union" : false, - "fields" : { - "assign" : { - "type_enum" : "LIST", - "spec_args" : { "type_enum" : "I16", "spec_args" : null} , - "required" : false, + "timeVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.TimePatch", + "required" : true, "source_range" : { "begin" : { "line" : 22, @@ -1655,9 +1689,9 @@ } } }, - "clear" : { - "type_enum" : "BOOL", - "spec_args" : null, + "durationVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.DurationPatch", "required" : true, "source_range" : { "begin" : { @@ -1670,9 +1704,9 @@ } } }, - "patch" : { - "type_enum" : "MAP", - "spec_args" : { "key_type" : { "type_enum" : "I32", "spec_args" : null }, "val_type" : { "type_enum" : "STRUCT", "spec_args" : "patch.I16Patch"} } , + "lateStructVal" : { + "type_enum" : "STRUCT", + "spec_args" : "LateDefStructPatch", "required" : true, "source_range" : { "begin" : { @@ -1685,9 +1719,9 @@ } } }, - "remove" : { - "type_enum" : "LIST", - "spec_args" : { "type_enum" : "I16", "spec_args" : null} , + "unionVal" : { + "type_enum" : "STRUCT", + "spec_args" : "MyUnionPatch", "required" : true, "source_range" : { "begin" : { @@ -1700,9 +1734,9 @@ } } }, - "prepend" : { - "type_enum" : "LIST", - "spec_args" : { "type_enum" : "I16", "spec_args" : null} , + "structVal" : { + "type_enum" : "STRUCT", + "spec_args" : "MyDataPatch", "required" : true, "source_range" : { "begin" : { @@ -1715,9 +1749,9 @@ } } }, - "append" : { - "type_enum" : "LIST", - "spec_args" : { "type_enum" : "I16", "spec_args" : null} , + "enumVal" : { + "type_enum" : "STRUCT", + "spec_args" : "MyStructFieldN10Patch", "required" : true, "source_range" : { "begin" : { @@ -1729,28 +1763,11 @@ "column" : 21 } } - } - }, - "source_range" : { - "begin" : { - "line" : 22, - "column" : 11 }, - "end" : { - "line" : 22, - "column" : 21 - } - } - }, - "MyStructFieldN29Patch" : { - "lineno" : 22, - "is_exception" : false, - "is_union" : false, - "fields" : { - "assign" : { - "type_enum" : "SET", - "spec_args" : { "type_enum" : "STRING", "spec_args" : null} , - "required" : false, + "binaryVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.BinaryPatch", + "required" : true, "source_range" : { "begin" : { "line" : 22, @@ -1762,9 +1779,9 @@ } } }, - "clear" : { - "type_enum" : "BOOL", - "spec_args" : null, + "stringVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.StringPatch", "required" : true, "source_range" : { "begin" : { @@ -1777,9 +1794,9 @@ } } }, - "remove" : { - "type_enum" : "SET", - "spec_args" : { "type_enum" : "STRING", "spec_args" : null} , + "doubleVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.DoublePatch", "required" : true, "source_range" : { "begin" : { @@ -1792,9 +1809,9 @@ } } }, - "add" : { - "type_enum" : "SET", - "spec_args" : { "type_enum" : "STRING", "spec_args" : null} , + "floatVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.FloatPatch", "required" : true, "source_range" : { "begin" : { @@ -1806,28 +1823,11 @@ "column" : 21 } } - } - }, - "source_range" : { - "begin" : { - "line" : 22, - "column" : 12 }, - "end" : { - "line" : 22, - "column" : 21 - } - } - }, - "MyStructFieldN30Patch" : { - "lineno" : 22, - "is_exception" : false, - "is_union" : false, - "fields" : { - "assign" : { - "type_enum" : "MAP", - "spec_args" : { "key_type" : { "type_enum" : "STRING", "spec_args" : null }, "val_type" : { "type_enum" : "STRING", "spec_args" : null} } , - "required" : false, + "i64Val" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.I64Patch", + "required" : true, "source_range" : { "begin" : { "line" : 22, @@ -1839,9 +1839,9 @@ } } }, - "clear" : { - "type_enum" : "BOOL", - "spec_args" : null, + "i32Val" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.I32Patch", "required" : true, "source_range" : { "begin" : { @@ -1854,9 +1854,9 @@ } } }, - "add" : { - "type_enum" : "MAP", - "spec_args" : { "key_type" : { "type_enum" : "STRING", "spec_args" : null }, "val_type" : { "type_enum" : "STRING", "spec_args" : null} } , + "i16Val" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.I16Patch", "required" : true, "source_range" : { "begin" : { @@ -1869,9 +1869,9 @@ } } }, - "remove" : { - "type_enum" : "SET", - "spec_args" : { "type_enum" : "STRING", "spec_args" : null} , + "byteVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.BytePatch", "required" : true, "source_range" : { "begin" : { @@ -1884,9 +1884,9 @@ } } }, - "put" : { - "type_enum" : "MAP", - "spec_args" : { "key_type" : { "type_enum" : "STRING", "spec_args" : null }, "val_type" : { "type_enum" : "STRING", "spec_args" : null} } , + "boolVal" : { + "type_enum" : "STRUCT", + "spec_args" : "patch.BoolPatch", "required" : true, "source_range" : { "begin" : { diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-json_experimental/module.json b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-json_experimental/module.json index 23de1649f59..d10aa2d20f2 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-json_experimental/module.json +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-json_experimental/module.json @@ -667,246 +667,362 @@ "is_union" : false, "lineno" : 22 }, - "MyStructFieldPatch" : { - "name" : "MyStructFieldPatch", + "MyStructFieldN10Patch" : { + "name" : "MyStructFieldN10Patch", "structured_annotations": { "cpp.Adapter" : { "type" : { "type" : "struct", "name" : "Adapter" }, - "value" : {"name": "::apache::thrift::op::detail::FieldPatchAdapter", "underlyingName": "MyStructFieldPatchStruct", "extraNamespace": ""} + "value" : {"name": "::apache::thrift::op::detail::AssignPatchAdapter", "underlyingName": "MyStructFieldN10PatchStruct", "extraNamespace": ""} } }, "fields" : { - "boolVal" : { - "name" : "boolVal", - "key" : -1, + "assign" : { + "name" : "assign", + "docstring" : "Assigns a value. If set, all other operations are ignored.\n", + "key" : 1, "lineno" : 22, - "required" : "opt-in-req-out", + "required" : "optional", "type" : { - "type" : "struct", - "name" : "BoolPatch" + "type" : "enum", + "name" : "MyEnum" } }, - "byteVal" : { - "name" : "byteVal", - "key" : -2, + "clear" : { + "name" : "clear", + "docstring" : "Clears a value. Applies first.\n", + "key" : 2, "lineno" : 22, "required" : "opt-in-req-out", - "type" : { + "type" : "bool" + } + }, + "is_exception" : false, + "is_union" : false, + "lineno" : 22 + }, + "MyStructFieldN25Patch" : { + "name" : "MyStructFieldN25Patch", + "structured_annotations": { + "cpp.Adapter" : { + "type" : { "type" : "struct", - "name" : "BytePatch" -} - }, - "i16Val" : { - "name" : "i16Val", - "key" : -3, + "name" : "Adapter" +}, + "value" : {"name": "::apache::thrift::op::detail::AssignPatchAdapter", "underlyingName": "MyStructFieldN25PatchStruct", "extraNamespace": ""} + } + }, + "fields" : { + "assign" : { + "name" : "assign", + "docstring" : "Assigns a value. If set, all other operations are ignored.\n", + "key" : 1, "lineno" : 22, - "required" : "opt-in-req-out", + "required" : "optional", "type" : { - "type" : "struct", - "name" : "I16Patch" + "type" : "enum", + "name" : "MyEnum" } }, - "i32Val" : { - "name" : "i32Val", - "key" : -4, + "clear" : { + "name" : "clear", + "docstring" : "Clears a value. Applies first.\n", + "key" : 2, "lineno" : 22, "required" : "opt-in-req-out", - "type" : { + "type" : "bool" + } + }, + "is_exception" : false, + "is_union" : false, + "lineno" : 22 + }, + "MyStructFieldN28Patch" : { + "name" : "MyStructFieldN28Patch", + "structured_annotations": { + "cpp.Adapter" : { + "type" : { "type" : "struct", - "name" : "I32Patch" -} - }, - "i64Val" : { - "name" : "i64Val", - "key" : -5, + "name" : "Adapter" +}, + "value" : {"name": "::apache::thrift::op::detail::ListPatchAdapter", "underlyingName": "MyStructFieldN28PatchStruct", "extraNamespace": ""} + } + }, + "fields" : { + "assign" : { + "name" : "assign", + "docstring" : "Assigns a value. If set, all other operations are ignored.\n", + "key" : 1, "lineno" : 22, - "required" : "opt-in-req-out", + "required" : "optional", "type" : { - "type" : "struct", - "name" : "I64Patch" + "type" : "list", + "inner_type" : "i16" } }, - "floatVal" : { - "name" : "floatVal", - "key" : -6, + "clear" : { + "name" : "clear", + "docstring" : "Clears a value. Applies first.\n", + "key" : 2, "lineno" : 22, "required" : "opt-in-req-out", - "type" : { - "type" : "struct", - "name" : "FloatPatch" -} + "type" : "bool" }, - "doubleVal" : { - "name" : "doubleVal", - "key" : -7, + "patch" : { + "name" : "patch", + "docstring" : "Patches list values by index. Applies second.\n", + "key" : 3, "lineno" : 22, "required" : "opt-in-req-out", "type" : { + "type" : "map", + "key_type" : "i32", + "value_type" : { "type" : "struct", - "name" : "DoublePatch" + "name" : "I16Patch" +} } }, - "stringVal" : { - "name" : "stringVal", - "key" : -8, + "remove" : { + "name" : "remove", + "docstring" : "Removes entries, if present. Applies third.\n", + "key" : 7, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "struct", - "name" : "StringPatch" + "type" : "list", + "inner_type" : "i16" } }, - "binaryVal" : { - "name" : "binaryVal", - "key" : -9, + "prepend" : { + "name" : "prepend", + "docstring" : "Prepends to the front of a given list.\n", + "key" : 8, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "struct", - "name" : "BinaryPatch" + "type" : "list", + "inner_type" : "i16" } }, - "enumVal" : { - "name" : "enumVal", - "key" : -10, + "append" : { + "name" : "append", + "docstring" : "Appends to the back of a given list.\n", + "key" : 9, "lineno" : 22, "required" : "opt-in-req-out", "type" : { + "type" : "list", + "inner_type" : "i16" +} + } + }, + "is_exception" : false, + "is_union" : false, + "lineno" : 22 + }, + "MyStructFieldN29Patch" : { + "name" : "MyStructFieldN29Patch", + "structured_annotations": { + "cpp.Adapter" : { + "type" : { "type" : "struct", - "name" : "MyStructFieldN10Patch" + "name" : "Adapter" +}, + "value" : {"name": "::apache::thrift::op::detail::SetPatchAdapter", "underlyingName": "MyStructFieldN29PatchStruct", "extraNamespace": ""} + } + }, + "fields" : { + "assign" : { + "name" : "assign", + "docstring" : "Assigns a value. If set, all other operations are ignored.\n", + "key" : 1, + "lineno" : 22, + "required" : "optional", + "type" : { + "type" : "set", + "inner_type" : "string" } }, - "structVal" : { - "name" : "structVal", - "key" : -11, + "clear" : { + "name" : "clear", + "docstring" : "Clears a value. Applies first.\n", + "key" : 2, "lineno" : 22, "required" : "opt-in-req-out", - "type" : { - "type" : "struct", - "name" : "MyDataPatch" -} + "type" : "bool" }, - "unionVal" : { - "name" : "unionVal", - "key" : -12, + "remove" : { + "name" : "remove", + "docstring" : "Removes entries, if present. Applies third.\n", + "key" : 7, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "struct", - "name" : "MyUnionPatch" + "type" : "set", + "inner_type" : "string" } }, - "lateStructVal" : { - "name" : "lateStructVal", - "key" : -13, + "add" : { + "name" : "add", + "docstring" : "Adds entries, if not already present. Applies fourth.\n", + "key" : 8, "lineno" : 22, "required" : "opt-in-req-out", "type" : { + "type" : "set", + "inner_type" : "string" +} + } + }, + "is_exception" : false, + "is_union" : false, + "lineno" : 22 + }, + "MyStructFieldN30Patch" : { + "name" : "MyStructFieldN30Patch", + "structured_annotations": { + "cpp.Adapter" : { + "type" : { "type" : "struct", - "name" : "LateDefStructPatch" + "name" : "Adapter" +}, + "value" : {"name": "::apache::thrift::op::detail::MapPatchAdapter", "underlyingName": "MyStructFieldN30PatchStruct", "extraNamespace": ""} + } + }, + "fields" : { + "assign" : { + "name" : "assign", + "docstring" : "Assigns a value. If set, all other operations are ignored.\n", + "key" : 1, + "lineno" : 22, + "required" : "optional", + "type" : { + "type" : "map", + "key_type" : "string", + "value_type" : "string" } }, - "durationVal" : { - "name" : "durationVal", - "key" : -14, + "clear" : { + "name" : "clear", + "docstring" : "Clears a value. Applies first.\n", + "key" : 2, "lineno" : 22, "required" : "opt-in-req-out", - "type" : { - "type" : "struct", - "name" : "DurationPatch" -} + "type" : "bool" }, - "timeVal" : { - "name" : "timeVal", - "key" : -15, + "add" : { + "name" : "add", + "docstring" : "Add the given values, if the keys are not already present. Applies forth.\n", + "key" : 5, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "struct", - "name" : "TimePatch" + "type" : "map", + "key_type" : "string", + "value_type" : "string" } }, - "optBoolVal" : { - "name" : "optBoolVal", - "key" : -16, + "remove" : { + "name" : "remove", + "docstring" : "Removes entries, if present. Applies third.\n", + "key" : 7, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "struct", - "name" : "BoolPatch" + "type" : "set", + "inner_type" : "string" } }, - "optByteVal" : { - "name" : "optByteVal", - "key" : -17, + "put" : { + "name" : "put", + "docstring" : "Adds or replaces the given key/value pairs. Applies fifth.\n", + "key" : 9, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "struct", - "name" : "BytePatch" + "type" : "map", + "key_type" : "string", + "value_type" : "string" } - }, - "optI16Val" : { - "name" : "optI16Val", - "key" : -18, + } + }, + "is_exception" : false, + "is_union" : false, + "lineno" : 22 + }, + "MyStructFieldPatch" : { + "name" : "MyStructFieldPatch", + "structured_annotations": { + "cpp.Adapter" : { + "type" : { + "type" : "struct", + "name" : "Adapter" +}, + "value" : {"name": "::apache::thrift::op::detail::FieldPatchAdapter", "underlyingName": "MyStructFieldPatchStruct", "extraNamespace": ""} + } + }, + "fields" : { + "optMapVal" : { + "name" : "optMapVal", + "key" : -30, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "I16Patch" + "name" : "MyStructFieldN30Patch" } }, - "optI32Val" : { - "name" : "optI32Val", - "key" : -19, + "optSetVal" : { + "name" : "optSetVal", + "key" : -29, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "I32Patch" + "name" : "MyStructFieldN29Patch" } }, - "optI64Val" : { - "name" : "optI64Val", - "key" : -20, + "optListVal" : { + "name" : "optListVal", + "key" : -28, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "I64Patch" + "name" : "MyStructFieldN28Patch" } }, - "optFloatVal" : { - "name" : "optFloatVal", - "key" : -21, + "optLateStructVal" : { + "name" : "optLateStructVal", + "key" : -27, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "FloatPatch" + "name" : "LateDefStructPatch" } }, - "optDoubleVal" : { - "name" : "optDoubleVal", - "key" : -22, + "optStructVal" : { + "name" : "optStructVal", + "key" : -26, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "DoublePatch" + "name" : "MyDataPatch" } }, - "optStringVal" : { - "name" : "optStringVal", - "key" : -23, + "optEnumVal" : { + "name" : "optEnumVal", + "key" : -25, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "StringPatch" + "name" : "MyStructFieldN25Patch" } }, "optBinaryVal" : { @@ -919,350 +1035,234 @@ "name" : "BinaryPatch" } }, - "optEnumVal" : { - "name" : "optEnumVal", - "key" : -25, + "optStringVal" : { + "name" : "optStringVal", + "key" : -23, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "MyStructFieldN25Patch" + "name" : "StringPatch" } }, - "optStructVal" : { - "name" : "optStructVal", - "key" : -26, + "optDoubleVal" : { + "name" : "optDoubleVal", + "key" : -22, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "MyDataPatch" + "name" : "DoublePatch" } }, - "optLateStructVal" : { - "name" : "optLateStructVal", - "key" : -27, + "optFloatVal" : { + "name" : "optFloatVal", + "key" : -21, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "LateDefStructPatch" + "name" : "FloatPatch" } }, - "optListVal" : { - "name" : "optListVal", - "key" : -28, + "optI64Val" : { + "name" : "optI64Val", + "key" : -20, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "MyStructFieldN28Patch" + "name" : "I64Patch" } }, - "optSetVal" : { - "name" : "optSetVal", - "key" : -29, + "optI32Val" : { + "name" : "optI32Val", + "key" : -19, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "MyStructFieldN29Patch" + "name" : "I32Patch" } }, - "optMapVal" : { - "name" : "optMapVal", - "key" : -30, + "optI16Val" : { + "name" : "optI16Val", + "key" : -18, "lineno" : 22, "required" : "opt-in-req-out", "type" : { "type" : "struct", - "name" : "MyStructFieldN30Patch" -} - } - }, - "is_exception" : false, - "is_union" : false, - "lineno" : 22 - }, - "MyStructFieldN10Patch" : { - "name" : "MyStructFieldN10Patch", - "structured_annotations": { - "cpp.Adapter" : { - "type" : { - "type" : "struct", - "name" : "Adapter" -}, - "value" : {"name": "::apache::thrift::op::detail::AssignPatchAdapter", "underlyingName": "MyStructFieldN10PatchStruct", "extraNamespace": ""} - } - }, - "fields" : { - "assign" : { - "name" : "assign", - "docstring" : "Assigns a value. If set, all other operations are ignored.\n", - "key" : 1, - "lineno" : 22, - "required" : "optional", - "type" : { - "type" : "enum", - "name" : "MyEnum" + "name" : "I16Patch" } - }, - "clear" : { - "name" : "clear", - "docstring" : "Clears a value. Applies first.\n", - "key" : 2, - "lineno" : 22, - "required" : "opt-in-req-out", - "type" : "bool" - } - }, - "is_exception" : false, - "is_union" : false, - "lineno" : 22 - }, - "MyStructFieldN25Patch" : { - "name" : "MyStructFieldN25Patch", - "structured_annotations": { - "cpp.Adapter" : { - "type" : { - "type" : "struct", - "name" : "Adapter" -}, - "value" : {"name": "::apache::thrift::op::detail::AssignPatchAdapter", "underlyingName": "MyStructFieldN25PatchStruct", "extraNamespace": ""} - } - }, - "fields" : { - "assign" : { - "name" : "assign", - "docstring" : "Assigns a value. If set, all other operations are ignored.\n", - "key" : 1, + }, + "optByteVal" : { + "name" : "optByteVal", + "key" : -17, "lineno" : 22, - "required" : "optional", + "required" : "opt-in-req-out", "type" : { - "type" : "enum", - "name" : "MyEnum" + "type" : "struct", + "name" : "BytePatch" } }, - "clear" : { - "name" : "clear", - "docstring" : "Clears a value. Applies first.\n", - "key" : 2, + "optBoolVal" : { + "name" : "optBoolVal", + "key" : -16, "lineno" : 22, "required" : "opt-in-req-out", - "type" : "bool" - } - }, - "is_exception" : false, - "is_union" : false, - "lineno" : 22 - }, - "MyStructFieldN28Patch" : { - "name" : "MyStructFieldN28Patch", - "structured_annotations": { - "cpp.Adapter" : { - "type" : { + "type" : { "type" : "struct", - "name" : "Adapter" -}, - "value" : {"name": "::apache::thrift::op::detail::ListPatchAdapter", "underlyingName": "MyStructFieldN28PatchStruct", "extraNamespace": ""} - } - }, - "fields" : { - "assign" : { - "name" : "assign", - "docstring" : "Assigns a value. If set, all other operations are ignored.\n", - "key" : 1, + "name" : "BoolPatch" +} + }, + "timeVal" : { + "name" : "timeVal", + "key" : -15, "lineno" : 22, - "required" : "optional", + "required" : "opt-in-req-out", "type" : { - "type" : "list", - "inner_type" : "i16" + "type" : "struct", + "name" : "TimePatch" } }, - "clear" : { - "name" : "clear", - "docstring" : "Clears a value. Applies first.\n", - "key" : 2, + "durationVal" : { + "name" : "durationVal", + "key" : -14, "lineno" : 22, "required" : "opt-in-req-out", - "type" : "bool" + "type" : { + "type" : "struct", + "name" : "DurationPatch" +} }, - "patch" : { - "name" : "patch", - "docstring" : "Patches list values by index. Applies second.\n", - "key" : 3, + "lateStructVal" : { + "name" : "lateStructVal", + "key" : -13, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "map", - "key_type" : "i32", - "value_type" : { "type" : "struct", - "name" : "I16Patch" -} + "name" : "LateDefStructPatch" } }, - "remove" : { - "name" : "remove", - "docstring" : "Removes entries, if present. Applies third.\n", - "key" : 7, + "unionVal" : { + "name" : "unionVal", + "key" : -12, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "list", - "inner_type" : "i16" + "type" : "struct", + "name" : "MyUnionPatch" } }, - "prepend" : { - "name" : "prepend", - "docstring" : "Prepends to the front of a given list.\n", - "key" : 8, + "structVal" : { + "name" : "structVal", + "key" : -11, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "list", - "inner_type" : "i16" + "type" : "struct", + "name" : "MyDataPatch" } }, - "append" : { - "name" : "append", - "docstring" : "Appends to the back of a given list.\n", - "key" : 9, + "enumVal" : { + "name" : "enumVal", + "key" : -10, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "list", - "inner_type" : "i16" -} - } - }, - "is_exception" : false, - "is_union" : false, - "lineno" : 22 - }, - "MyStructFieldN29Patch" : { - "name" : "MyStructFieldN29Patch", - "structured_annotations": { - "cpp.Adapter" : { - "type" : { "type" : "struct", - "name" : "Adapter" -}, - "value" : {"name": "::apache::thrift::op::detail::SetPatchAdapter", "underlyingName": "MyStructFieldN29PatchStruct", "extraNamespace": ""} - } - }, - "fields" : { - "assign" : { - "name" : "assign", - "docstring" : "Assigns a value. If set, all other operations are ignored.\n", - "key" : 1, + "name" : "MyStructFieldN10Patch" +} + }, + "binaryVal" : { + "name" : "binaryVal", + "key" : -9, "lineno" : 22, - "required" : "optional", + "required" : "opt-in-req-out", "type" : { - "type" : "set", - "inner_type" : "string" + "type" : "struct", + "name" : "BinaryPatch" } }, - "clear" : { - "name" : "clear", - "docstring" : "Clears a value. Applies first.\n", - "key" : 2, + "stringVal" : { + "name" : "stringVal", + "key" : -8, "lineno" : 22, "required" : "opt-in-req-out", - "type" : "bool" + "type" : { + "type" : "struct", + "name" : "StringPatch" +} }, - "remove" : { - "name" : "remove", - "docstring" : "Removes entries, if present. Applies third.\n", - "key" : 7, + "doubleVal" : { + "name" : "doubleVal", + "key" : -7, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "set", - "inner_type" : "string" + "type" : "struct", + "name" : "DoublePatch" } }, - "add" : { - "name" : "add", - "docstring" : "Adds entries, if not already present. Applies fourth.\n", - "key" : 8, + "floatVal" : { + "name" : "floatVal", + "key" : -6, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "set", - "inner_type" : "string" -} - } - }, - "is_exception" : false, - "is_union" : false, - "lineno" : 22 - }, - "MyStructFieldN30Patch" : { - "name" : "MyStructFieldN30Patch", - "structured_annotations": { - "cpp.Adapter" : { - "type" : { "type" : "struct", - "name" : "Adapter" -}, - "value" : {"name": "::apache::thrift::op::detail::MapPatchAdapter", "underlyingName": "MyStructFieldN30PatchStruct", "extraNamespace": ""} - } - }, - "fields" : { - "assign" : { - "name" : "assign", - "docstring" : "Assigns a value. If set, all other operations are ignored.\n", - "key" : 1, + "name" : "FloatPatch" +} + }, + "i64Val" : { + "name" : "i64Val", + "key" : -5, "lineno" : 22, - "required" : "optional", + "required" : "opt-in-req-out", "type" : { - "type" : "map", - "key_type" : "string", - "value_type" : "string" + "type" : "struct", + "name" : "I64Patch" } }, - "clear" : { - "name" : "clear", - "docstring" : "Clears a value. Applies first.\n", - "key" : 2, + "i32Val" : { + "name" : "i32Val", + "key" : -4, "lineno" : 22, "required" : "opt-in-req-out", - "type" : "bool" + "type" : { + "type" : "struct", + "name" : "I32Patch" +} }, - "add" : { - "name" : "add", - "docstring" : "Add the given values, if the keys are not already present. Applies forth.\n", - "key" : 5, + "i16Val" : { + "name" : "i16Val", + "key" : -3, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "map", - "key_type" : "string", - "value_type" : "string" + "type" : "struct", + "name" : "I16Patch" } }, - "remove" : { - "name" : "remove", - "docstring" : "Removes entries, if present. Applies third.\n", - "key" : 7, + "byteVal" : { + "name" : "byteVal", + "key" : -2, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "set", - "inner_type" : "string" + "type" : "struct", + "name" : "BytePatch" } }, - "put" : { - "name" : "put", - "docstring" : "Adds or replaces the given key/value pairs. Applies fifth.\n", - "key" : 9, + "boolVal" : { + "name" : "boolVal", + "key" : -1, "lineno" : 22, "required" : "opt-in-req-out", "type" : { - "type" : "map", - "key_type" : "string", - "value_type" : "string" + "type" : "struct", + "name" : "BoolPatch" } } }, diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-py/module/constants.py b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-py/module/constants.py index 03fcd998fa4..c6c1cc11f6c 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-py/module/constants.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-py/module/constants.py @@ -21,5 +21,5 @@ import thrift.lib.thrift.patch.ttypes import thrift.lib.thrift.standard.ttypes -from .ttypes import UTF8STRINGS, MyEnum, MyData, InnerUnion, MyUnion, MyStruct, LateDefStruct, MyDataFieldPatch, MyDataPatch, InnerUnionFieldPatch, InnerUnionPatch, MyUnionFieldPatch, MyUnionPatch, MyStructFieldPatch, MyStructFieldN10Patch, MyStructFieldN25Patch, MyStructFieldN28Patch, MyStructFieldN29Patch, MyStructFieldN30Patch, MyStructPatch, LateDefStructFieldPatch, LateDefStructPatch +from .ttypes import UTF8STRINGS, MyEnum, MyData, InnerUnion, MyUnion, MyStruct, LateDefStruct, MyDataFieldPatch, MyDataPatch, InnerUnionFieldPatch, InnerUnionPatch, MyUnionFieldPatch, MyUnionPatch, MyStructFieldN10Patch, MyStructFieldN25Patch, MyStructFieldN28Patch, MyStructFieldN29Patch, MyStructFieldN30Patch, MyStructFieldPatch, MyStructPatch, LateDefStructFieldPatch, LateDefStructPatch diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-py/module/ttypes.py b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-py/module/ttypes.py index 7dd5773953e..f739f7b887d 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-py/module/ttypes.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-py/module/ttypes.py @@ -36,7 +36,7 @@ except ImportError: all_structs = [] UTF8STRINGS = bool(0) or sys.version_info.major >= 3 -__all__ = ['UTF8STRINGS', 'MyEnum', 'MyData', 'InnerUnion', 'MyUnion', 'MyStruct', 'LateDefStruct', 'MyDataFieldPatch', 'MyDataPatch', 'InnerUnionFieldPatch', 'InnerUnionPatch', 'MyUnionFieldPatch', 'MyUnionPatch', 'MyStructFieldPatch', 'MyStructFieldN10Patch', 'MyStructFieldN25Patch', 'MyStructFieldN28Patch', 'MyStructFieldN29Patch', 'MyStructFieldN30Patch', 'MyStructPatch', 'LateDefStructFieldPatch', 'LateDefStructPatch'] +__all__ = ['UTF8STRINGS', 'MyEnum', 'MyData', 'InnerUnion', 'MyUnion', 'MyStruct', 'LateDefStruct', 'MyDataFieldPatch', 'MyDataPatch', 'InnerUnionFieldPatch', 'InnerUnionPatch', 'MyUnionFieldPatch', 'MyUnionPatch', 'MyStructFieldN10Patch', 'MyStructFieldN25Patch', 'MyStructFieldN28Patch', 'MyStructFieldN29Patch', 'MyStructFieldN30Patch', 'MyStructFieldPatch', 'MyStructPatch', 'LateDefStructFieldPatch', 'LateDefStructPatch'] class MyEnum: MyValue0 = 0 @@ -2193,39 +2193,11 @@ class MyUnionPatch: def _to_py_deprecated(self): return self -class MyStructFieldPatch: +class MyStructFieldN10Patch: """ Attributes: - - boolVal - - byteVal - - i16Val - - i32Val - - i64Val - - floatVal - - doubleVal - - stringVal - - binaryVal - - enumVal - - structVal - - unionVal - - lateStructVal - - durationVal - - timeVal - - optBoolVal - - optByteVal - - optI16Val - - optI32Val - - optI64Val - - optFloatVal - - optDoubleVal - - optStringVal - - optBinaryVal - - optEnumVal - - optStructVal - - optLateStructVal - - optListVal - - optSetVal - - optMapVal + - assign: Assigns a value. If set, all other operations are ignored. + - clear: Clears a value. Applies first. """ thrift_spec = None @@ -2248,184 +2220,14 @@ class MyStructFieldPatch: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == -1: - if ftype == TType.STRUCT: - self.boolVal = thrift.lib.thrift.patch.ttypes.BoolPatch() - self.boolVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -2: - if ftype == TType.STRUCT: - self.byteVal = thrift.lib.thrift.patch.ttypes.BytePatch() - self.byteVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -3: - if ftype == TType.STRUCT: - self.i16Val = thrift.lib.thrift.patch.ttypes.I16Patch() - self.i16Val.read(iprot) - else: - iprot.skip(ftype) - elif fid == -4: - if ftype == TType.STRUCT: - self.i32Val = thrift.lib.thrift.patch.ttypes.I32Patch() - self.i32Val.read(iprot) - else: - iprot.skip(ftype) - elif fid == -5: - if ftype == TType.STRUCT: - self.i64Val = thrift.lib.thrift.patch.ttypes.I64Patch() - self.i64Val.read(iprot) - else: - iprot.skip(ftype) - elif fid == -6: - if ftype == TType.STRUCT: - self.floatVal = thrift.lib.thrift.patch.ttypes.FloatPatch() - self.floatVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -7: - if ftype == TType.STRUCT: - self.doubleVal = thrift.lib.thrift.patch.ttypes.DoublePatch() - self.doubleVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -8: - if ftype == TType.STRUCT: - self.stringVal = thrift.lib.thrift.patch.ttypes.StringPatch() - self.stringVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -9: - if ftype == TType.STRUCT: - self.binaryVal = thrift.lib.thrift.patch.ttypes.BinaryPatch() - self.binaryVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -10: - if ftype == TType.STRUCT: - self.enumVal = MyStructFieldN10Patch() - self.enumVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -11: - if ftype == TType.STRUCT: - self.structVal = MyDataPatch() - self.structVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -12: - if ftype == TType.STRUCT: - self.unionVal = MyUnionPatch() - self.unionVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -13: - if ftype == TType.STRUCT: - self.lateStructVal = LateDefStructPatch() - self.lateStructVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -14: - if ftype == TType.STRUCT: - self.durationVal = thrift.lib.thrift.patch.ttypes.DurationPatch() - self.durationVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -15: - if ftype == TType.STRUCT: - self.timeVal = thrift.lib.thrift.patch.ttypes.TimePatch() - self.timeVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -16: - if ftype == TType.STRUCT: - self.optBoolVal = thrift.lib.thrift.patch.ttypes.BoolPatch() - self.optBoolVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -17: - if ftype == TType.STRUCT: - self.optByteVal = thrift.lib.thrift.patch.ttypes.BytePatch() - self.optByteVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -18: - if ftype == TType.STRUCT: - self.optI16Val = thrift.lib.thrift.patch.ttypes.I16Patch() - self.optI16Val.read(iprot) - else: - iprot.skip(ftype) - elif fid == -19: - if ftype == TType.STRUCT: - self.optI32Val = thrift.lib.thrift.patch.ttypes.I32Patch() - self.optI32Val.read(iprot) - else: - iprot.skip(ftype) - elif fid == -20: - if ftype == TType.STRUCT: - self.optI64Val = thrift.lib.thrift.patch.ttypes.I64Patch() - self.optI64Val.read(iprot) - else: - iprot.skip(ftype) - elif fid == -21: - if ftype == TType.STRUCT: - self.optFloatVal = thrift.lib.thrift.patch.ttypes.FloatPatch() - self.optFloatVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -22: - if ftype == TType.STRUCT: - self.optDoubleVal = thrift.lib.thrift.patch.ttypes.DoublePatch() - self.optDoubleVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -23: - if ftype == TType.STRUCT: - self.optStringVal = thrift.lib.thrift.patch.ttypes.StringPatch() - self.optStringVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -24: - if ftype == TType.STRUCT: - self.optBinaryVal = thrift.lib.thrift.patch.ttypes.BinaryPatch() - self.optBinaryVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -25: - if ftype == TType.STRUCT: - self.optEnumVal = MyStructFieldN25Patch() - self.optEnumVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -26: - if ftype == TType.STRUCT: - self.optStructVal = MyDataPatch() - self.optStructVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -27: - if ftype == TType.STRUCT: - self.optLateStructVal = LateDefStructPatch() - self.optLateStructVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -28: - if ftype == TType.STRUCT: - self.optListVal = MyStructFieldN28Patch() - self.optListVal.read(iprot) - else: - iprot.skip(ftype) - elif fid == -29: - if ftype == TType.STRUCT: - self.optSetVal = MyStructFieldN29Patch() - self.optSetVal.read(iprot) + if fid == 1: + if ftype == TType.I32: + self.assign = iprot.readI32() else: iprot.skip(ftype) - elif fid == -30: - if ftype == TType.STRUCT: - self.optMapVal = MyStructFieldN30Patch() - self.optMapVal.read(iprot) + elif fid == 2: + if ftype == TType.BOOL: + self.clear = iprot.readBool() else: iprot.skip(ftype) else: @@ -2440,476 +2242,14 @@ class MyStructFieldPatch: if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return - oprot.writeStructBegin('MyStructFieldPatch') - if self.optMapVal != None: - oprot.writeFieldBegin('optMapVal', TType.STRUCT, -30) - self.optMapVal.write(oprot) - oprot.writeFieldEnd() - if self.optSetVal != None: - oprot.writeFieldBegin('optSetVal', TType.STRUCT, -29) - self.optSetVal.write(oprot) - oprot.writeFieldEnd() - if self.optListVal != None: - oprot.writeFieldBegin('optListVal', TType.STRUCT, -28) - self.optListVal.write(oprot) - oprot.writeFieldEnd() - if self.optLateStructVal != None: - oprot.writeFieldBegin('optLateStructVal', TType.STRUCT, -27) - self.optLateStructVal.write(oprot) - oprot.writeFieldEnd() - if self.optStructVal != None: - oprot.writeFieldBegin('optStructVal', TType.STRUCT, -26) - self.optStructVal.write(oprot) - oprot.writeFieldEnd() - if self.optEnumVal != None: - oprot.writeFieldBegin('optEnumVal', TType.STRUCT, -25) - self.optEnumVal.write(oprot) - oprot.writeFieldEnd() - if self.optBinaryVal != None: - oprot.writeFieldBegin('optBinaryVal', TType.STRUCT, -24) - self.optBinaryVal.write(oprot) + oprot.writeStructBegin('MyStructFieldN10Patch') + if self.assign != None: + oprot.writeFieldBegin('assign', TType.I32, 1) + oprot.writeI32(self.assign) oprot.writeFieldEnd() - if self.optStringVal != None: - oprot.writeFieldBegin('optStringVal', TType.STRUCT, -23) - self.optStringVal.write(oprot) - oprot.writeFieldEnd() - if self.optDoubleVal != None: - oprot.writeFieldBegin('optDoubleVal', TType.STRUCT, -22) - self.optDoubleVal.write(oprot) - oprot.writeFieldEnd() - if self.optFloatVal != None: - oprot.writeFieldBegin('optFloatVal', TType.STRUCT, -21) - self.optFloatVal.write(oprot) - oprot.writeFieldEnd() - if self.optI64Val != None: - oprot.writeFieldBegin('optI64Val', TType.STRUCT, -20) - self.optI64Val.write(oprot) - oprot.writeFieldEnd() - if self.optI32Val != None: - oprot.writeFieldBegin('optI32Val', TType.STRUCT, -19) - self.optI32Val.write(oprot) - oprot.writeFieldEnd() - if self.optI16Val != None: - oprot.writeFieldBegin('optI16Val', TType.STRUCT, -18) - self.optI16Val.write(oprot) - oprot.writeFieldEnd() - if self.optByteVal != None: - oprot.writeFieldBegin('optByteVal', TType.STRUCT, -17) - self.optByteVal.write(oprot) - oprot.writeFieldEnd() - if self.optBoolVal != None: - oprot.writeFieldBegin('optBoolVal', TType.STRUCT, -16) - self.optBoolVal.write(oprot) - oprot.writeFieldEnd() - if self.timeVal != None: - oprot.writeFieldBegin('timeVal', TType.STRUCT, -15) - self.timeVal.write(oprot) - oprot.writeFieldEnd() - if self.durationVal != None: - oprot.writeFieldBegin('durationVal', TType.STRUCT, -14) - self.durationVal.write(oprot) - oprot.writeFieldEnd() - if self.lateStructVal != None: - oprot.writeFieldBegin('lateStructVal', TType.STRUCT, -13) - self.lateStructVal.write(oprot) - oprot.writeFieldEnd() - if self.unionVal != None: - oprot.writeFieldBegin('unionVal', TType.STRUCT, -12) - self.unionVal.write(oprot) - oprot.writeFieldEnd() - if self.structVal != None: - oprot.writeFieldBegin('structVal', TType.STRUCT, -11) - self.structVal.write(oprot) - oprot.writeFieldEnd() - if self.enumVal != None: - oprot.writeFieldBegin('enumVal', TType.STRUCT, -10) - self.enumVal.write(oprot) - oprot.writeFieldEnd() - if self.binaryVal != None: - oprot.writeFieldBegin('binaryVal', TType.STRUCT, -9) - self.binaryVal.write(oprot) - oprot.writeFieldEnd() - if self.stringVal != None: - oprot.writeFieldBegin('stringVal', TType.STRUCT, -8) - self.stringVal.write(oprot) - oprot.writeFieldEnd() - if self.doubleVal != None: - oprot.writeFieldBegin('doubleVal', TType.STRUCT, -7) - self.doubleVal.write(oprot) - oprot.writeFieldEnd() - if self.floatVal != None: - oprot.writeFieldBegin('floatVal', TType.STRUCT, -6) - self.floatVal.write(oprot) - oprot.writeFieldEnd() - if self.i64Val != None: - oprot.writeFieldBegin('i64Val', TType.STRUCT, -5) - self.i64Val.write(oprot) - oprot.writeFieldEnd() - if self.i32Val != None: - oprot.writeFieldBegin('i32Val', TType.STRUCT, -4) - self.i32Val.write(oprot) - oprot.writeFieldEnd() - if self.i16Val != None: - oprot.writeFieldBegin('i16Val', TType.STRUCT, -3) - self.i16Val.write(oprot) - oprot.writeFieldEnd() - if self.byteVal != None: - oprot.writeFieldBegin('byteVal', TType.STRUCT, -2) - self.byteVal.write(oprot) - oprot.writeFieldEnd() - if self.boolVal != None: - oprot.writeFieldBegin('boolVal', TType.STRUCT, -1) - self.boolVal.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def readFromJson(self, json, is_text=True, **kwargs): - relax_enum_validation = bool(kwargs.pop('relax_enum_validation', False)) - set_cls = kwargs.pop('custom_set_cls', set) - dict_cls = kwargs.pop('custom_dict_cls', dict) - if kwargs: - extra_kwargs = ', '.join(kwargs.keys()) - raise ValueError( - 'Unexpected keyword arguments: ' + extra_kwargs - ) - json_obj = json - if is_text: - json_obj = loads(json) - if 'boolVal' in json_obj and json_obj['boolVal'] is not None: - self.boolVal = thrift.lib.thrift.patch.ttypes.BoolPatch() - self.boolVal.readFromJson(json_obj['boolVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'byteVal' in json_obj and json_obj['byteVal'] is not None: - self.byteVal = thrift.lib.thrift.patch.ttypes.BytePatch() - self.byteVal.readFromJson(json_obj['byteVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'i16Val' in json_obj and json_obj['i16Val'] is not None: - self.i16Val = thrift.lib.thrift.patch.ttypes.I16Patch() - self.i16Val.readFromJson(json_obj['i16Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'i32Val' in json_obj and json_obj['i32Val'] is not None: - self.i32Val = thrift.lib.thrift.patch.ttypes.I32Patch() - self.i32Val.readFromJson(json_obj['i32Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'i64Val' in json_obj and json_obj['i64Val'] is not None: - self.i64Val = thrift.lib.thrift.patch.ttypes.I64Patch() - self.i64Val.readFromJson(json_obj['i64Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'floatVal' in json_obj and json_obj['floatVal'] is not None: - self.floatVal = thrift.lib.thrift.patch.ttypes.FloatPatch() - self.floatVal.readFromJson(json_obj['floatVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'doubleVal' in json_obj and json_obj['doubleVal'] is not None: - self.doubleVal = thrift.lib.thrift.patch.ttypes.DoublePatch() - self.doubleVal.readFromJson(json_obj['doubleVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'stringVal' in json_obj and json_obj['stringVal'] is not None: - self.stringVal = thrift.lib.thrift.patch.ttypes.StringPatch() - self.stringVal.readFromJson(json_obj['stringVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'binaryVal' in json_obj and json_obj['binaryVal'] is not None: - self.binaryVal = thrift.lib.thrift.patch.ttypes.BinaryPatch() - self.binaryVal.readFromJson(json_obj['binaryVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'enumVal' in json_obj and json_obj['enumVal'] is not None: - self.enumVal = MyStructFieldN10Patch() - self.enumVal.readFromJson(json_obj['enumVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'structVal' in json_obj and json_obj['structVal'] is not None: - self.structVal = MyDataPatch() - self.structVal.readFromJson(json_obj['structVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'unionVal' in json_obj and json_obj['unionVal'] is not None: - self.unionVal = MyUnionPatch() - self.unionVal.readFromJson(json_obj['unionVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'lateStructVal' in json_obj and json_obj['lateStructVal'] is not None: - self.lateStructVal = LateDefStructPatch() - self.lateStructVal.readFromJson(json_obj['lateStructVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'durationVal' in json_obj and json_obj['durationVal'] is not None: - self.durationVal = thrift.lib.thrift.patch.ttypes.DurationPatch() - self.durationVal.readFromJson(json_obj['durationVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'timeVal' in json_obj and json_obj['timeVal'] is not None: - self.timeVal = thrift.lib.thrift.patch.ttypes.TimePatch() - self.timeVal.readFromJson(json_obj['timeVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optBoolVal' in json_obj and json_obj['optBoolVal'] is not None: - self.optBoolVal = thrift.lib.thrift.patch.ttypes.BoolPatch() - self.optBoolVal.readFromJson(json_obj['optBoolVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optByteVal' in json_obj and json_obj['optByteVal'] is not None: - self.optByteVal = thrift.lib.thrift.patch.ttypes.BytePatch() - self.optByteVal.readFromJson(json_obj['optByteVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optI16Val' in json_obj and json_obj['optI16Val'] is not None: - self.optI16Val = thrift.lib.thrift.patch.ttypes.I16Patch() - self.optI16Val.readFromJson(json_obj['optI16Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optI32Val' in json_obj and json_obj['optI32Val'] is not None: - self.optI32Val = thrift.lib.thrift.patch.ttypes.I32Patch() - self.optI32Val.readFromJson(json_obj['optI32Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optI64Val' in json_obj and json_obj['optI64Val'] is not None: - self.optI64Val = thrift.lib.thrift.patch.ttypes.I64Patch() - self.optI64Val.readFromJson(json_obj['optI64Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optFloatVal' in json_obj and json_obj['optFloatVal'] is not None: - self.optFloatVal = thrift.lib.thrift.patch.ttypes.FloatPatch() - self.optFloatVal.readFromJson(json_obj['optFloatVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optDoubleVal' in json_obj and json_obj['optDoubleVal'] is not None: - self.optDoubleVal = thrift.lib.thrift.patch.ttypes.DoublePatch() - self.optDoubleVal.readFromJson(json_obj['optDoubleVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optStringVal' in json_obj and json_obj['optStringVal'] is not None: - self.optStringVal = thrift.lib.thrift.patch.ttypes.StringPatch() - self.optStringVal.readFromJson(json_obj['optStringVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optBinaryVal' in json_obj and json_obj['optBinaryVal'] is not None: - self.optBinaryVal = thrift.lib.thrift.patch.ttypes.BinaryPatch() - self.optBinaryVal.readFromJson(json_obj['optBinaryVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optEnumVal' in json_obj and json_obj['optEnumVal'] is not None: - self.optEnumVal = MyStructFieldN25Patch() - self.optEnumVal.readFromJson(json_obj['optEnumVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optStructVal' in json_obj and json_obj['optStructVal'] is not None: - self.optStructVal = MyDataPatch() - self.optStructVal.readFromJson(json_obj['optStructVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optLateStructVal' in json_obj and json_obj['optLateStructVal'] is not None: - self.optLateStructVal = LateDefStructPatch() - self.optLateStructVal.readFromJson(json_obj['optLateStructVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optListVal' in json_obj and json_obj['optListVal'] is not None: - self.optListVal = MyStructFieldN28Patch() - self.optListVal.readFromJson(json_obj['optListVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optSetVal' in json_obj and json_obj['optSetVal'] is not None: - self.optSetVal = MyStructFieldN29Patch() - self.optSetVal.readFromJson(json_obj['optSetVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - if 'optMapVal' in json_obj and json_obj['optMapVal'] is not None: - self.optMapVal = MyStructFieldN30Patch() - self.optMapVal.readFromJson(json_obj['optMapVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) - - def __repr__(self): - L = [] - padding = ' ' * 4 - if self.boolVal is not None: - value = pprint.pformat(self.boolVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' boolVal=%s' % (value)) - if self.byteVal is not None: - value = pprint.pformat(self.byteVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' byteVal=%s' % (value)) - if self.i16Val is not None: - value = pprint.pformat(self.i16Val, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' i16Val=%s' % (value)) - if self.i32Val is not None: - value = pprint.pformat(self.i32Val, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' i32Val=%s' % (value)) - if self.i64Val is not None: - value = pprint.pformat(self.i64Val, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' i64Val=%s' % (value)) - if self.floatVal is not None: - value = pprint.pformat(self.floatVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' floatVal=%s' % (value)) - if self.doubleVal is not None: - value = pprint.pformat(self.doubleVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' doubleVal=%s' % (value)) - if self.stringVal is not None: - value = pprint.pformat(self.stringVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' stringVal=%s' % (value)) - if self.binaryVal is not None: - value = pprint.pformat(self.binaryVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' binaryVal=%s' % (value)) - if self.enumVal is not None: - value = pprint.pformat(self.enumVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' enumVal=%s' % (value)) - if self.structVal is not None: - value = pprint.pformat(self.structVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' structVal=%s' % (value)) - if self.unionVal is not None: - value = pprint.pformat(self.unionVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' unionVal=%s' % (value)) - if self.lateStructVal is not None: - value = pprint.pformat(self.lateStructVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' lateStructVal=%s' % (value)) - if self.durationVal is not None: - value = pprint.pformat(self.durationVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' durationVal=%s' % (value)) - if self.timeVal is not None: - value = pprint.pformat(self.timeVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' timeVal=%s' % (value)) - if self.optBoolVal is not None: - value = pprint.pformat(self.optBoolVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optBoolVal=%s' % (value)) - if self.optByteVal is not None: - value = pprint.pformat(self.optByteVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optByteVal=%s' % (value)) - if self.optI16Val is not None: - value = pprint.pformat(self.optI16Val, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optI16Val=%s' % (value)) - if self.optI32Val is not None: - value = pprint.pformat(self.optI32Val, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optI32Val=%s' % (value)) - if self.optI64Val is not None: - value = pprint.pformat(self.optI64Val, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optI64Val=%s' % (value)) - if self.optFloatVal is not None: - value = pprint.pformat(self.optFloatVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optFloatVal=%s' % (value)) - if self.optDoubleVal is not None: - value = pprint.pformat(self.optDoubleVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optDoubleVal=%s' % (value)) - if self.optStringVal is not None: - value = pprint.pformat(self.optStringVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optStringVal=%s' % (value)) - if self.optBinaryVal is not None: - value = pprint.pformat(self.optBinaryVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optBinaryVal=%s' % (value)) - if self.optEnumVal is not None: - value = pprint.pformat(self.optEnumVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optEnumVal=%s' % (value)) - if self.optStructVal is not None: - value = pprint.pformat(self.optStructVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optStructVal=%s' % (value)) - if self.optLateStructVal is not None: - value = pprint.pformat(self.optLateStructVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optLateStructVal=%s' % (value)) - if self.optListVal is not None: - value = pprint.pformat(self.optListVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optListVal=%s' % (value)) - if self.optSetVal is not None: - value = pprint.pformat(self.optSetVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optSetVal=%s' % (value)) - if self.optMapVal is not None: - value = pprint.pformat(self.optMapVal, indent=0) - value = padding.join(value.splitlines(True)) - L.append(' optMapVal=%s' % (value)) - return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') - - def __eq__(self, other): - if not isinstance(other, self.__class__): - return False - - return self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - def __dir__(self): - return ( - 'optMapVal', - 'optSetVal', - 'optListVal', - 'optLateStructVal', - 'optStructVal', - 'optEnumVal', - 'optBinaryVal', - 'optStringVal', - 'optDoubleVal', - 'optFloatVal', - 'optI64Val', - 'optI32Val', - 'optI16Val', - 'optByteVal', - 'optBoolVal', - 'timeVal', - 'durationVal', - 'lateStructVal', - 'unionVal', - 'structVal', - 'enumVal', - 'binaryVal', - 'stringVal', - 'doubleVal', - 'floatVal', - 'i64Val', - 'i32Val', - 'i16Val', - 'byteVal', - 'boolVal', - ) - - # Override the __hash__ function for Python3 - t10434117 - __hash__ = object.__hash__ - - def _to_python(self): - import importlib - import thrift.python.converter - python_types = importlib.import_module("test.fixtures.patch.module.thrift_types") - return thrift.python.converter.to_python_struct(python_types.MyStructFieldPatch, self) - - def _to_py3(self): - import importlib - import thrift.py3.converter - py3_types = importlib.import_module("test.fixtures.patch.module.types") - return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldPatch, self) - - def _to_py_deprecated(self): - return self - -class MyStructFieldN10Patch: - """ - Attributes: - - assign: Assigns a value. If set, all other operations are ignored. - - clear: Clears a value. Applies first. - """ - - thrift_spec = None - thrift_field_annotations = None - thrift_struct_annotations = None - __init__ = None - @staticmethod - def isUnion(): - return False - - def read(self, iprot): - if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: - fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) - return - if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: - fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.assign = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.clear = iprot.readBool() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: - oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) - return - if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: - oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) - return - oprot.writeStructBegin('MyStructFieldN10Patch') - if self.assign != None: - oprot.writeFieldBegin('assign', TType.I32, 1) - oprot.writeI32(self.assign) - oprot.writeFieldEnd() - if self.clear != None: - oprot.writeFieldBegin('clear', TType.BOOL, 2) - oprot.writeBool(self.clear) + if self.clear != None: + oprot.writeFieldBegin('clear', TType.BOOL, 2) + oprot.writeBool(self.clear) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3462,21 +2802,246 @@ class MyStructFieldN29Patch: iprot.readSetEnd() else: iprot.skip(ftype) - elif fid == 8: + elif fid == 8: + if ftype == TType.SET: + self.add = set() + (_etype100, _size97) = iprot.readSetBegin() + if _size97 >= 0: + for _i101 in range(_size97): + _elem102 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.add.add(_elem102) + else: + while iprot.peekSet(): + _elem103 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.add.add(_elem103) + iprot.readSetEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if (isinstance(oprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0)) + return + if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: + oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) + return + oprot.writeStructBegin('MyStructFieldN29Patch') + if self.assign != None: + oprot.writeFieldBegin('assign', TType.SET, 1) + oprot.writeSetBegin(TType.STRING, len(self.assign)) + for iter104 in self.assign: + oprot.writeString(iter104.encode('utf-8')) if UTF8STRINGS and not isinstance(iter104, bytes) else oprot.writeString(iter104) + oprot.writeSetEnd() + oprot.writeFieldEnd() + if self.clear != None: + oprot.writeFieldBegin('clear', TType.BOOL, 2) + oprot.writeBool(self.clear) + oprot.writeFieldEnd() + if self.remove != None: + oprot.writeFieldBegin('remove', TType.SET, 7) + oprot.writeSetBegin(TType.STRING, len(self.remove)) + for iter105 in self.remove: + oprot.writeString(iter105.encode('utf-8')) if UTF8STRINGS and not isinstance(iter105, bytes) else oprot.writeString(iter105) + oprot.writeSetEnd() + oprot.writeFieldEnd() + if self.add != None: + oprot.writeFieldBegin('add', TType.SET, 8) + oprot.writeSetBegin(TType.STRING, len(self.add)) + for iter106 in self.add: + oprot.writeString(iter106.encode('utf-8')) if UTF8STRINGS and not isinstance(iter106, bytes) else oprot.writeString(iter106) + oprot.writeSetEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def readFromJson(self, json, is_text=True, **kwargs): + relax_enum_validation = bool(kwargs.pop('relax_enum_validation', False)) + set_cls = kwargs.pop('custom_set_cls', set) + dict_cls = kwargs.pop('custom_dict_cls', dict) + if kwargs: + extra_kwargs = ', '.join(kwargs.keys()) + raise ValueError( + 'Unexpected keyword arguments: ' + extra_kwargs + ) + json_obj = json + if is_text: + json_obj = loads(json) + if 'assign' in json_obj and json_obj['assign'] is not None: + self.assign = set_cls() + for _tmp_e107 in json_obj['assign']: + self.assign.add(_tmp_e107) + if 'clear' in json_obj and json_obj['clear'] is not None: + self.clear = json_obj['clear'] + if 'remove' in json_obj and json_obj['remove'] is not None: + self.remove = set_cls() + for _tmp_e108 in json_obj['remove']: + self.remove.add(_tmp_e108) + if 'add' in json_obj and json_obj['add'] is not None: + self.add = set_cls() + for _tmp_e109 in json_obj['add']: + self.add.add(_tmp_e109) + + def __repr__(self): + L = [] + padding = ' ' * 4 + if self.assign is not None: + value = pprint.pformat(self.assign, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' assign=%s' % (value)) + if self.clear is not None: + value = pprint.pformat(self.clear, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' clear=%s' % (value)) + if self.remove is not None: + value = pprint.pformat(self.remove, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' remove=%s' % (value)) + if self.add is not None: + value = pprint.pformat(self.add, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' add=%s' % (value)) + return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') + + def __eq__(self, other): + if not isinstance(other, self.__class__): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + def __dir__(self): + return ( + 'assign', + 'clear', + 'remove', + 'add', + ) + + # Override the __hash__ function for Python3 - t10434117 + __hash__ = object.__hash__ + + def _to_python(self): + import importlib + import thrift.python.converter + python_types = importlib.import_module("test.fixtures.patch.module.thrift_types") + return thrift.python.converter.to_python_struct(python_types.MyStructFieldN29Patch, self) + + def _to_py3(self): + import importlib + import thrift.py3.converter + py3_types = importlib.import_module("test.fixtures.patch.module.types") + return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN29Patch, self) + + def _to_py_deprecated(self): + return self + +class MyStructFieldN30Patch: + """ + Attributes: + - assign: Assigns a value. If set, all other operations are ignored. + - clear: Clears a value. Applies first. + - add: Add the given values, if the keys are not already present. Applies forth. + - remove: Removes entries, if present. Applies third. + - put: Adds or replaces the given key/value pairs. Applies fifth. + """ + + thrift_spec = None + thrift_field_annotations = None + thrift_struct_annotations = None + __init__ = None + @staticmethod + def isUnion(): + return False + + def read(self, iprot): + if (isinstance(iprot, TBinaryProtocol.TBinaryProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_BINARY_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=0) + return + if (isinstance(iprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(iprot, THeaderProtocol.THeaderProtocolAccelerate) and iprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastproto is not None: + fastproto.decode(self, iprot.trans, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.MAP: + self.assign = {} + (_ktype111, _vtype112, _size110 ) = iprot.readMapBegin() + if _size110 >= 0: + for _i114 in range(_size110): + _key115 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + _val116 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.assign[_key115] = _val116 + else: + while iprot.peekMap(): + _key117 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + _val118 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.assign[_key117] = _val118 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.clear = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.add = {} + (_ktype120, _vtype121, _size119 ) = iprot.readMapBegin() + if _size119 >= 0: + for _i123 in range(_size119): + _key124 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + _val125 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.add[_key124] = _val125 + else: + while iprot.peekMap(): + _key126 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + _val127 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.add[_key126] = _val127 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 7: if ftype == TType.SET: - self.add = set() - (_etype100, _size97) = iprot.readSetBegin() - if _size97 >= 0: - for _i101 in range(_size97): - _elem102 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.add.add(_elem102) + self.remove = set() + (_etype131, _size128) = iprot.readSetBegin() + if _size128 >= 0: + for _i132 in range(_size128): + _elem133 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.remove.add(_elem133) else: while iprot.peekSet(): - _elem103 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.add.add(_elem103) + _elem134 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.remove.add(_elem134) iprot.readSetEnd() else: iprot.skip(ftype) + elif fid == 9: + if ftype == TType.MAP: + self.put = {} + (_ktype136, _vtype137, _size135 ) = iprot.readMapBegin() + if _size135 >= 0: + for _i139 in range(_size135): + _key140 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + _val141 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.put[_key140] = _val141 + else: + while iprot.peekMap(): + _key142 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + _val143 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() + self.put[_key142] = _val143 + iprot.readMapEnd() + else: + iprot.skip(ftype) else: iprot.skip(ftype) iprot.readFieldEnd() @@ -3489,31 +3054,41 @@ class MyStructFieldN29Patch: if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return - oprot.writeStructBegin('MyStructFieldN29Patch') + oprot.writeStructBegin('MyStructFieldN30Patch') if self.assign != None: - oprot.writeFieldBegin('assign', TType.SET, 1) - oprot.writeSetBegin(TType.STRING, len(self.assign)) - for iter104 in self.assign: - oprot.writeString(iter104.encode('utf-8')) if UTF8STRINGS and not isinstance(iter104, bytes) else oprot.writeString(iter104) - oprot.writeSetEnd() + oprot.writeFieldBegin('assign', TType.MAP, 1) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.assign)) + for kiter144,viter145 in self.assign.items(): + oprot.writeString(kiter144.encode('utf-8')) if UTF8STRINGS and not isinstance(kiter144, bytes) else oprot.writeString(kiter144) + oprot.writeString(viter145.encode('utf-8')) if UTF8STRINGS and not isinstance(viter145, bytes) else oprot.writeString(viter145) + oprot.writeMapEnd() oprot.writeFieldEnd() if self.clear != None: oprot.writeFieldBegin('clear', TType.BOOL, 2) oprot.writeBool(self.clear) oprot.writeFieldEnd() + if self.add != None: + oprot.writeFieldBegin('add', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.add)) + for kiter146,viter147 in self.add.items(): + oprot.writeString(kiter146.encode('utf-8')) if UTF8STRINGS and not isinstance(kiter146, bytes) else oprot.writeString(kiter146) + oprot.writeString(viter147.encode('utf-8')) if UTF8STRINGS and not isinstance(viter147, bytes) else oprot.writeString(viter147) + oprot.writeMapEnd() + oprot.writeFieldEnd() if self.remove != None: oprot.writeFieldBegin('remove', TType.SET, 7) oprot.writeSetBegin(TType.STRING, len(self.remove)) - for iter105 in self.remove: - oprot.writeString(iter105.encode('utf-8')) if UTF8STRINGS and not isinstance(iter105, bytes) else oprot.writeString(iter105) + for iter148 in self.remove: + oprot.writeString(iter148.encode('utf-8')) if UTF8STRINGS and not isinstance(iter148, bytes) else oprot.writeString(iter148) oprot.writeSetEnd() oprot.writeFieldEnd() - if self.add != None: - oprot.writeFieldBegin('add', TType.SET, 8) - oprot.writeSetBegin(TType.STRING, len(self.add)) - for iter106 in self.add: - oprot.writeString(iter106.encode('utf-8')) if UTF8STRINGS and not isinstance(iter106, bytes) else oprot.writeString(iter106) - oprot.writeSetEnd() + if self.put != None: + oprot.writeFieldBegin('put', TType.MAP, 9) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.put)) + for kiter149,viter150 in self.put.items(): + oprot.writeString(kiter149.encode('utf-8')) if UTF8STRINGS and not isinstance(kiter149, bytes) else oprot.writeString(kiter149) + oprot.writeString(viter150.encode('utf-8')) if UTF8STRINGS and not isinstance(viter150, bytes) else oprot.writeString(viter150) + oprot.writeMapEnd() oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3531,19 +3106,26 @@ class MyStructFieldN29Patch: if is_text: json_obj = loads(json) if 'assign' in json_obj and json_obj['assign'] is not None: - self.assign = set_cls() - for _tmp_e107 in json_obj['assign']: - self.assign.add(_tmp_e107) + self.assign = dict_cls() + for _tmp_k151, _tmp_v152 in json_obj['assign'].items(): + _tmp_kp153 = _tmp_k151 + self.assign[_tmp_kp153] = _tmp_v152 if 'clear' in json_obj and json_obj['clear'] is not None: self.clear = json_obj['clear'] + if 'add' in json_obj and json_obj['add'] is not None: + self.add = dict_cls() + for _tmp_k154, _tmp_v155 in json_obj['add'].items(): + _tmp_kp156 = _tmp_k154 + self.add[_tmp_kp156] = _tmp_v155 if 'remove' in json_obj and json_obj['remove'] is not None: self.remove = set_cls() - for _tmp_e108 in json_obj['remove']: - self.remove.add(_tmp_e108) - if 'add' in json_obj and json_obj['add'] is not None: - self.add = set_cls() - for _tmp_e109 in json_obj['add']: - self.add.add(_tmp_e109) + for _tmp_e157 in json_obj['remove']: + self.remove.add(_tmp_e157) + if 'put' in json_obj and json_obj['put'] is not None: + self.put = dict_cls() + for _tmp_k158, _tmp_v159 in json_obj['put'].items(): + _tmp_kp160 = _tmp_k158 + self.put[_tmp_kp160] = _tmp_v159 def __repr__(self): L = [] @@ -3556,14 +3138,18 @@ class MyStructFieldN29Patch: value = pprint.pformat(self.clear, indent=0) value = padding.join(value.splitlines(True)) L.append(' clear=%s' % (value)) + if self.add is not None: + value = pprint.pformat(self.add, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' add=%s' % (value)) if self.remove is not None: value = pprint.pformat(self.remove, indent=0) value = padding.join(value.splitlines(True)) L.append(' remove=%s' % (value)) - if self.add is not None: - value = pprint.pformat(self.add, indent=0) + if self.put is not None: + value = pprint.pformat(self.put, indent=0) value = padding.join(value.splitlines(True)) - L.append(' add=%s' % (value)) + L.append(' put=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): @@ -3579,8 +3165,9 @@ class MyStructFieldN29Patch: return ( 'assign', 'clear', - 'remove', 'add', + 'remove', + 'put', ) # Override the __hash__ function for Python3 - t10434117 @@ -3590,25 +3177,50 @@ class MyStructFieldN29Patch: import importlib import thrift.python.converter python_types = importlib.import_module("test.fixtures.patch.module.thrift_types") - return thrift.python.converter.to_python_struct(python_types.MyStructFieldN29Patch, self) + return thrift.python.converter.to_python_struct(python_types.MyStructFieldN30Patch, self) def _to_py3(self): import importlib import thrift.py3.converter py3_types = importlib.import_module("test.fixtures.patch.module.types") - return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN29Patch, self) + return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN30Patch, self) def _to_py_deprecated(self): return self -class MyStructFieldN30Patch: +class MyStructFieldPatch: """ Attributes: - - assign: Assigns a value. If set, all other operations are ignored. - - clear: Clears a value. Applies first. - - add: Add the given values, if the keys are not already present. Applies forth. - - remove: Removes entries, if present. Applies third. - - put: Adds or replaces the given key/value pairs. Applies fifth. + - optMapVal + - optSetVal + - optListVal + - optLateStructVal + - optStructVal + - optEnumVal + - optBinaryVal + - optStringVal + - optDoubleVal + - optFloatVal + - optI64Val + - optI32Val + - optI16Val + - optByteVal + - optBoolVal + - timeVal + - durationVal + - lateStructVal + - unionVal + - structVal + - enumVal + - binaryVal + - stringVal + - doubleVal + - floatVal + - i64Val + - i32Val + - i16Val + - byteVal + - boolVal """ thrift_spec = None @@ -3631,75 +3243,184 @@ class MyStructFieldN30Patch: (fname, ftype, fid) = iprot.readFieldBegin() if ftype == TType.STOP: break - if fid == 1: - if ftype == TType.MAP: - self.assign = {} - (_ktype111, _vtype112, _size110 ) = iprot.readMapBegin() - if _size110 >= 0: - for _i114 in range(_size110): - _key115 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - _val116 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.assign[_key115] = _val116 - else: - while iprot.peekMap(): - _key117 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - _val118 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.assign[_key117] = _val118 - iprot.readMapEnd() + if fid == -30: + if ftype == TType.STRUCT: + self.optMapVal = MyStructFieldN30Patch() + self.optMapVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -29: + if ftype == TType.STRUCT: + self.optSetVal = MyStructFieldN29Patch() + self.optSetVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -28: + if ftype == TType.STRUCT: + self.optListVal = MyStructFieldN28Patch() + self.optListVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -27: + if ftype == TType.STRUCT: + self.optLateStructVal = LateDefStructPatch() + self.optLateStructVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -26: + if ftype == TType.STRUCT: + self.optStructVal = MyDataPatch() + self.optStructVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -25: + if ftype == TType.STRUCT: + self.optEnumVal = MyStructFieldN25Patch() + self.optEnumVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -24: + if ftype == TType.STRUCT: + self.optBinaryVal = thrift.lib.thrift.patch.ttypes.BinaryPatch() + self.optBinaryVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -23: + if ftype == TType.STRUCT: + self.optStringVal = thrift.lib.thrift.patch.ttypes.StringPatch() + self.optStringVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -22: + if ftype == TType.STRUCT: + self.optDoubleVal = thrift.lib.thrift.patch.ttypes.DoublePatch() + self.optDoubleVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -21: + if ftype == TType.STRUCT: + self.optFloatVal = thrift.lib.thrift.patch.ttypes.FloatPatch() + self.optFloatVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -20: + if ftype == TType.STRUCT: + self.optI64Val = thrift.lib.thrift.patch.ttypes.I64Patch() + self.optI64Val.read(iprot) + else: + iprot.skip(ftype) + elif fid == -19: + if ftype == TType.STRUCT: + self.optI32Val = thrift.lib.thrift.patch.ttypes.I32Patch() + self.optI32Val.read(iprot) + else: + iprot.skip(ftype) + elif fid == -18: + if ftype == TType.STRUCT: + self.optI16Val = thrift.lib.thrift.patch.ttypes.I16Patch() + self.optI16Val.read(iprot) + else: + iprot.skip(ftype) + elif fid == -17: + if ftype == TType.STRUCT: + self.optByteVal = thrift.lib.thrift.patch.ttypes.BytePatch() + self.optByteVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -16: + if ftype == TType.STRUCT: + self.optBoolVal = thrift.lib.thrift.patch.ttypes.BoolPatch() + self.optBoolVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -15: + if ftype == TType.STRUCT: + self.timeVal = thrift.lib.thrift.patch.ttypes.TimePatch() + self.timeVal.read(iprot) else: iprot.skip(ftype) - elif fid == 2: - if ftype == TType.BOOL: - self.clear = iprot.readBool() + elif fid == -14: + if ftype == TType.STRUCT: + self.durationVal = thrift.lib.thrift.patch.ttypes.DurationPatch() + self.durationVal.read(iprot) else: iprot.skip(ftype) - elif fid == 5: - if ftype == TType.MAP: - self.add = {} - (_ktype120, _vtype121, _size119 ) = iprot.readMapBegin() - if _size119 >= 0: - for _i123 in range(_size119): - _key124 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - _val125 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.add[_key124] = _val125 - else: - while iprot.peekMap(): - _key126 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - _val127 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.add[_key126] = _val127 - iprot.readMapEnd() + elif fid == -13: + if ftype == TType.STRUCT: + self.lateStructVal = LateDefStructPatch() + self.lateStructVal.read(iprot) else: iprot.skip(ftype) - elif fid == 7: - if ftype == TType.SET: - self.remove = set() - (_etype131, _size128) = iprot.readSetBegin() - if _size128 >= 0: - for _i132 in range(_size128): - _elem133 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.remove.add(_elem133) - else: - while iprot.peekSet(): - _elem134 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.remove.add(_elem134) - iprot.readSetEnd() + elif fid == -12: + if ftype == TType.STRUCT: + self.unionVal = MyUnionPatch() + self.unionVal.read(iprot) else: iprot.skip(ftype) - elif fid == 9: - if ftype == TType.MAP: - self.put = {} - (_ktype136, _vtype137, _size135 ) = iprot.readMapBegin() - if _size135 >= 0: - for _i139 in range(_size135): - _key140 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - _val141 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.put[_key140] = _val141 - else: - while iprot.peekMap(): - _key142 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - _val143 = iprot.readString().decode('utf-8') if UTF8STRINGS else iprot.readString() - self.put[_key142] = _val143 - iprot.readMapEnd() + elif fid == -11: + if ftype == TType.STRUCT: + self.structVal = MyDataPatch() + self.structVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -10: + if ftype == TType.STRUCT: + self.enumVal = MyStructFieldN10Patch() + self.enumVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -9: + if ftype == TType.STRUCT: + self.binaryVal = thrift.lib.thrift.patch.ttypes.BinaryPatch() + self.binaryVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -8: + if ftype == TType.STRUCT: + self.stringVal = thrift.lib.thrift.patch.ttypes.StringPatch() + self.stringVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -7: + if ftype == TType.STRUCT: + self.doubleVal = thrift.lib.thrift.patch.ttypes.DoublePatch() + self.doubleVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -6: + if ftype == TType.STRUCT: + self.floatVal = thrift.lib.thrift.patch.ttypes.FloatPatch() + self.floatVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -5: + if ftype == TType.STRUCT: + self.i64Val = thrift.lib.thrift.patch.ttypes.I64Patch() + self.i64Val.read(iprot) + else: + iprot.skip(ftype) + elif fid == -4: + if ftype == TType.STRUCT: + self.i32Val = thrift.lib.thrift.patch.ttypes.I32Patch() + self.i32Val.read(iprot) + else: + iprot.skip(ftype) + elif fid == -3: + if ftype == TType.STRUCT: + self.i16Val = thrift.lib.thrift.patch.ttypes.I16Patch() + self.i16Val.read(iprot) + else: + iprot.skip(ftype) + elif fid == -2: + if ftype == TType.STRUCT: + self.byteVal = thrift.lib.thrift.patch.ttypes.BytePatch() + self.byteVal.read(iprot) + else: + iprot.skip(ftype) + elif fid == -1: + if ftype == TType.STRUCT: + self.boolVal = thrift.lib.thrift.patch.ttypes.BoolPatch() + self.boolVal.read(iprot) else: iprot.skip(ftype) else: @@ -3714,41 +3435,126 @@ class MyStructFieldN30Patch: if (isinstance(oprot, TCompactProtocol.TCompactProtocolAccelerated) or (isinstance(oprot, THeaderProtocol.THeaderProtocolAccelerate) and oprot.get_protocol_id() == THeaderProtocol.THeaderProtocol.T_COMPACT_PROTOCOL)) and self.thrift_spec is not None and fastproto is not None: oprot.trans.write(fastproto.encode(self, [self.__class__, self.thrift_spec, False], utf8strings=UTF8STRINGS, protoid=2)) return - oprot.writeStructBegin('MyStructFieldN30Patch') - if self.assign != None: - oprot.writeFieldBegin('assign', TType.MAP, 1) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.assign)) - for kiter144,viter145 in self.assign.items(): - oprot.writeString(kiter144.encode('utf-8')) if UTF8STRINGS and not isinstance(kiter144, bytes) else oprot.writeString(kiter144) - oprot.writeString(viter145.encode('utf-8')) if UTF8STRINGS and not isinstance(viter145, bytes) else oprot.writeString(viter145) - oprot.writeMapEnd() + oprot.writeStructBegin('MyStructFieldPatch') + if self.optMapVal != None: + oprot.writeFieldBegin('optMapVal', TType.STRUCT, -30) + self.optMapVal.write(oprot) oprot.writeFieldEnd() - if self.clear != None: - oprot.writeFieldBegin('clear', TType.BOOL, 2) - oprot.writeBool(self.clear) + if self.optSetVal != None: + oprot.writeFieldBegin('optSetVal', TType.STRUCT, -29) + self.optSetVal.write(oprot) oprot.writeFieldEnd() - if self.add != None: - oprot.writeFieldBegin('add', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.add)) - for kiter146,viter147 in self.add.items(): - oprot.writeString(kiter146.encode('utf-8')) if UTF8STRINGS and not isinstance(kiter146, bytes) else oprot.writeString(kiter146) - oprot.writeString(viter147.encode('utf-8')) if UTF8STRINGS and not isinstance(viter147, bytes) else oprot.writeString(viter147) - oprot.writeMapEnd() + if self.optListVal != None: + oprot.writeFieldBegin('optListVal', TType.STRUCT, -28) + self.optListVal.write(oprot) oprot.writeFieldEnd() - if self.remove != None: - oprot.writeFieldBegin('remove', TType.SET, 7) - oprot.writeSetBegin(TType.STRING, len(self.remove)) - for iter148 in self.remove: - oprot.writeString(iter148.encode('utf-8')) if UTF8STRINGS and not isinstance(iter148, bytes) else oprot.writeString(iter148) - oprot.writeSetEnd() + if self.optLateStructVal != None: + oprot.writeFieldBegin('optLateStructVal', TType.STRUCT, -27) + self.optLateStructVal.write(oprot) + oprot.writeFieldEnd() + if self.optStructVal != None: + oprot.writeFieldBegin('optStructVal', TType.STRUCT, -26) + self.optStructVal.write(oprot) + oprot.writeFieldEnd() + if self.optEnumVal != None: + oprot.writeFieldBegin('optEnumVal', TType.STRUCT, -25) + self.optEnumVal.write(oprot) + oprot.writeFieldEnd() + if self.optBinaryVal != None: + oprot.writeFieldBegin('optBinaryVal', TType.STRUCT, -24) + self.optBinaryVal.write(oprot) + oprot.writeFieldEnd() + if self.optStringVal != None: + oprot.writeFieldBegin('optStringVal', TType.STRUCT, -23) + self.optStringVal.write(oprot) + oprot.writeFieldEnd() + if self.optDoubleVal != None: + oprot.writeFieldBegin('optDoubleVal', TType.STRUCT, -22) + self.optDoubleVal.write(oprot) + oprot.writeFieldEnd() + if self.optFloatVal != None: + oprot.writeFieldBegin('optFloatVal', TType.STRUCT, -21) + self.optFloatVal.write(oprot) + oprot.writeFieldEnd() + if self.optI64Val != None: + oprot.writeFieldBegin('optI64Val', TType.STRUCT, -20) + self.optI64Val.write(oprot) + oprot.writeFieldEnd() + if self.optI32Val != None: + oprot.writeFieldBegin('optI32Val', TType.STRUCT, -19) + self.optI32Val.write(oprot) + oprot.writeFieldEnd() + if self.optI16Val != None: + oprot.writeFieldBegin('optI16Val', TType.STRUCT, -18) + self.optI16Val.write(oprot) + oprot.writeFieldEnd() + if self.optByteVal != None: + oprot.writeFieldBegin('optByteVal', TType.STRUCT, -17) + self.optByteVal.write(oprot) + oprot.writeFieldEnd() + if self.optBoolVal != None: + oprot.writeFieldBegin('optBoolVal', TType.STRUCT, -16) + self.optBoolVal.write(oprot) + oprot.writeFieldEnd() + if self.timeVal != None: + oprot.writeFieldBegin('timeVal', TType.STRUCT, -15) + self.timeVal.write(oprot) + oprot.writeFieldEnd() + if self.durationVal != None: + oprot.writeFieldBegin('durationVal', TType.STRUCT, -14) + self.durationVal.write(oprot) + oprot.writeFieldEnd() + if self.lateStructVal != None: + oprot.writeFieldBegin('lateStructVal', TType.STRUCT, -13) + self.lateStructVal.write(oprot) + oprot.writeFieldEnd() + if self.unionVal != None: + oprot.writeFieldBegin('unionVal', TType.STRUCT, -12) + self.unionVal.write(oprot) + oprot.writeFieldEnd() + if self.structVal != None: + oprot.writeFieldBegin('structVal', TType.STRUCT, -11) + self.structVal.write(oprot) + oprot.writeFieldEnd() + if self.enumVal != None: + oprot.writeFieldBegin('enumVal', TType.STRUCT, -10) + self.enumVal.write(oprot) + oprot.writeFieldEnd() + if self.binaryVal != None: + oprot.writeFieldBegin('binaryVal', TType.STRUCT, -9) + self.binaryVal.write(oprot) + oprot.writeFieldEnd() + if self.stringVal != None: + oprot.writeFieldBegin('stringVal', TType.STRUCT, -8) + self.stringVal.write(oprot) + oprot.writeFieldEnd() + if self.doubleVal != None: + oprot.writeFieldBegin('doubleVal', TType.STRUCT, -7) + self.doubleVal.write(oprot) + oprot.writeFieldEnd() + if self.floatVal != None: + oprot.writeFieldBegin('floatVal', TType.STRUCT, -6) + self.floatVal.write(oprot) + oprot.writeFieldEnd() + if self.i64Val != None: + oprot.writeFieldBegin('i64Val', TType.STRUCT, -5) + self.i64Val.write(oprot) + oprot.writeFieldEnd() + if self.i32Val != None: + oprot.writeFieldBegin('i32Val', TType.STRUCT, -4) + self.i32Val.write(oprot) + oprot.writeFieldEnd() + if self.i16Val != None: + oprot.writeFieldBegin('i16Val', TType.STRUCT, -3) + self.i16Val.write(oprot) oprot.writeFieldEnd() - if self.put != None: - oprot.writeFieldBegin('put', TType.MAP, 9) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.put)) - for kiter149,viter150 in self.put.items(): - oprot.writeString(kiter149.encode('utf-8')) if UTF8STRINGS and not isinstance(kiter149, bytes) else oprot.writeString(kiter149) - oprot.writeString(viter150.encode('utf-8')) if UTF8STRINGS and not isinstance(viter150, bytes) else oprot.writeString(viter150) - oprot.writeMapEnd() + if self.byteVal != None: + oprot.writeFieldBegin('byteVal', TType.STRUCT, -2) + self.byteVal.write(oprot) + oprot.writeFieldEnd() + if self.boolVal != None: + oprot.writeFieldBegin('boolVal', TType.STRUCT, -1) + self.boolVal.write(oprot) oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() @@ -3765,51 +3571,220 @@ class MyStructFieldN30Patch: json_obj = json if is_text: json_obj = loads(json) - if 'assign' in json_obj and json_obj['assign'] is not None: - self.assign = dict_cls() - for _tmp_k151, _tmp_v152 in json_obj['assign'].items(): - _tmp_kp153 = _tmp_k151 - self.assign[_tmp_kp153] = _tmp_v152 - if 'clear' in json_obj and json_obj['clear'] is not None: - self.clear = json_obj['clear'] - if 'add' in json_obj and json_obj['add'] is not None: - self.add = dict_cls() - for _tmp_k154, _tmp_v155 in json_obj['add'].items(): - _tmp_kp156 = _tmp_k154 - self.add[_tmp_kp156] = _tmp_v155 - if 'remove' in json_obj and json_obj['remove'] is not None: - self.remove = set_cls() - for _tmp_e157 in json_obj['remove']: - self.remove.add(_tmp_e157) - if 'put' in json_obj and json_obj['put'] is not None: - self.put = dict_cls() - for _tmp_k158, _tmp_v159 in json_obj['put'].items(): - _tmp_kp160 = _tmp_k158 - self.put[_tmp_kp160] = _tmp_v159 + if 'optMapVal' in json_obj and json_obj['optMapVal'] is not None: + self.optMapVal = MyStructFieldN30Patch() + self.optMapVal.readFromJson(json_obj['optMapVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optSetVal' in json_obj and json_obj['optSetVal'] is not None: + self.optSetVal = MyStructFieldN29Patch() + self.optSetVal.readFromJson(json_obj['optSetVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optListVal' in json_obj and json_obj['optListVal'] is not None: + self.optListVal = MyStructFieldN28Patch() + self.optListVal.readFromJson(json_obj['optListVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optLateStructVal' in json_obj and json_obj['optLateStructVal'] is not None: + self.optLateStructVal = LateDefStructPatch() + self.optLateStructVal.readFromJson(json_obj['optLateStructVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optStructVal' in json_obj and json_obj['optStructVal'] is not None: + self.optStructVal = MyDataPatch() + self.optStructVal.readFromJson(json_obj['optStructVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optEnumVal' in json_obj and json_obj['optEnumVal'] is not None: + self.optEnumVal = MyStructFieldN25Patch() + self.optEnumVal.readFromJson(json_obj['optEnumVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optBinaryVal' in json_obj and json_obj['optBinaryVal'] is not None: + self.optBinaryVal = thrift.lib.thrift.patch.ttypes.BinaryPatch() + self.optBinaryVal.readFromJson(json_obj['optBinaryVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optStringVal' in json_obj and json_obj['optStringVal'] is not None: + self.optStringVal = thrift.lib.thrift.patch.ttypes.StringPatch() + self.optStringVal.readFromJson(json_obj['optStringVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optDoubleVal' in json_obj and json_obj['optDoubleVal'] is not None: + self.optDoubleVal = thrift.lib.thrift.patch.ttypes.DoublePatch() + self.optDoubleVal.readFromJson(json_obj['optDoubleVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optFloatVal' in json_obj and json_obj['optFloatVal'] is not None: + self.optFloatVal = thrift.lib.thrift.patch.ttypes.FloatPatch() + self.optFloatVal.readFromJson(json_obj['optFloatVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optI64Val' in json_obj and json_obj['optI64Val'] is not None: + self.optI64Val = thrift.lib.thrift.patch.ttypes.I64Patch() + self.optI64Val.readFromJson(json_obj['optI64Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optI32Val' in json_obj and json_obj['optI32Val'] is not None: + self.optI32Val = thrift.lib.thrift.patch.ttypes.I32Patch() + self.optI32Val.readFromJson(json_obj['optI32Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optI16Val' in json_obj and json_obj['optI16Val'] is not None: + self.optI16Val = thrift.lib.thrift.patch.ttypes.I16Patch() + self.optI16Val.readFromJson(json_obj['optI16Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optByteVal' in json_obj and json_obj['optByteVal'] is not None: + self.optByteVal = thrift.lib.thrift.patch.ttypes.BytePatch() + self.optByteVal.readFromJson(json_obj['optByteVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'optBoolVal' in json_obj and json_obj['optBoolVal'] is not None: + self.optBoolVal = thrift.lib.thrift.patch.ttypes.BoolPatch() + self.optBoolVal.readFromJson(json_obj['optBoolVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'timeVal' in json_obj and json_obj['timeVal'] is not None: + self.timeVal = thrift.lib.thrift.patch.ttypes.TimePatch() + self.timeVal.readFromJson(json_obj['timeVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'durationVal' in json_obj and json_obj['durationVal'] is not None: + self.durationVal = thrift.lib.thrift.patch.ttypes.DurationPatch() + self.durationVal.readFromJson(json_obj['durationVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'lateStructVal' in json_obj and json_obj['lateStructVal'] is not None: + self.lateStructVal = LateDefStructPatch() + self.lateStructVal.readFromJson(json_obj['lateStructVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'unionVal' in json_obj and json_obj['unionVal'] is not None: + self.unionVal = MyUnionPatch() + self.unionVal.readFromJson(json_obj['unionVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'structVal' in json_obj and json_obj['structVal'] is not None: + self.structVal = MyDataPatch() + self.structVal.readFromJson(json_obj['structVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'enumVal' in json_obj and json_obj['enumVal'] is not None: + self.enumVal = MyStructFieldN10Patch() + self.enumVal.readFromJson(json_obj['enumVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'binaryVal' in json_obj and json_obj['binaryVal'] is not None: + self.binaryVal = thrift.lib.thrift.patch.ttypes.BinaryPatch() + self.binaryVal.readFromJson(json_obj['binaryVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'stringVal' in json_obj and json_obj['stringVal'] is not None: + self.stringVal = thrift.lib.thrift.patch.ttypes.StringPatch() + self.stringVal.readFromJson(json_obj['stringVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'doubleVal' in json_obj and json_obj['doubleVal'] is not None: + self.doubleVal = thrift.lib.thrift.patch.ttypes.DoublePatch() + self.doubleVal.readFromJson(json_obj['doubleVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'floatVal' in json_obj and json_obj['floatVal'] is not None: + self.floatVal = thrift.lib.thrift.patch.ttypes.FloatPatch() + self.floatVal.readFromJson(json_obj['floatVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'i64Val' in json_obj and json_obj['i64Val'] is not None: + self.i64Val = thrift.lib.thrift.patch.ttypes.I64Patch() + self.i64Val.readFromJson(json_obj['i64Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'i32Val' in json_obj and json_obj['i32Val'] is not None: + self.i32Val = thrift.lib.thrift.patch.ttypes.I32Patch() + self.i32Val.readFromJson(json_obj['i32Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'i16Val' in json_obj and json_obj['i16Val'] is not None: + self.i16Val = thrift.lib.thrift.patch.ttypes.I16Patch() + self.i16Val.readFromJson(json_obj['i16Val'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'byteVal' in json_obj and json_obj['byteVal'] is not None: + self.byteVal = thrift.lib.thrift.patch.ttypes.BytePatch() + self.byteVal.readFromJson(json_obj['byteVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) + if 'boolVal' in json_obj and json_obj['boolVal'] is not None: + self.boolVal = thrift.lib.thrift.patch.ttypes.BoolPatch() + self.boolVal.readFromJson(json_obj['boolVal'], is_text=False, relax_enum_validation=relax_enum_validation, custom_set_cls=set_cls, custom_dict_cls=dict_cls) def __repr__(self): L = [] padding = ' ' * 4 - if self.assign is not None: - value = pprint.pformat(self.assign, indent=0) + if self.optMapVal is not None: + value = pprint.pformat(self.optMapVal, indent=0) value = padding.join(value.splitlines(True)) - L.append(' assign=%s' % (value)) - if self.clear is not None: - value = pprint.pformat(self.clear, indent=0) + L.append(' optMapVal=%s' % (value)) + if self.optSetVal is not None: + value = pprint.pformat(self.optSetVal, indent=0) value = padding.join(value.splitlines(True)) - L.append(' clear=%s' % (value)) - if self.add is not None: - value = pprint.pformat(self.add, indent=0) + L.append(' optSetVal=%s' % (value)) + if self.optListVal is not None: + value = pprint.pformat(self.optListVal, indent=0) value = padding.join(value.splitlines(True)) - L.append(' add=%s' % (value)) - if self.remove is not None: - value = pprint.pformat(self.remove, indent=0) + L.append(' optListVal=%s' % (value)) + if self.optLateStructVal is not None: + value = pprint.pformat(self.optLateStructVal, indent=0) value = padding.join(value.splitlines(True)) - L.append(' remove=%s' % (value)) - if self.put is not None: - value = pprint.pformat(self.put, indent=0) + L.append(' optLateStructVal=%s' % (value)) + if self.optStructVal is not None: + value = pprint.pformat(self.optStructVal, indent=0) value = padding.join(value.splitlines(True)) - L.append(' put=%s' % (value)) + L.append(' optStructVal=%s' % (value)) + if self.optEnumVal is not None: + value = pprint.pformat(self.optEnumVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optEnumVal=%s' % (value)) + if self.optBinaryVal is not None: + value = pprint.pformat(self.optBinaryVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optBinaryVal=%s' % (value)) + if self.optStringVal is not None: + value = pprint.pformat(self.optStringVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optStringVal=%s' % (value)) + if self.optDoubleVal is not None: + value = pprint.pformat(self.optDoubleVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optDoubleVal=%s' % (value)) + if self.optFloatVal is not None: + value = pprint.pformat(self.optFloatVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optFloatVal=%s' % (value)) + if self.optI64Val is not None: + value = pprint.pformat(self.optI64Val, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optI64Val=%s' % (value)) + if self.optI32Val is not None: + value = pprint.pformat(self.optI32Val, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optI32Val=%s' % (value)) + if self.optI16Val is not None: + value = pprint.pformat(self.optI16Val, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optI16Val=%s' % (value)) + if self.optByteVal is not None: + value = pprint.pformat(self.optByteVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optByteVal=%s' % (value)) + if self.optBoolVal is not None: + value = pprint.pformat(self.optBoolVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' optBoolVal=%s' % (value)) + if self.timeVal is not None: + value = pprint.pformat(self.timeVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' timeVal=%s' % (value)) + if self.durationVal is not None: + value = pprint.pformat(self.durationVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' durationVal=%s' % (value)) + if self.lateStructVal is not None: + value = pprint.pformat(self.lateStructVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' lateStructVal=%s' % (value)) + if self.unionVal is not None: + value = pprint.pformat(self.unionVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' unionVal=%s' % (value)) + if self.structVal is not None: + value = pprint.pformat(self.structVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' structVal=%s' % (value)) + if self.enumVal is not None: + value = pprint.pformat(self.enumVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' enumVal=%s' % (value)) + if self.binaryVal is not None: + value = pprint.pformat(self.binaryVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' binaryVal=%s' % (value)) + if self.stringVal is not None: + value = pprint.pformat(self.stringVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' stringVal=%s' % (value)) + if self.doubleVal is not None: + value = pprint.pformat(self.doubleVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' doubleVal=%s' % (value)) + if self.floatVal is not None: + value = pprint.pformat(self.floatVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' floatVal=%s' % (value)) + if self.i64Val is not None: + value = pprint.pformat(self.i64Val, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' i64Val=%s' % (value)) + if self.i32Val is not None: + value = pprint.pformat(self.i32Val, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' i32Val=%s' % (value)) + if self.i16Val is not None: + value = pprint.pformat(self.i16Val, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' i16Val=%s' % (value)) + if self.byteVal is not None: + value = pprint.pformat(self.byteVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' byteVal=%s' % (value)) + if self.boolVal is not None: + value = pprint.pformat(self.boolVal, indent=0) + value = padding.join(value.splitlines(True)) + L.append(' boolVal=%s' % (value)) return "%s(%s)" % (self.__class__.__name__, "\n" + ",\n".join(L) if L else '') def __eq__(self, other): @@ -3823,11 +3798,36 @@ class MyStructFieldN30Patch: def __dir__(self): return ( - 'assign', - 'clear', - 'add', - 'remove', - 'put', + 'optMapVal', + 'optSetVal', + 'optListVal', + 'optLateStructVal', + 'optStructVal', + 'optEnumVal', + 'optBinaryVal', + 'optStringVal', + 'optDoubleVal', + 'optFloatVal', + 'optI64Val', + 'optI32Val', + 'optI16Val', + 'optByteVal', + 'optBoolVal', + 'timeVal', + 'durationVal', + 'lateStructVal', + 'unionVal', + 'structVal', + 'enumVal', + 'binaryVal', + 'stringVal', + 'doubleVal', + 'floatVal', + 'i64Val', + 'i32Val', + 'i16Val', + 'byteVal', + 'boolVal', ) # Override the __hash__ function for Python3 - t10434117 @@ -3837,13 +3837,13 @@ class MyStructFieldN30Patch: import importlib import thrift.python.converter python_types = importlib.import_module("test.fixtures.patch.module.thrift_types") - return thrift.python.converter.to_python_struct(python_types.MyStructFieldN30Patch, self) + return thrift.python.converter.to_python_struct(python_types.MyStructFieldPatch, self) def _to_py3(self): import importlib import thrift.py3.converter py3_types = importlib.import_module("test.fixtures.patch.module.types") - return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN30Patch, self) + return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldPatch, self) def _to_py_deprecated(self): return self @@ -4691,115 +4691,6 @@ def MyUnionPatch__setstate__(self, state): MyUnionPatch.__getstate__ = lambda self: self.__dict__.copy() MyUnionPatch.__setstate__ = MyUnionPatch__setstate__ -all_structs.append(MyStructFieldPatch) -MyStructFieldPatch.thrift_spec = ( - (-30, TType.STRUCT, 'optMapVal', [MyStructFieldN30Patch, MyStructFieldN30Patch.thrift_spec, False], None, 2, ), # -30 - (-29, TType.STRUCT, 'optSetVal', [MyStructFieldN29Patch, MyStructFieldN29Patch.thrift_spec, False], None, 2, ), # -29 - (-28, TType.STRUCT, 'optListVal', [MyStructFieldN28Patch, MyStructFieldN28Patch.thrift_spec, False], None, 2, ), # -28 - (-27, TType.STRUCT, 'optLateStructVal', [LateDefStructPatch, LateDefStructPatch.thrift_spec, False], None, 2, ), # -27 - (-26, TType.STRUCT, 'optStructVal', [MyDataPatch, MyDataPatch.thrift_spec, False], None, 2, ), # -26 - (-25, TType.STRUCT, 'optEnumVal', [MyStructFieldN25Patch, MyStructFieldN25Patch.thrift_spec, False], None, 2, ), # -25 - (-24, TType.STRUCT, 'optBinaryVal', [thrift.lib.thrift.patch.ttypes.BinaryPatch, thrift.lib.thrift.patch.ttypes.BinaryPatch.thrift_spec, False], None, 2, ), # -24 - (-23, TType.STRUCT, 'optStringVal', [thrift.lib.thrift.patch.ttypes.StringPatch, thrift.lib.thrift.patch.ttypes.StringPatch.thrift_spec, False], None, 2, ), # -23 - (-22, TType.STRUCT, 'optDoubleVal', [thrift.lib.thrift.patch.ttypes.DoublePatch, thrift.lib.thrift.patch.ttypes.DoublePatch.thrift_spec, False], None, 2, ), # -22 - (-21, TType.STRUCT, 'optFloatVal', [thrift.lib.thrift.patch.ttypes.FloatPatch, thrift.lib.thrift.patch.ttypes.FloatPatch.thrift_spec, False], None, 2, ), # -21 - (-20, TType.STRUCT, 'optI64Val', [thrift.lib.thrift.patch.ttypes.I64Patch, thrift.lib.thrift.patch.ttypes.I64Patch.thrift_spec, False], None, 2, ), # -20 - (-19, TType.STRUCT, 'optI32Val', [thrift.lib.thrift.patch.ttypes.I32Patch, thrift.lib.thrift.patch.ttypes.I32Patch.thrift_spec, False], None, 2, ), # -19 - (-18, TType.STRUCT, 'optI16Val', [thrift.lib.thrift.patch.ttypes.I16Patch, thrift.lib.thrift.patch.ttypes.I16Patch.thrift_spec, False], None, 2, ), # -18 - (-17, TType.STRUCT, 'optByteVal', [thrift.lib.thrift.patch.ttypes.BytePatch, thrift.lib.thrift.patch.ttypes.BytePatch.thrift_spec, False], None, 2, ), # -17 - (-16, TType.STRUCT, 'optBoolVal', [thrift.lib.thrift.patch.ttypes.BoolPatch, thrift.lib.thrift.patch.ttypes.BoolPatch.thrift_spec, False], None, 2, ), # -16 - (-15, TType.STRUCT, 'timeVal', [thrift.lib.thrift.patch.ttypes.TimePatch, thrift.lib.thrift.patch.ttypes.TimePatch.thrift_spec, False], None, 2, ), # -15 - (-14, TType.STRUCT, 'durationVal', [thrift.lib.thrift.patch.ttypes.DurationPatch, thrift.lib.thrift.patch.ttypes.DurationPatch.thrift_spec, False], None, 2, ), # -14 - (-13, TType.STRUCT, 'lateStructVal', [LateDefStructPatch, LateDefStructPatch.thrift_spec, False], None, 2, ), # -13 - (-12, TType.STRUCT, 'unionVal', [MyUnionPatch, MyUnionPatch.thrift_spec, False], None, 2, ), # -12 - (-11, TType.STRUCT, 'structVal', [MyDataPatch, MyDataPatch.thrift_spec, False], None, 2, ), # -11 - (-10, TType.STRUCT, 'enumVal', [MyStructFieldN10Patch, MyStructFieldN10Patch.thrift_spec, False], None, 2, ), # -10 - (-9, TType.STRUCT, 'binaryVal', [thrift.lib.thrift.patch.ttypes.BinaryPatch, thrift.lib.thrift.patch.ttypes.BinaryPatch.thrift_spec, False], None, 2, ), # -9 - (-8, TType.STRUCT, 'stringVal', [thrift.lib.thrift.patch.ttypes.StringPatch, thrift.lib.thrift.patch.ttypes.StringPatch.thrift_spec, False], None, 2, ), # -8 - (-7, TType.STRUCT, 'doubleVal', [thrift.lib.thrift.patch.ttypes.DoublePatch, thrift.lib.thrift.patch.ttypes.DoublePatch.thrift_spec, False], None, 2, ), # -7 - (-6, TType.STRUCT, 'floatVal', [thrift.lib.thrift.patch.ttypes.FloatPatch, thrift.lib.thrift.patch.ttypes.FloatPatch.thrift_spec, False], None, 2, ), # -6 - (-5, TType.STRUCT, 'i64Val', [thrift.lib.thrift.patch.ttypes.I64Patch, thrift.lib.thrift.patch.ttypes.I64Patch.thrift_spec, False], None, 2, ), # -5 - (-4, TType.STRUCT, 'i32Val', [thrift.lib.thrift.patch.ttypes.I32Patch, thrift.lib.thrift.patch.ttypes.I32Patch.thrift_spec, False], None, 2, ), # -4 - (-3, TType.STRUCT, 'i16Val', [thrift.lib.thrift.patch.ttypes.I16Patch, thrift.lib.thrift.patch.ttypes.I16Patch.thrift_spec, False], None, 2, ), # -3 - (-2, TType.STRUCT, 'byteVal', [thrift.lib.thrift.patch.ttypes.BytePatch, thrift.lib.thrift.patch.ttypes.BytePatch.thrift_spec, False], None, 2, ), # -2 - (-1, TType.STRUCT, 'boolVal', [thrift.lib.thrift.patch.ttypes.BoolPatch, thrift.lib.thrift.patch.ttypes.BoolPatch.thrift_spec, False], None, 2, ), # -1 -) - -MyStructFieldPatch.thrift_struct_annotations = { -} -MyStructFieldPatch.thrift_field_annotations = { -} - -def MyStructFieldPatch__init__(self, boolVal=None, byteVal=None, i16Val=None, i32Val=None, i64Val=None, floatVal=None, doubleVal=None, stringVal=None, binaryVal=None, enumVal=None, structVal=None, unionVal=None, lateStructVal=None, durationVal=None, timeVal=None, optBoolVal=None, optByteVal=None, optI16Val=None, optI32Val=None, optI64Val=None, optFloatVal=None, optDoubleVal=None, optStringVal=None, optBinaryVal=None, optEnumVal=None, optStructVal=None, optLateStructVal=None, optListVal=None, optSetVal=None, optMapVal=None,): - self.boolVal = boolVal - self.byteVal = byteVal - self.i16Val = i16Val - self.i32Val = i32Val - self.i64Val = i64Val - self.floatVal = floatVal - self.doubleVal = doubleVal - self.stringVal = stringVal - self.binaryVal = binaryVal - self.enumVal = enumVal - self.structVal = structVal - self.unionVal = unionVal - self.lateStructVal = lateStructVal - self.durationVal = durationVal - self.timeVal = timeVal - self.optBoolVal = optBoolVal - self.optByteVal = optByteVal - self.optI16Val = optI16Val - self.optI32Val = optI32Val - self.optI64Val = optI64Val - self.optFloatVal = optFloatVal - self.optDoubleVal = optDoubleVal - self.optStringVal = optStringVal - self.optBinaryVal = optBinaryVal - self.optEnumVal = optEnumVal - self.optStructVal = optStructVal - self.optLateStructVal = optLateStructVal - self.optListVal = optListVal - self.optSetVal = optSetVal - self.optMapVal = optMapVal - -MyStructFieldPatch.__init__ = MyStructFieldPatch__init__ - -def MyStructFieldPatch__setstate__(self, state): - state.setdefault('boolVal', None) - state.setdefault('byteVal', None) - state.setdefault('i16Val', None) - state.setdefault('i32Val', None) - state.setdefault('i64Val', None) - state.setdefault('floatVal', None) - state.setdefault('doubleVal', None) - state.setdefault('stringVal', None) - state.setdefault('binaryVal', None) - state.setdefault('enumVal', None) - state.setdefault('structVal', None) - state.setdefault('unionVal', None) - state.setdefault('lateStructVal', None) - state.setdefault('durationVal', None) - state.setdefault('timeVal', None) - state.setdefault('optBoolVal', None) - state.setdefault('optByteVal', None) - state.setdefault('optI16Val', None) - state.setdefault('optI32Val', None) - state.setdefault('optI64Val', None) - state.setdefault('optFloatVal', None) - state.setdefault('optDoubleVal', None) - state.setdefault('optStringVal', None) - state.setdefault('optBinaryVal', None) - state.setdefault('optEnumVal', None) - state.setdefault('optStructVal', None) - state.setdefault('optLateStructVal', None) - state.setdefault('optListVal', None) - state.setdefault('optSetVal', None) - state.setdefault('optMapVal', None) - self.__dict__ = state - -MyStructFieldPatch.__getstate__ = lambda self: self.__dict__.copy() -MyStructFieldPatch.__setstate__ = MyStructFieldPatch__setstate__ - all_structs.append(MyStructFieldN10Patch) MyStructFieldN10Patch.thrift_spec = ( None, # 0 @@ -4968,6 +4859,115 @@ def MyStructFieldN30Patch__setstate__(self, state): MyStructFieldN30Patch.__getstate__ = lambda self: self.__dict__.copy() MyStructFieldN30Patch.__setstate__ = MyStructFieldN30Patch__setstate__ +all_structs.append(MyStructFieldPatch) +MyStructFieldPatch.thrift_spec = ( + (-30, TType.STRUCT, 'optMapVal', [MyStructFieldN30Patch, MyStructFieldN30Patch.thrift_spec, False], None, 2, ), # -30 + (-29, TType.STRUCT, 'optSetVal', [MyStructFieldN29Patch, MyStructFieldN29Patch.thrift_spec, False], None, 2, ), # -29 + (-28, TType.STRUCT, 'optListVal', [MyStructFieldN28Patch, MyStructFieldN28Patch.thrift_spec, False], None, 2, ), # -28 + (-27, TType.STRUCT, 'optLateStructVal', [LateDefStructPatch, LateDefStructPatch.thrift_spec, False], None, 2, ), # -27 + (-26, TType.STRUCT, 'optStructVal', [MyDataPatch, MyDataPatch.thrift_spec, False], None, 2, ), # -26 + (-25, TType.STRUCT, 'optEnumVal', [MyStructFieldN25Patch, MyStructFieldN25Patch.thrift_spec, False], None, 2, ), # -25 + (-24, TType.STRUCT, 'optBinaryVal', [thrift.lib.thrift.patch.ttypes.BinaryPatch, thrift.lib.thrift.patch.ttypes.BinaryPatch.thrift_spec, False], None, 2, ), # -24 + (-23, TType.STRUCT, 'optStringVal', [thrift.lib.thrift.patch.ttypes.StringPatch, thrift.lib.thrift.patch.ttypes.StringPatch.thrift_spec, False], None, 2, ), # -23 + (-22, TType.STRUCT, 'optDoubleVal', [thrift.lib.thrift.patch.ttypes.DoublePatch, thrift.lib.thrift.patch.ttypes.DoublePatch.thrift_spec, False], None, 2, ), # -22 + (-21, TType.STRUCT, 'optFloatVal', [thrift.lib.thrift.patch.ttypes.FloatPatch, thrift.lib.thrift.patch.ttypes.FloatPatch.thrift_spec, False], None, 2, ), # -21 + (-20, TType.STRUCT, 'optI64Val', [thrift.lib.thrift.patch.ttypes.I64Patch, thrift.lib.thrift.patch.ttypes.I64Patch.thrift_spec, False], None, 2, ), # -20 + (-19, TType.STRUCT, 'optI32Val', [thrift.lib.thrift.patch.ttypes.I32Patch, thrift.lib.thrift.patch.ttypes.I32Patch.thrift_spec, False], None, 2, ), # -19 + (-18, TType.STRUCT, 'optI16Val', [thrift.lib.thrift.patch.ttypes.I16Patch, thrift.lib.thrift.patch.ttypes.I16Patch.thrift_spec, False], None, 2, ), # -18 + (-17, TType.STRUCT, 'optByteVal', [thrift.lib.thrift.patch.ttypes.BytePatch, thrift.lib.thrift.patch.ttypes.BytePatch.thrift_spec, False], None, 2, ), # -17 + (-16, TType.STRUCT, 'optBoolVal', [thrift.lib.thrift.patch.ttypes.BoolPatch, thrift.lib.thrift.patch.ttypes.BoolPatch.thrift_spec, False], None, 2, ), # -16 + (-15, TType.STRUCT, 'timeVal', [thrift.lib.thrift.patch.ttypes.TimePatch, thrift.lib.thrift.patch.ttypes.TimePatch.thrift_spec, False], None, 2, ), # -15 + (-14, TType.STRUCT, 'durationVal', [thrift.lib.thrift.patch.ttypes.DurationPatch, thrift.lib.thrift.patch.ttypes.DurationPatch.thrift_spec, False], None, 2, ), # -14 + (-13, TType.STRUCT, 'lateStructVal', [LateDefStructPatch, LateDefStructPatch.thrift_spec, False], None, 2, ), # -13 + (-12, TType.STRUCT, 'unionVal', [MyUnionPatch, MyUnionPatch.thrift_spec, False], None, 2, ), # -12 + (-11, TType.STRUCT, 'structVal', [MyDataPatch, MyDataPatch.thrift_spec, False], None, 2, ), # -11 + (-10, TType.STRUCT, 'enumVal', [MyStructFieldN10Patch, MyStructFieldN10Patch.thrift_spec, False], None, 2, ), # -10 + (-9, TType.STRUCT, 'binaryVal', [thrift.lib.thrift.patch.ttypes.BinaryPatch, thrift.lib.thrift.patch.ttypes.BinaryPatch.thrift_spec, False], None, 2, ), # -9 + (-8, TType.STRUCT, 'stringVal', [thrift.lib.thrift.patch.ttypes.StringPatch, thrift.lib.thrift.patch.ttypes.StringPatch.thrift_spec, False], None, 2, ), # -8 + (-7, TType.STRUCT, 'doubleVal', [thrift.lib.thrift.patch.ttypes.DoublePatch, thrift.lib.thrift.patch.ttypes.DoublePatch.thrift_spec, False], None, 2, ), # -7 + (-6, TType.STRUCT, 'floatVal', [thrift.lib.thrift.patch.ttypes.FloatPatch, thrift.lib.thrift.patch.ttypes.FloatPatch.thrift_spec, False], None, 2, ), # -6 + (-5, TType.STRUCT, 'i64Val', [thrift.lib.thrift.patch.ttypes.I64Patch, thrift.lib.thrift.patch.ttypes.I64Patch.thrift_spec, False], None, 2, ), # -5 + (-4, TType.STRUCT, 'i32Val', [thrift.lib.thrift.patch.ttypes.I32Patch, thrift.lib.thrift.patch.ttypes.I32Patch.thrift_spec, False], None, 2, ), # -4 + (-3, TType.STRUCT, 'i16Val', [thrift.lib.thrift.patch.ttypes.I16Patch, thrift.lib.thrift.patch.ttypes.I16Patch.thrift_spec, False], None, 2, ), # -3 + (-2, TType.STRUCT, 'byteVal', [thrift.lib.thrift.patch.ttypes.BytePatch, thrift.lib.thrift.patch.ttypes.BytePatch.thrift_spec, False], None, 2, ), # -2 + (-1, TType.STRUCT, 'boolVal', [thrift.lib.thrift.patch.ttypes.BoolPatch, thrift.lib.thrift.patch.ttypes.BoolPatch.thrift_spec, False], None, 2, ), # -1 +) + +MyStructFieldPatch.thrift_struct_annotations = { +} +MyStructFieldPatch.thrift_field_annotations = { +} + +def MyStructFieldPatch__init__(self, optMapVal=None, optSetVal=None, optListVal=None, optLateStructVal=None, optStructVal=None, optEnumVal=None, optBinaryVal=None, optStringVal=None, optDoubleVal=None, optFloatVal=None, optI64Val=None, optI32Val=None, optI16Val=None, optByteVal=None, optBoolVal=None, timeVal=None, durationVal=None, lateStructVal=None, unionVal=None, structVal=None, enumVal=None, binaryVal=None, stringVal=None, doubleVal=None, floatVal=None, i64Val=None, i32Val=None, i16Val=None, byteVal=None, boolVal=None,): + self.optMapVal = optMapVal + self.optSetVal = optSetVal + self.optListVal = optListVal + self.optLateStructVal = optLateStructVal + self.optStructVal = optStructVal + self.optEnumVal = optEnumVal + self.optBinaryVal = optBinaryVal + self.optStringVal = optStringVal + self.optDoubleVal = optDoubleVal + self.optFloatVal = optFloatVal + self.optI64Val = optI64Val + self.optI32Val = optI32Val + self.optI16Val = optI16Val + self.optByteVal = optByteVal + self.optBoolVal = optBoolVal + self.timeVal = timeVal + self.durationVal = durationVal + self.lateStructVal = lateStructVal + self.unionVal = unionVal + self.structVal = structVal + self.enumVal = enumVal + self.binaryVal = binaryVal + self.stringVal = stringVal + self.doubleVal = doubleVal + self.floatVal = floatVal + self.i64Val = i64Val + self.i32Val = i32Val + self.i16Val = i16Val + self.byteVal = byteVal + self.boolVal = boolVal + +MyStructFieldPatch.__init__ = MyStructFieldPatch__init__ + +def MyStructFieldPatch__setstate__(self, state): + state.setdefault('optMapVal', None) + state.setdefault('optSetVal', None) + state.setdefault('optListVal', None) + state.setdefault('optLateStructVal', None) + state.setdefault('optStructVal', None) + state.setdefault('optEnumVal', None) + state.setdefault('optBinaryVal', None) + state.setdefault('optStringVal', None) + state.setdefault('optDoubleVal', None) + state.setdefault('optFloatVal', None) + state.setdefault('optI64Val', None) + state.setdefault('optI32Val', None) + state.setdefault('optI16Val', None) + state.setdefault('optByteVal', None) + state.setdefault('optBoolVal', None) + state.setdefault('timeVal', None) + state.setdefault('durationVal', None) + state.setdefault('lateStructVal', None) + state.setdefault('unionVal', None) + state.setdefault('structVal', None) + state.setdefault('enumVal', None) + state.setdefault('binaryVal', None) + state.setdefault('stringVal', None) + state.setdefault('doubleVal', None) + state.setdefault('floatVal', None) + state.setdefault('i64Val', None) + state.setdefault('i32Val', None) + state.setdefault('i16Val', None) + state.setdefault('byteVal', None) + state.setdefault('boolVal', None) + self.__dict__ = state + +MyStructFieldPatch.__getstate__ = lambda self: self.__dict__.copy() +MyStructFieldPatch.__setstate__ = MyStructFieldPatch__setstate__ + all_structs.append(MyStructPatch) MyStructPatch.thrift_spec = ( None, # 0 diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_metadata.py b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_metadata.py index e03431576fe..43afb1b5655 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_metadata.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_metadata.py @@ -428,118 +428,6 @@ def gen_metadata_struct_MyUnionPatch() -> _fbthrift_metadata.ThriftMetadata: # TODO (ffrancet): This general pattern can be optimized by using tuples and dicts # instead of re-generating thrift structs -def _fbthrift_gen_metadata_struct_MyStructFieldPatch(metadata_struct: _fbthrift_metadata.ThriftMetadata) -> _fbthrift_metadata.ThriftMetadata: - qualified_name = "module.MyStructFieldPatch" - - if qualified_name in metadata_struct.structs: - return metadata_struct - fields = [ - _fbthrift_metadata.ThriftField(id=-30, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN30Patch")), name="optMapVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-29, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN29Patch")), name="optSetVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-28, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN28Patch")), name="optListVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-27, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.LateDefStructPatch")), name="optLateStructVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-26, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyDataPatch")), name="optStructVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-25, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN25Patch")), name="optEnumVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-24, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BinaryPatch")), name="optBinaryVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-23, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.StringPatch")), name="optStringVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-22, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.DoublePatch")), name="optDoubleVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-21, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.FloatPatch")), name="optFloatVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-20, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I64Patch")), name="optI64Val", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-19, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I32Patch")), name="optI32Val", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-18, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I16Patch")), name="optI16Val", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-17, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BytePatch")), name="optByteVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-16, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BoolPatch")), name="optBoolVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-15, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.TimePatch")), name="timeVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-14, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.DurationPatch")), name="durationVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-13, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.LateDefStructPatch")), name="lateStructVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-12, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyUnionPatch")), name="unionVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-11, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyDataPatch")), name="structVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-10, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN10Patch")), name="enumVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-9, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BinaryPatch")), name="binaryVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-8, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.StringPatch")), name="stringVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-7, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.DoublePatch")), name="doubleVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-6, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.FloatPatch")), name="floatVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-5, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I64Patch")), name="i64Val", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-4, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I32Patch")), name="i32Val", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-3, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I16Patch")), name="i16Val", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-2, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BytePatch")), name="byteVal", is_optional=False, structured_annotations=[ - ]), - _fbthrift_metadata.ThriftField(id=-1, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BoolPatch")), name="boolVal", is_optional=False, structured_annotations=[ - ]), - ] - struct_dict = dict(metadata_struct.structs) - struct_dict[qualified_name] = _fbthrift_metadata.ThriftStruct(name=qualified_name, fields=fields, - is_union=False, - structured_annotations=[ - _fbthrift_metadata.ThriftConstStruct(type=_fbthrift_metadata.ThriftStructType(name="cpp.Adapter"), fields= { "name": _fbthrift_metadata.ThriftConstValue(cv_string="::apache::thrift::op::detail::FieldPatchAdapter"), "underlyingName": _fbthrift_metadata.ThriftConstValue(cv_string="MyStructFieldPatchStruct"), "extraNamespace": _fbthrift_metadata.ThriftConstValue(cv_string=""), }), - ]) - new_struct = metadata_struct(structs=struct_dict) - - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BoolPatch(new_struct) # boolVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BytePatch(new_struct) # byteVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I16Patch(new_struct) # i16Val - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I32Patch(new_struct) # i32Val - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I64Patch(new_struct) # i64Val - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_FloatPatch(new_struct) # floatVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_DoublePatch(new_struct) # doubleVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_StringPatch(new_struct) # stringVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BinaryPatch(new_struct) # binaryVal - new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN10Patch(new_struct) # enumVal - new_struct = _fbthrift_gen_metadata_struct_MyDataPatch(new_struct) # structVal - new_struct = _fbthrift_gen_metadata_struct_MyUnionPatch(new_struct) # unionVal - new_struct = _fbthrift_gen_metadata_struct_LateDefStructPatch(new_struct) # lateStructVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_DurationPatch(new_struct) # durationVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_TimePatch(new_struct) # timeVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BoolPatch(new_struct) # optBoolVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BytePatch(new_struct) # optByteVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I16Patch(new_struct) # optI16Val - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I32Patch(new_struct) # optI32Val - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I64Patch(new_struct) # optI64Val - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_FloatPatch(new_struct) # optFloatVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_DoublePatch(new_struct) # optDoubleVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_StringPatch(new_struct) # optStringVal - new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BinaryPatch(new_struct) # optBinaryVal - new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN25Patch(new_struct) # optEnumVal - new_struct = _fbthrift_gen_metadata_struct_MyDataPatch(new_struct) # optStructVal - new_struct = _fbthrift_gen_metadata_struct_LateDefStructPatch(new_struct) # optLateStructVal - new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN28Patch(new_struct) # optListVal - new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN29Patch(new_struct) # optSetVal - new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN30Patch(new_struct) # optMapVal - - return new_struct -def gen_metadata_struct_MyStructFieldPatch() -> _fbthrift_metadata.ThriftMetadata: - return _fbthrift_gen_metadata_struct_MyStructFieldPatch(_fbthrift_metadata.ThriftMetadata(structs={}, enums={}, exceptions={}, services={})) - -# TODO (ffrancet): This general pattern can be optimized by using tuples and dicts -# instead of re-generating thrift structs def _fbthrift_gen_metadata_struct_MyStructFieldN10Patch(metadata_struct: _fbthrift_metadata.ThriftMetadata) -> _fbthrift_metadata.ThriftMetadata: qualified_name = "module.MyStructFieldN10Patch" @@ -711,6 +599,118 @@ def gen_metadata_struct_MyStructFieldN30Patch() -> _fbthrift_metadata.ThriftMeta # TODO (ffrancet): This general pattern can be optimized by using tuples and dicts # instead of re-generating thrift structs +def _fbthrift_gen_metadata_struct_MyStructFieldPatch(metadata_struct: _fbthrift_metadata.ThriftMetadata) -> _fbthrift_metadata.ThriftMetadata: + qualified_name = "module.MyStructFieldPatch" + + if qualified_name in metadata_struct.structs: + return metadata_struct + fields = [ + _fbthrift_metadata.ThriftField(id=-30, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN30Patch")), name="optMapVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-29, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN29Patch")), name="optSetVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-28, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN28Patch")), name="optListVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-27, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.LateDefStructPatch")), name="optLateStructVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-26, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyDataPatch")), name="optStructVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-25, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN25Patch")), name="optEnumVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-24, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BinaryPatch")), name="optBinaryVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-23, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.StringPatch")), name="optStringVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-22, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.DoublePatch")), name="optDoubleVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-21, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.FloatPatch")), name="optFloatVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-20, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I64Patch")), name="optI64Val", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-19, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I32Patch")), name="optI32Val", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-18, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I16Patch")), name="optI16Val", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-17, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BytePatch")), name="optByteVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-16, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BoolPatch")), name="optBoolVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-15, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.TimePatch")), name="timeVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-14, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.DurationPatch")), name="durationVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-13, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.LateDefStructPatch")), name="lateStructVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-12, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyUnionPatch")), name="unionVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-11, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyDataPatch")), name="structVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-10, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.MyStructFieldN10Patch")), name="enumVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-9, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BinaryPatch")), name="binaryVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-8, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.StringPatch")), name="stringVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-7, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.DoublePatch")), name="doubleVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-6, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.FloatPatch")), name="floatVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-5, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I64Patch")), name="i64Val", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-4, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I32Patch")), name="i32Val", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-3, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.I16Patch")), name="i16Val", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-2, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BytePatch")), name="byteVal", is_optional=False, structured_annotations=[ + ]), + _fbthrift_metadata.ThriftField(id=-1, type=_fbthrift_metadata.ThriftType(t_struct=_fbthrift_metadata.ThriftStructType(name="module.BoolPatch")), name="boolVal", is_optional=False, structured_annotations=[ + ]), + ] + struct_dict = dict(metadata_struct.structs) + struct_dict[qualified_name] = _fbthrift_metadata.ThriftStruct(name=qualified_name, fields=fields, + is_union=False, + structured_annotations=[ + _fbthrift_metadata.ThriftConstStruct(type=_fbthrift_metadata.ThriftStructType(name="cpp.Adapter"), fields= { "name": _fbthrift_metadata.ThriftConstValue(cv_string="::apache::thrift::op::detail::FieldPatchAdapter"), "underlyingName": _fbthrift_metadata.ThriftConstValue(cv_string="MyStructFieldPatchStruct"), "extraNamespace": _fbthrift_metadata.ThriftConstValue(cv_string=""), }), + ]) + new_struct = metadata_struct(structs=struct_dict) + + new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN30Patch(new_struct) # optMapVal + new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN29Patch(new_struct) # optSetVal + new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN28Patch(new_struct) # optListVal + new_struct = _fbthrift_gen_metadata_struct_LateDefStructPatch(new_struct) # optLateStructVal + new_struct = _fbthrift_gen_metadata_struct_MyDataPatch(new_struct) # optStructVal + new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN25Patch(new_struct) # optEnumVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BinaryPatch(new_struct) # optBinaryVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_StringPatch(new_struct) # optStringVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_DoublePatch(new_struct) # optDoubleVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_FloatPatch(new_struct) # optFloatVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I64Patch(new_struct) # optI64Val + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I32Patch(new_struct) # optI32Val + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I16Patch(new_struct) # optI16Val + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BytePatch(new_struct) # optByteVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BoolPatch(new_struct) # optBoolVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_TimePatch(new_struct) # timeVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_DurationPatch(new_struct) # durationVal + new_struct = _fbthrift_gen_metadata_struct_LateDefStructPatch(new_struct) # lateStructVal + new_struct = _fbthrift_gen_metadata_struct_MyUnionPatch(new_struct) # unionVal + new_struct = _fbthrift_gen_metadata_struct_MyDataPatch(new_struct) # structVal + new_struct = _fbthrift_gen_metadata_struct_MyStructFieldN10Patch(new_struct) # enumVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BinaryPatch(new_struct) # binaryVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_StringPatch(new_struct) # stringVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_DoublePatch(new_struct) # doubleVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_FloatPatch(new_struct) # floatVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I64Patch(new_struct) # i64Val + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I32Patch(new_struct) # i32Val + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_I16Patch(new_struct) # i16Val + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BytePatch(new_struct) # byteVal + new_struct = apache.thrift.op.patch.thrift_metadata._fbthrift_gen_metadata_struct_BoolPatch(new_struct) # boolVal + + return new_struct +def gen_metadata_struct_MyStructFieldPatch() -> _fbthrift_metadata.ThriftMetadata: + return _fbthrift_gen_metadata_struct_MyStructFieldPatch(_fbthrift_metadata.ThriftMetadata(structs={}, enums={}, exceptions={}, services={})) + +# TODO (ffrancet): This general pattern can be optimized by using tuples and dicts +# instead of re-generating thrift structs def _fbthrift_gen_metadata_struct_MyStructPatch(metadata_struct: _fbthrift_metadata.ThriftMetadata) -> _fbthrift_metadata.ThriftMetadata: qualified_name = "module.MyStructPatch" @@ -838,12 +838,12 @@ def getThriftModuleMetadata() -> _fbthrift_metadata.ThriftMetadata: meta = _fbthrift_gen_metadata_struct_InnerUnionPatch(meta) meta = _fbthrift_gen_metadata_struct_MyUnionFieldPatch(meta) meta = _fbthrift_gen_metadata_struct_MyUnionPatch(meta) - meta = _fbthrift_gen_metadata_struct_MyStructFieldPatch(meta) meta = _fbthrift_gen_metadata_struct_MyStructFieldN10Patch(meta) meta = _fbthrift_gen_metadata_struct_MyStructFieldN25Patch(meta) meta = _fbthrift_gen_metadata_struct_MyStructFieldN28Patch(meta) meta = _fbthrift_gen_metadata_struct_MyStructFieldN29Patch(meta) meta = _fbthrift_gen_metadata_struct_MyStructFieldN30Patch(meta) + meta = _fbthrift_gen_metadata_struct_MyStructFieldPatch(meta) meta = _fbthrift_gen_metadata_struct_MyStructPatch(meta) meta = _fbthrift_gen_metadata_struct_LateDefStructFieldPatch(meta) meta = _fbthrift_gen_metadata_struct_LateDefStructPatch(meta) diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_types.py b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_types.py index ded60dc52a1..7525c817463 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_types.py +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_types.py @@ -829,557 +829,557 @@ class MyUnionPatch(metaclass=_fbthrift_python_types.StructMeta): return thrift.util.converter.to_py_struct(py_deprecated_types.MyUnionPatch, self) -class MyStructFieldPatch(metaclass=_fbthrift_python_types.StructMeta): +class MyStructFieldN10Patch(metaclass=_fbthrift_python_types.StructMeta): _fbthrift_SPEC = ( ( - -30, # id - _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optMapVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN30Patch), # typeinfo + 1, # id + _fbthrift_python_types.FieldQualifier.Optional, # qualifier + "assign", # name + lambda: _fbthrift_python_types.EnumTypeInfo(MyEnum), # typeinfo None, # default value None, # adapter info ), ( - -29, # id + 2, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optSetVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN29Patch), # typeinfo + "clear", # name + _fbthrift_python_types.typeinfo_bool, # typeinfo None, # default value None, # adapter info ), + ) + + @staticmethod + def __get_thrift_name__() -> str: + return "module.MyStructFieldN10Patch" + + @staticmethod + def __get_thrift_uri__(): + return "test.dev/fixtures/patch/MyStructFieldN10Patch" + + @staticmethod + def __get_metadata__(): + return _fbthrift_metadata__struct_MyStructFieldN10Patch() + + def _to_python(self): + return self + + def _to_py3(self): + import importlib + py3_types = importlib.import_module("test.fixtures.patch.module.types") + import thrift.py3.converter + return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN10Patch, self) + + def _to_py_deprecated(self): + import importlib + py_deprecated_types = importlib.import_module("module.ttypes") + import thrift.util.converter + return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN10Patch, self) + + +class MyStructFieldN25Patch(metaclass=_fbthrift_python_types.StructMeta): + _fbthrift_SPEC = ( ( - -28, # id - _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optListVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN28Patch), # typeinfo + 1, # id + _fbthrift_python_types.FieldQualifier.Optional, # qualifier + "assign", # name + lambda: _fbthrift_python_types.EnumTypeInfo(MyEnum), # typeinfo None, # default value None, # adapter info ), ( - -27, # id + 2, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optLateStructVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(LateDefStructPatch), # typeinfo + "clear", # name + _fbthrift_python_types.typeinfo_bool, # typeinfo None, # default value None, # adapter info ), + ) + + @staticmethod + def __get_thrift_name__() -> str: + return "module.MyStructFieldN25Patch" + + @staticmethod + def __get_thrift_uri__(): + return "test.dev/fixtures/patch/MyStructFieldN25Patch" + + @staticmethod + def __get_metadata__(): + return _fbthrift_metadata__struct_MyStructFieldN25Patch() + + def _to_python(self): + return self + + def _to_py3(self): + import importlib + py3_types = importlib.import_module("test.fixtures.patch.module.types") + import thrift.py3.converter + return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN25Patch, self) + + def _to_py_deprecated(self): + import importlib + py_deprecated_types = importlib.import_module("module.ttypes") + import thrift.util.converter + return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN25Patch, self) + + +class MyStructFieldN28Patch(metaclass=_fbthrift_python_types.StructMeta): + _fbthrift_SPEC = ( ( - -26, # id - _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optStructVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(MyDataPatch), # typeinfo + 1, # id + _fbthrift_python_types.FieldQualifier.Optional, # qualifier + "assign", # name + lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i16), # typeinfo None, # default value None, # adapter info ), ( - -25, # id + 2, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optEnumVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN25Patch), # typeinfo + "clear", # name + _fbthrift_python_types.typeinfo_bool, # typeinfo None, # default value None, # adapter info ), ( - -24, # id + 3, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optBinaryVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BinaryPatch), # typeinfo + "patch", # name + lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I16Patch)), # typeinfo None, # default value None, # adapter info ), ( - -23, # id + 7, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optStringVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.StringPatch), # typeinfo + "remove", # name + lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i16), # typeinfo None, # default value None, # adapter info ), ( - -22, # id + 8, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optDoubleVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.DoublePatch), # typeinfo + "prepend", # name + lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i16), # typeinfo None, # default value None, # adapter info ), ( - -21, # id + 9, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optFloatVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.FloatPatch), # typeinfo + "append", # name + lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i16), # typeinfo None, # default value None, # adapter info ), + ) + + @staticmethod + def __get_thrift_name__() -> str: + return "module.MyStructFieldN28Patch" + + @staticmethod + def __get_thrift_uri__(): + return "test.dev/fixtures/patch/MyStructFieldN28Patch" + + @staticmethod + def __get_metadata__(): + return _fbthrift_metadata__struct_MyStructFieldN28Patch() + + def _to_python(self): + return self + + def _to_py3(self): + import importlib + py3_types = importlib.import_module("test.fixtures.patch.module.types") + import thrift.py3.converter + return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN28Patch, self) + + def _to_py_deprecated(self): + import importlib + py_deprecated_types = importlib.import_module("module.ttypes") + import thrift.util.converter + return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN28Patch, self) + + +class MyStructFieldN29Patch(metaclass=_fbthrift_python_types.StructMeta): + _fbthrift_SPEC = ( ( - -20, # id - _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optI64Val", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I64Patch), # typeinfo + 1, # id + _fbthrift_python_types.FieldQualifier.Optional, # qualifier + "assign", # name + lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_string), # typeinfo None, # default value None, # adapter info ), ( - -19, # id + 2, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optI32Val", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I32Patch), # typeinfo + "clear", # name + _fbthrift_python_types.typeinfo_bool, # typeinfo None, # default value None, # adapter info ), ( - -18, # id + 7, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optI16Val", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I16Patch), # typeinfo + "remove", # name + lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_string), # typeinfo None, # default value None, # adapter info ), ( - -17, # id + 8, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optByteVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BytePatch), # typeinfo + "add", # name + lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_string), # typeinfo None, # default value None, # adapter info ), + ) + + @staticmethod + def __get_thrift_name__() -> str: + return "module.MyStructFieldN29Patch" + + @staticmethod + def __get_thrift_uri__(): + return "test.dev/fixtures/patch/MyStructFieldN29Patch" + + @staticmethod + def __get_metadata__(): + return _fbthrift_metadata__struct_MyStructFieldN29Patch() + + def _to_python(self): + return self + + def _to_py3(self): + import importlib + py3_types = importlib.import_module("test.fixtures.patch.module.types") + import thrift.py3.converter + return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN29Patch, self) + + def _to_py_deprecated(self): + import importlib + py_deprecated_types = importlib.import_module("module.ttypes") + import thrift.util.converter + return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN29Patch, self) + + +class MyStructFieldN30Patch(metaclass=_fbthrift_python_types.StructMeta): + _fbthrift_SPEC = ( ( - -16, # id - _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "optBoolVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BoolPatch), # typeinfo + 1, # id + _fbthrift_python_types.FieldQualifier.Optional, # qualifier + "assign", # name + lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_string, _fbthrift_python_types.typeinfo_string), # typeinfo None, # default value None, # adapter info ), ( - -15, # id + 2, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "timeVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.TimePatch), # typeinfo + "clear", # name + _fbthrift_python_types.typeinfo_bool, # typeinfo None, # default value None, # adapter info ), ( - -14, # id + 5, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "durationVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.DurationPatch), # typeinfo + "add", # name + lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_string, _fbthrift_python_types.typeinfo_string), # typeinfo None, # default value None, # adapter info ), ( - -13, # id + 7, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "lateStructVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(LateDefStructPatch), # typeinfo + "remove", # name + lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_string), # typeinfo None, # default value None, # adapter info ), ( - -12, # id + 9, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "unionVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(MyUnionPatch), # typeinfo + "put", # name + lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_string, _fbthrift_python_types.typeinfo_string), # typeinfo None, # default value None, # adapter info ), + ) + + @staticmethod + def __get_thrift_name__() -> str: + return "module.MyStructFieldN30Patch" + + @staticmethod + def __get_thrift_uri__(): + return "test.dev/fixtures/patch/MyStructFieldN30Patch" + + @staticmethod + def __get_metadata__(): + return _fbthrift_metadata__struct_MyStructFieldN30Patch() + + def _to_python(self): + return self + + def _to_py3(self): + import importlib + py3_types = importlib.import_module("test.fixtures.patch.module.types") + import thrift.py3.converter + return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN30Patch, self) + + def _to_py_deprecated(self): + import importlib + py_deprecated_types = importlib.import_module("module.ttypes") + import thrift.util.converter + return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN30Patch, self) + + +class MyStructFieldPatch(metaclass=_fbthrift_python_types.StructMeta): + _fbthrift_SPEC = ( ( - -11, # id + -30, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "structVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(MyDataPatch), # typeinfo + "optMapVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN30Patch), # typeinfo None, # default value None, # adapter info ), ( - -10, # id + -29, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "enumVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN10Patch), # typeinfo + "optSetVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN29Patch), # typeinfo None, # default value None, # adapter info ), ( - -9, # id + -28, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "binaryVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BinaryPatch), # typeinfo + "optListVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN28Patch), # typeinfo None, # default value None, # adapter info ), ( - -8, # id + -27, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "stringVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.StringPatch), # typeinfo + "optLateStructVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(LateDefStructPatch), # typeinfo None, # default value None, # adapter info ), ( - -7, # id + -26, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "doubleVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.DoublePatch), # typeinfo + "optStructVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(MyDataPatch), # typeinfo None, # default value None, # adapter info ), ( - -6, # id + -25, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "floatVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.FloatPatch), # typeinfo + "optEnumVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN25Patch), # typeinfo None, # default value None, # adapter info ), ( - -5, # id + -24, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "i64Val", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I64Patch), # typeinfo + "optBinaryVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BinaryPatch), # typeinfo None, # default value None, # adapter info ), ( - -4, # id + -23, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "i32Val", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I32Patch), # typeinfo + "optStringVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.StringPatch), # typeinfo None, # default value None, # adapter info ), ( - -3, # id + -22, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "i16Val", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I16Patch), # typeinfo + "optDoubleVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.DoublePatch), # typeinfo None, # default value None, # adapter info ), ( - -2, # id + -21, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "byteVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BytePatch), # typeinfo + "optFloatVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.FloatPatch), # typeinfo None, # default value None, # adapter info ), ( - -1, # id + -20, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "boolVal", # name - lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BoolPatch), # typeinfo + "optI64Val", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I64Patch), # typeinfo None, # default value None, # adapter info ), - ) - - @staticmethod - def __get_thrift_name__() -> str: - return "module.MyStructFieldPatch" - - @staticmethod - def __get_thrift_uri__(): - return "test.dev/fixtures/patch/MyStructFieldPatch" - - @staticmethod - def __get_metadata__(): - return _fbthrift_metadata__struct_MyStructFieldPatch() - - def _to_python(self): - return self - - def _to_py3(self): - import importlib - py3_types = importlib.import_module("test.fixtures.patch.module.types") - import thrift.py3.converter - return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldPatch, self) - - def _to_py_deprecated(self): - import importlib - py_deprecated_types = importlib.import_module("module.ttypes") - import thrift.util.converter - return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldPatch, self) - - -class MyStructFieldN10Patch(metaclass=_fbthrift_python_types.StructMeta): - _fbthrift_SPEC = ( ( - 1, # id - _fbthrift_python_types.FieldQualifier.Optional, # qualifier - "assign", # name - lambda: _fbthrift_python_types.EnumTypeInfo(MyEnum), # typeinfo + -19, # id + _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier + "optI32Val", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I32Patch), # typeinfo None, # default value None, # adapter info ), ( - 2, # id + -18, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "clear", # name - _fbthrift_python_types.typeinfo_bool, # typeinfo + "optI16Val", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I16Patch), # typeinfo None, # default value None, # adapter info ), - ) - - @staticmethod - def __get_thrift_name__() -> str: - return "module.MyStructFieldN10Patch" - - @staticmethod - def __get_thrift_uri__(): - return "test.dev/fixtures/patch/MyStructFieldN10Patch" - - @staticmethod - def __get_metadata__(): - return _fbthrift_metadata__struct_MyStructFieldN10Patch() - - def _to_python(self): - return self - - def _to_py3(self): - import importlib - py3_types = importlib.import_module("test.fixtures.patch.module.types") - import thrift.py3.converter - return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN10Patch, self) - - def _to_py_deprecated(self): - import importlib - py_deprecated_types = importlib.import_module("module.ttypes") - import thrift.util.converter - return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN10Patch, self) - - -class MyStructFieldN25Patch(metaclass=_fbthrift_python_types.StructMeta): - _fbthrift_SPEC = ( ( - 1, # id - _fbthrift_python_types.FieldQualifier.Optional, # qualifier - "assign", # name - lambda: _fbthrift_python_types.EnumTypeInfo(MyEnum), # typeinfo + -17, # id + _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier + "optByteVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BytePatch), # typeinfo None, # default value None, # adapter info ), ( - 2, # id + -16, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "clear", # name - _fbthrift_python_types.typeinfo_bool, # typeinfo + "optBoolVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BoolPatch), # typeinfo None, # default value None, # adapter info ), - ) - - @staticmethod - def __get_thrift_name__() -> str: - return "module.MyStructFieldN25Patch" - - @staticmethod - def __get_thrift_uri__(): - return "test.dev/fixtures/patch/MyStructFieldN25Patch" - - @staticmethod - def __get_metadata__(): - return _fbthrift_metadata__struct_MyStructFieldN25Patch() - - def _to_python(self): - return self - - def _to_py3(self): - import importlib - py3_types = importlib.import_module("test.fixtures.patch.module.types") - import thrift.py3.converter - return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN25Patch, self) - - def _to_py_deprecated(self): - import importlib - py_deprecated_types = importlib.import_module("module.ttypes") - import thrift.util.converter - return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN25Patch, self) - - -class MyStructFieldN28Patch(metaclass=_fbthrift_python_types.StructMeta): - _fbthrift_SPEC = ( ( - 1, # id - _fbthrift_python_types.FieldQualifier.Optional, # qualifier - "assign", # name - lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i16), # typeinfo + -15, # id + _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier + "timeVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.TimePatch), # typeinfo None, # default value None, # adapter info ), ( - 2, # id + -14, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "clear", # name - _fbthrift_python_types.typeinfo_bool, # typeinfo + "durationVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.DurationPatch), # typeinfo None, # default value None, # adapter info ), ( - 3, # id + -13, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "patch", # name - lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_i32, _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I16Patch)), # typeinfo + "lateStructVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(LateDefStructPatch), # typeinfo None, # default value None, # adapter info ), ( - 7, # id + -12, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "remove", # name - lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i16), # typeinfo + "unionVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(MyUnionPatch), # typeinfo None, # default value None, # adapter info ), ( - 8, # id + -11, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "prepend", # name - lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i16), # typeinfo + "structVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(MyDataPatch), # typeinfo None, # default value None, # adapter info ), ( - 9, # id + -10, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "append", # name - lambda: _fbthrift_python_types.ListTypeInfo(_fbthrift_python_types.typeinfo_i16), # typeinfo + "enumVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(MyStructFieldN10Patch), # typeinfo None, # default value None, # adapter info ), - ) - - @staticmethod - def __get_thrift_name__() -> str: - return "module.MyStructFieldN28Patch" - - @staticmethod - def __get_thrift_uri__(): - return "test.dev/fixtures/patch/MyStructFieldN28Patch" - - @staticmethod - def __get_metadata__(): - return _fbthrift_metadata__struct_MyStructFieldN28Patch() - - def _to_python(self): - return self - - def _to_py3(self): - import importlib - py3_types = importlib.import_module("test.fixtures.patch.module.types") - import thrift.py3.converter - return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN28Patch, self) - - def _to_py_deprecated(self): - import importlib - py_deprecated_types = importlib.import_module("module.ttypes") - import thrift.util.converter - return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN28Patch, self) - - -class MyStructFieldN29Patch(metaclass=_fbthrift_python_types.StructMeta): - _fbthrift_SPEC = ( ( - 1, # id - _fbthrift_python_types.FieldQualifier.Optional, # qualifier - "assign", # name - lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_string), # typeinfo + -9, # id + _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier + "binaryVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BinaryPatch), # typeinfo None, # default value None, # adapter info ), ( - 2, # id + -8, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "clear", # name - _fbthrift_python_types.typeinfo_bool, # typeinfo + "stringVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.StringPatch), # typeinfo None, # default value None, # adapter info ), ( - 7, # id + -7, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "remove", # name - lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_string), # typeinfo + "doubleVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.DoublePatch), # typeinfo None, # default value None, # adapter info ), ( - 8, # id + -6, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "add", # name - lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_string), # typeinfo + "floatVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.FloatPatch), # typeinfo None, # default value None, # adapter info ), - ) - - @staticmethod - def __get_thrift_name__() -> str: - return "module.MyStructFieldN29Patch" - - @staticmethod - def __get_thrift_uri__(): - return "test.dev/fixtures/patch/MyStructFieldN29Patch" - - @staticmethod - def __get_metadata__(): - return _fbthrift_metadata__struct_MyStructFieldN29Patch() - - def _to_python(self): - return self - - def _to_py3(self): - import importlib - py3_types = importlib.import_module("test.fixtures.patch.module.types") - import thrift.py3.converter - return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN29Patch, self) - - def _to_py_deprecated(self): - import importlib - py_deprecated_types = importlib.import_module("module.ttypes") - import thrift.util.converter - return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN29Patch, self) - - -class MyStructFieldN30Patch(metaclass=_fbthrift_python_types.StructMeta): - _fbthrift_SPEC = ( ( - 1, # id - _fbthrift_python_types.FieldQualifier.Optional, # qualifier - "assign", # name - lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_string, _fbthrift_python_types.typeinfo_string), # typeinfo + -5, # id + _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier + "i64Val", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I64Patch), # typeinfo None, # default value None, # adapter info ), ( - 2, # id + -4, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "clear", # name - _fbthrift_python_types.typeinfo_bool, # typeinfo + "i32Val", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I32Patch), # typeinfo None, # default value None, # adapter info ), ( - 5, # id + -3, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "add", # name - lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_string, _fbthrift_python_types.typeinfo_string), # typeinfo + "i16Val", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.I16Patch), # typeinfo None, # default value None, # adapter info ), ( - 7, # id + -2, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "remove", # name - lambda: _fbthrift_python_types.SetTypeInfo(_fbthrift_python_types.typeinfo_string), # typeinfo + "byteVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BytePatch), # typeinfo None, # default value None, # adapter info ), ( - 9, # id + -1, # id _fbthrift_python_types.FieldQualifier.Unqualified, # qualifier - "put", # name - lambda: _fbthrift_python_types.MapTypeInfo(_fbthrift_python_types.typeinfo_string, _fbthrift_python_types.typeinfo_string), # typeinfo + "boolVal", # name + lambda: _fbthrift_python_types.StructTypeInfo(apache.thrift.op.patch.thrift_types.BoolPatch), # typeinfo None, # default value None, # adapter info ), @@ -1387,15 +1387,15 @@ class MyStructFieldN30Patch(metaclass=_fbthrift_python_types.StructMeta): @staticmethod def __get_thrift_name__() -> str: - return "module.MyStructFieldN30Patch" + return "module.MyStructFieldPatch" @staticmethod def __get_thrift_uri__(): - return "test.dev/fixtures/patch/MyStructFieldN30Patch" + return "test.dev/fixtures/patch/MyStructFieldPatch" @staticmethod def __get_metadata__(): - return _fbthrift_metadata__struct_MyStructFieldN30Patch() + return _fbthrift_metadata__struct_MyStructFieldPatch() def _to_python(self): return self @@ -1404,13 +1404,13 @@ class MyStructFieldN30Patch(metaclass=_fbthrift_python_types.StructMeta): import importlib py3_types = importlib.import_module("test.fixtures.patch.module.types") import thrift.py3.converter - return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldN30Patch, self) + return thrift.py3.converter.to_py3_struct(py3_types.MyStructFieldPatch, self) def _to_py_deprecated(self): import importlib py_deprecated_types = importlib.import_module("module.ttypes") import thrift.util.converter - return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldN30Patch, self) + return thrift.util.converter.to_py_struct(py_deprecated_types.MyStructFieldPatch, self) class MyStructPatch(metaclass=_fbthrift_python_types.StructMeta): @@ -1634,8 +1634,6 @@ def _fbthrift_metadata__struct_MyUnionFieldPatch(): return test.fixtures.patch.module.thrift_metadata.gen_metadata_struct_MyUnionFieldPatch() def _fbthrift_metadata__struct_MyUnionPatch(): return test.fixtures.patch.module.thrift_metadata.gen_metadata_struct_MyUnionPatch() -def _fbthrift_metadata__struct_MyStructFieldPatch(): - return test.fixtures.patch.module.thrift_metadata.gen_metadata_struct_MyStructFieldPatch() def _fbthrift_metadata__struct_MyStructFieldN10Patch(): return test.fixtures.patch.module.thrift_metadata.gen_metadata_struct_MyStructFieldN10Patch() def _fbthrift_metadata__struct_MyStructFieldN25Patch(): @@ -1646,6 +1644,8 @@ def _fbthrift_metadata__struct_MyStructFieldN29Patch(): return test.fixtures.patch.module.thrift_metadata.gen_metadata_struct_MyStructFieldN29Patch() def _fbthrift_metadata__struct_MyStructFieldN30Patch(): return test.fixtures.patch.module.thrift_metadata.gen_metadata_struct_MyStructFieldN30Patch() +def _fbthrift_metadata__struct_MyStructFieldPatch(): + return test.fixtures.patch.module.thrift_metadata.gen_metadata_struct_MyStructFieldPatch() def _fbthrift_metadata__struct_MyStructPatch(): return test.fixtures.patch.module.thrift_metadata.gen_metadata_struct_MyStructPatch() def _fbthrift_metadata__struct_LateDefStructFieldPatch(): @@ -1665,12 +1665,12 @@ _fbthrift_all_structs = [ InnerUnionPatch, MyUnionFieldPatch, MyUnionPatch, - MyStructFieldPatch, MyStructFieldN10Patch, MyStructFieldN25Patch, MyStructFieldN28Patch, MyStructFieldN29Patch, MyStructFieldN30Patch, + MyStructFieldPatch, MyStructPatch, LateDefStructFieldPatch, LateDefStructPatch, diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_types.pyi b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_types.pyi index 9633487c626..ac991132603 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_types.pyi +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-python/test/fixtures/patch/module/thrift_types.pyi @@ -365,110 +365,6 @@ class MyUnionPatch(_fbthrift_python_types.Struct): def _to_py_deprecated(self) -> "module.ttypes.MyUnionPatch": ... # type: ignore -class MyStructFieldPatch(_fbthrift_python_types.Struct): - optMapVal: _typing.Final[MyStructFieldN30Patch] = ... - optSetVal: _typing.Final[MyStructFieldN29Patch] = ... - optListVal: _typing.Final[MyStructFieldN28Patch] = ... - optLateStructVal: _typing.Final[LateDefStructPatch] = ... - optStructVal: _typing.Final[MyDataPatch] = ... - optEnumVal: _typing.Final[MyStructFieldN25Patch] = ... - optBinaryVal: _typing.Final[apache.thrift.op.patch.thrift_types.BinaryPatch] = ... - optStringVal: _typing.Final[apache.thrift.op.patch.thrift_types.StringPatch] = ... - optDoubleVal: _typing.Final[apache.thrift.op.patch.thrift_types.DoublePatch] = ... - optFloatVal: _typing.Final[apache.thrift.op.patch.thrift_types.FloatPatch] = ... - optI64Val: _typing.Final[apache.thrift.op.patch.thrift_types.I64Patch] = ... - optI32Val: _typing.Final[apache.thrift.op.patch.thrift_types.I32Patch] = ... - optI16Val: _typing.Final[apache.thrift.op.patch.thrift_types.I16Patch] = ... - optByteVal: _typing.Final[apache.thrift.op.patch.thrift_types.BytePatch] = ... - optBoolVal: _typing.Final[apache.thrift.op.patch.thrift_types.BoolPatch] = ... - timeVal: _typing.Final[apache.thrift.op.patch.thrift_types.TimePatch] = ... - durationVal: _typing.Final[apache.thrift.op.patch.thrift_types.DurationPatch] = ... - lateStructVal: _typing.Final[LateDefStructPatch] = ... - unionVal: _typing.Final[MyUnionPatch] = ... - structVal: _typing.Final[MyDataPatch] = ... - enumVal: _typing.Final[MyStructFieldN10Patch] = ... - binaryVal: _typing.Final[apache.thrift.op.patch.thrift_types.BinaryPatch] = ... - stringVal: _typing.Final[apache.thrift.op.patch.thrift_types.StringPatch] = ... - doubleVal: _typing.Final[apache.thrift.op.patch.thrift_types.DoublePatch] = ... - floatVal: _typing.Final[apache.thrift.op.patch.thrift_types.FloatPatch] = ... - i64Val: _typing.Final[apache.thrift.op.patch.thrift_types.I64Patch] = ... - i32Val: _typing.Final[apache.thrift.op.patch.thrift_types.I32Patch] = ... - i16Val: _typing.Final[apache.thrift.op.patch.thrift_types.I16Patch] = ... - byteVal: _typing.Final[apache.thrift.op.patch.thrift_types.BytePatch] = ... - boolVal: _typing.Final[apache.thrift.op.patch.thrift_types.BoolPatch] = ... - def __init__( - self, *, - optMapVal: _typing.Optional[MyStructFieldN30Patch]=..., - optSetVal: _typing.Optional[MyStructFieldN29Patch]=..., - optListVal: _typing.Optional[MyStructFieldN28Patch]=..., - optLateStructVal: _typing.Optional[LateDefStructPatch]=..., - optStructVal: _typing.Optional[MyDataPatch]=..., - optEnumVal: _typing.Optional[MyStructFieldN25Patch]=..., - optBinaryVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BinaryPatch]=..., - optStringVal: _typing.Optional[apache.thrift.op.patch.thrift_types.StringPatch]=..., - optDoubleVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DoublePatch]=..., - optFloatVal: _typing.Optional[apache.thrift.op.patch.thrift_types.FloatPatch]=..., - optI64Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I64Patch]=..., - optI32Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I32Patch]=..., - optI16Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I16Patch]=..., - optByteVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BytePatch]=..., - optBoolVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BoolPatch]=..., - timeVal: _typing.Optional[apache.thrift.op.patch.thrift_types.TimePatch]=..., - durationVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DurationPatch]=..., - lateStructVal: _typing.Optional[LateDefStructPatch]=..., - unionVal: _typing.Optional[MyUnionPatch]=..., - structVal: _typing.Optional[MyDataPatch]=..., - enumVal: _typing.Optional[MyStructFieldN10Patch]=..., - binaryVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BinaryPatch]=..., - stringVal: _typing.Optional[apache.thrift.op.patch.thrift_types.StringPatch]=..., - doubleVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DoublePatch]=..., - floatVal: _typing.Optional[apache.thrift.op.patch.thrift_types.FloatPatch]=..., - i64Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I64Patch]=..., - i32Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I32Patch]=..., - i16Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I16Patch]=..., - byteVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BytePatch]=..., - boolVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BoolPatch]=... - ) -> None: ... - - def __call__( - self, *, - optMapVal: _typing.Optional[MyStructFieldN30Patch]=..., - optSetVal: _typing.Optional[MyStructFieldN29Patch]=..., - optListVal: _typing.Optional[MyStructFieldN28Patch]=..., - optLateStructVal: _typing.Optional[LateDefStructPatch]=..., - optStructVal: _typing.Optional[MyDataPatch]=..., - optEnumVal: _typing.Optional[MyStructFieldN25Patch]=..., - optBinaryVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BinaryPatch]=..., - optStringVal: _typing.Optional[apache.thrift.op.patch.thrift_types.StringPatch]=..., - optDoubleVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DoublePatch]=..., - optFloatVal: _typing.Optional[apache.thrift.op.patch.thrift_types.FloatPatch]=..., - optI64Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I64Patch]=..., - optI32Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I32Patch]=..., - optI16Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I16Patch]=..., - optByteVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BytePatch]=..., - optBoolVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BoolPatch]=..., - timeVal: _typing.Optional[apache.thrift.op.patch.thrift_types.TimePatch]=..., - durationVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DurationPatch]=..., - lateStructVal: _typing.Optional[LateDefStructPatch]=..., - unionVal: _typing.Optional[MyUnionPatch]=..., - structVal: _typing.Optional[MyDataPatch]=..., - enumVal: _typing.Optional[MyStructFieldN10Patch]=..., - binaryVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BinaryPatch]=..., - stringVal: _typing.Optional[apache.thrift.op.patch.thrift_types.StringPatch]=..., - doubleVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DoublePatch]=..., - floatVal: _typing.Optional[apache.thrift.op.patch.thrift_types.FloatPatch]=..., - i64Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I64Patch]=..., - i32Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I32Patch]=..., - i16Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I16Patch]=..., - byteVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BytePatch]=..., - boolVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BoolPatch]=... - ) -> MyStructFieldPatch: ... - def __iter__(self) -> _typing.Iterator[_typing.Tuple[str, _typing.Union[MyStructFieldN30Patch, MyStructFieldN29Patch, MyStructFieldN28Patch, LateDefStructPatch, MyDataPatch, MyStructFieldN25Patch, apache.thrift.op.patch.thrift_types.BinaryPatch, apache.thrift.op.patch.thrift_types.StringPatch, apache.thrift.op.patch.thrift_types.DoublePatch, apache.thrift.op.patch.thrift_types.FloatPatch, apache.thrift.op.patch.thrift_types.I64Patch, apache.thrift.op.patch.thrift_types.I32Patch, apache.thrift.op.patch.thrift_types.I16Patch, apache.thrift.op.patch.thrift_types.BytePatch, apache.thrift.op.patch.thrift_types.BoolPatch, apache.thrift.op.patch.thrift_types.TimePatch, apache.thrift.op.patch.thrift_types.DurationPatch, LateDefStructPatch, MyUnionPatch, MyDataPatch, MyStructFieldN10Patch, apache.thrift.op.patch.thrift_types.BinaryPatch, apache.thrift.op.patch.thrift_types.StringPatch, apache.thrift.op.patch.thrift_types.DoublePatch, apache.thrift.op.patch.thrift_types.FloatPatch, apache.thrift.op.patch.thrift_types.I64Patch, apache.thrift.op.patch.thrift_types.I32Patch, apache.thrift.op.patch.thrift_types.I16Patch, apache.thrift.op.patch.thrift_types.BytePatch, apache.thrift.op.patch.thrift_types.BoolPatch]]]: ... - def _to_python(self) -> MyStructFieldPatch: ... - def _to_py3(self) -> "test.fixtures.patch.module.types.MyStructFieldPatch": ... # type: ignore - def _to_py_deprecated(self) -> "module.ttypes.MyStructFieldPatch": ... # type: ignore - - class MyStructFieldN10Patch(_fbthrift_python_types.Struct): assign: _typing.Final[_typing.Optional[MyEnum]] = ... clear: _typing.Final[bool] = ... @@ -596,6 +492,110 @@ class MyStructFieldN30Patch(_fbthrift_python_types.Struct): def _to_py_deprecated(self) -> "module.ttypes.MyStructFieldN30Patch": ... # type: ignore +class MyStructFieldPatch(_fbthrift_python_types.Struct): + optMapVal: _typing.Final[MyStructFieldN30Patch] = ... + optSetVal: _typing.Final[MyStructFieldN29Patch] = ... + optListVal: _typing.Final[MyStructFieldN28Patch] = ... + optLateStructVal: _typing.Final[LateDefStructPatch] = ... + optStructVal: _typing.Final[MyDataPatch] = ... + optEnumVal: _typing.Final[MyStructFieldN25Patch] = ... + optBinaryVal: _typing.Final[apache.thrift.op.patch.thrift_types.BinaryPatch] = ... + optStringVal: _typing.Final[apache.thrift.op.patch.thrift_types.StringPatch] = ... + optDoubleVal: _typing.Final[apache.thrift.op.patch.thrift_types.DoublePatch] = ... + optFloatVal: _typing.Final[apache.thrift.op.patch.thrift_types.FloatPatch] = ... + optI64Val: _typing.Final[apache.thrift.op.patch.thrift_types.I64Patch] = ... + optI32Val: _typing.Final[apache.thrift.op.patch.thrift_types.I32Patch] = ... + optI16Val: _typing.Final[apache.thrift.op.patch.thrift_types.I16Patch] = ... + optByteVal: _typing.Final[apache.thrift.op.patch.thrift_types.BytePatch] = ... + optBoolVal: _typing.Final[apache.thrift.op.patch.thrift_types.BoolPatch] = ... + timeVal: _typing.Final[apache.thrift.op.patch.thrift_types.TimePatch] = ... + durationVal: _typing.Final[apache.thrift.op.patch.thrift_types.DurationPatch] = ... + lateStructVal: _typing.Final[LateDefStructPatch] = ... + unionVal: _typing.Final[MyUnionPatch] = ... + structVal: _typing.Final[MyDataPatch] = ... + enumVal: _typing.Final[MyStructFieldN10Patch] = ... + binaryVal: _typing.Final[apache.thrift.op.patch.thrift_types.BinaryPatch] = ... + stringVal: _typing.Final[apache.thrift.op.patch.thrift_types.StringPatch] = ... + doubleVal: _typing.Final[apache.thrift.op.patch.thrift_types.DoublePatch] = ... + floatVal: _typing.Final[apache.thrift.op.patch.thrift_types.FloatPatch] = ... + i64Val: _typing.Final[apache.thrift.op.patch.thrift_types.I64Patch] = ... + i32Val: _typing.Final[apache.thrift.op.patch.thrift_types.I32Patch] = ... + i16Val: _typing.Final[apache.thrift.op.patch.thrift_types.I16Patch] = ... + byteVal: _typing.Final[apache.thrift.op.patch.thrift_types.BytePatch] = ... + boolVal: _typing.Final[apache.thrift.op.patch.thrift_types.BoolPatch] = ... + def __init__( + self, *, + optMapVal: _typing.Optional[MyStructFieldN30Patch]=..., + optSetVal: _typing.Optional[MyStructFieldN29Patch]=..., + optListVal: _typing.Optional[MyStructFieldN28Patch]=..., + optLateStructVal: _typing.Optional[LateDefStructPatch]=..., + optStructVal: _typing.Optional[MyDataPatch]=..., + optEnumVal: _typing.Optional[MyStructFieldN25Patch]=..., + optBinaryVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BinaryPatch]=..., + optStringVal: _typing.Optional[apache.thrift.op.patch.thrift_types.StringPatch]=..., + optDoubleVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DoublePatch]=..., + optFloatVal: _typing.Optional[apache.thrift.op.patch.thrift_types.FloatPatch]=..., + optI64Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I64Patch]=..., + optI32Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I32Patch]=..., + optI16Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I16Patch]=..., + optByteVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BytePatch]=..., + optBoolVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BoolPatch]=..., + timeVal: _typing.Optional[apache.thrift.op.patch.thrift_types.TimePatch]=..., + durationVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DurationPatch]=..., + lateStructVal: _typing.Optional[LateDefStructPatch]=..., + unionVal: _typing.Optional[MyUnionPatch]=..., + structVal: _typing.Optional[MyDataPatch]=..., + enumVal: _typing.Optional[MyStructFieldN10Patch]=..., + binaryVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BinaryPatch]=..., + stringVal: _typing.Optional[apache.thrift.op.patch.thrift_types.StringPatch]=..., + doubleVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DoublePatch]=..., + floatVal: _typing.Optional[apache.thrift.op.patch.thrift_types.FloatPatch]=..., + i64Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I64Patch]=..., + i32Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I32Patch]=..., + i16Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I16Patch]=..., + byteVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BytePatch]=..., + boolVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BoolPatch]=... + ) -> None: ... + + def __call__( + self, *, + optMapVal: _typing.Optional[MyStructFieldN30Patch]=..., + optSetVal: _typing.Optional[MyStructFieldN29Patch]=..., + optListVal: _typing.Optional[MyStructFieldN28Patch]=..., + optLateStructVal: _typing.Optional[LateDefStructPatch]=..., + optStructVal: _typing.Optional[MyDataPatch]=..., + optEnumVal: _typing.Optional[MyStructFieldN25Patch]=..., + optBinaryVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BinaryPatch]=..., + optStringVal: _typing.Optional[apache.thrift.op.patch.thrift_types.StringPatch]=..., + optDoubleVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DoublePatch]=..., + optFloatVal: _typing.Optional[apache.thrift.op.patch.thrift_types.FloatPatch]=..., + optI64Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I64Patch]=..., + optI32Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I32Patch]=..., + optI16Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I16Patch]=..., + optByteVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BytePatch]=..., + optBoolVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BoolPatch]=..., + timeVal: _typing.Optional[apache.thrift.op.patch.thrift_types.TimePatch]=..., + durationVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DurationPatch]=..., + lateStructVal: _typing.Optional[LateDefStructPatch]=..., + unionVal: _typing.Optional[MyUnionPatch]=..., + structVal: _typing.Optional[MyDataPatch]=..., + enumVal: _typing.Optional[MyStructFieldN10Patch]=..., + binaryVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BinaryPatch]=..., + stringVal: _typing.Optional[apache.thrift.op.patch.thrift_types.StringPatch]=..., + doubleVal: _typing.Optional[apache.thrift.op.patch.thrift_types.DoublePatch]=..., + floatVal: _typing.Optional[apache.thrift.op.patch.thrift_types.FloatPatch]=..., + i64Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I64Patch]=..., + i32Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I32Patch]=..., + i16Val: _typing.Optional[apache.thrift.op.patch.thrift_types.I16Patch]=..., + byteVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BytePatch]=..., + boolVal: _typing.Optional[apache.thrift.op.patch.thrift_types.BoolPatch]=... + ) -> MyStructFieldPatch: ... + def __iter__(self) -> _typing.Iterator[_typing.Tuple[str, _typing.Union[MyStructFieldN30Patch, MyStructFieldN29Patch, MyStructFieldN28Patch, LateDefStructPatch, MyDataPatch, MyStructFieldN25Patch, apache.thrift.op.patch.thrift_types.BinaryPatch, apache.thrift.op.patch.thrift_types.StringPatch, apache.thrift.op.patch.thrift_types.DoublePatch, apache.thrift.op.patch.thrift_types.FloatPatch, apache.thrift.op.patch.thrift_types.I64Patch, apache.thrift.op.patch.thrift_types.I32Patch, apache.thrift.op.patch.thrift_types.I16Patch, apache.thrift.op.patch.thrift_types.BytePatch, apache.thrift.op.patch.thrift_types.BoolPatch, apache.thrift.op.patch.thrift_types.TimePatch, apache.thrift.op.patch.thrift_types.DurationPatch, LateDefStructPatch, MyUnionPatch, MyDataPatch, MyStructFieldN10Patch, apache.thrift.op.patch.thrift_types.BinaryPatch, apache.thrift.op.patch.thrift_types.StringPatch, apache.thrift.op.patch.thrift_types.DoublePatch, apache.thrift.op.patch.thrift_types.FloatPatch, apache.thrift.op.patch.thrift_types.I64Patch, apache.thrift.op.patch.thrift_types.I32Patch, apache.thrift.op.patch.thrift_types.I16Patch, apache.thrift.op.patch.thrift_types.BytePatch, apache.thrift.op.patch.thrift_types.BoolPatch]]]: ... + def _to_python(self) -> MyStructFieldPatch: ... + def _to_py3(self) -> "test.fixtures.patch.module.types.MyStructFieldPatch": ... # type: ignore + def _to_py_deprecated(self) -> "module.ttypes.MyStructFieldPatch": ... # type: ignore + + class MyStructPatch(_fbthrift_python_types.Struct): assign: _typing.Final[_typing.Optional[MyStruct]] = ... clear: _typing.Final[bool] = ... diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-rust/types.rs b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-rust/types.rs index f486432678c..7234281e9b8 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-rust/types.rs +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/patch/gen-rust/types.rs @@ -178,46 +178,6 @@ pub struct MyUnionPatch { pub _dot_dot_Default_default: self::dot_dot::OtherFields, } -#[derive(Clone, PartialEq)] -pub struct MyStructFieldPatch { - pub boolVal: patch::types::BoolPatch, - pub byteVal: patch::types::BytePatch, - pub i16Val: patch::types::I16Patch, - pub i32Val: patch::types::I32Patch, - pub i64Val: patch::types::I64Patch, - pub floatVal: patch::types::FloatPatch, - pub doubleVal: patch::types::DoublePatch, - pub stringVal: patch::types::StringPatch, - pub binaryVal: patch::types::BinaryPatch, - pub enumVal: crate::types::MyStructFieldN10Patch, - pub structVal: crate::types::MyDataPatch, - pub unionVal: crate::types::MyUnionPatch, - pub lateStructVal: crate::types::LateDefStructPatch, - pub durationVal: patch::types::DurationPatch, - pub timeVal: patch::types::TimePatch, - pub optBoolVal: patch::types::BoolPatch, - pub optByteVal: patch::types::BytePatch, - pub optI16Val: patch::types::I16Patch, - pub optI32Val: patch::types::I32Patch, - pub optI64Val: patch::types::I64Patch, - pub optFloatVal: patch::types::FloatPatch, - pub optDoubleVal: patch::types::DoublePatch, - pub optStringVal: patch::types::StringPatch, - pub optBinaryVal: patch::types::BinaryPatch, - pub optEnumVal: crate::types::MyStructFieldN25Patch, - pub optStructVal: crate::types::MyDataPatch, - pub optLateStructVal: crate::types::LateDefStructPatch, - pub optListVal: crate::types::MyStructFieldN28Patch, - pub optSetVal: crate::types::MyStructFieldN29Patch, - pub optMapVal: crate::types::MyStructFieldN30Patch, - // This field forces `..Default::default()` when instantiating this - // struct, to make code future-proof against new fields added later to - // the definition in Thrift. If you don't want this, add the annotation - // `(rust.exhaustive)` to the Thrift struct to eliminate this field. - #[doc(hidden)] - pub _dot_dot_Default_default: self::dot_dot::OtherFields, -} - #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct MyStructFieldN10Patch { #[doc = "Assigns a value. If set, all other operations are ignored."] @@ -307,6 +267,46 @@ pub struct MyStructFieldN30Patch { } #[derive(Clone, PartialEq)] +pub struct MyStructFieldPatch { + pub optMapVal: crate::types::MyStructFieldN30Patch, + pub optSetVal: crate::types::MyStructFieldN29Patch, + pub optListVal: crate::types::MyStructFieldN28Patch, + pub optLateStructVal: crate::types::LateDefStructPatch, + pub optStructVal: crate::types::MyDataPatch, + pub optEnumVal: crate::types::MyStructFieldN25Patch, + pub optBinaryVal: patch::types::BinaryPatch, + pub optStringVal: patch::types::StringPatch, + pub optDoubleVal: patch::types::DoublePatch, + pub optFloatVal: patch::types::FloatPatch, + pub optI64Val: patch::types::I64Patch, + pub optI32Val: patch::types::I32Patch, + pub optI16Val: patch::types::I16Patch, + pub optByteVal: patch::types::BytePatch, + pub optBoolVal: patch::types::BoolPatch, + pub timeVal: patch::types::TimePatch, + pub durationVal: patch::types::DurationPatch, + pub lateStructVal: crate::types::LateDefStructPatch, + pub unionVal: crate::types::MyUnionPatch, + pub structVal: crate::types::MyDataPatch, + pub enumVal: crate::types::MyStructFieldN10Patch, + pub binaryVal: patch::types::BinaryPatch, + pub stringVal: patch::types::StringPatch, + pub doubleVal: patch::types::DoublePatch, + pub floatVal: patch::types::FloatPatch, + pub i64Val: patch::types::I64Patch, + pub i32Val: patch::types::I32Patch, + pub i16Val: patch::types::I16Patch, + pub byteVal: patch::types::BytePatch, + pub boolVal: patch::types::BoolPatch, + // This field forces `..Default::default()` when instantiating this + // struct, to make code future-proof against new fields added later to + // the definition in Thrift. If you don't want this, add the annotation + // `(rust.exhaustive)` to the Thrift struct to eliminate this field. + #[doc(hidden)] + pub _dot_dot_Default_default: self::dot_dot::OtherFields, +} + +#[derive(Clone, PartialEq)] pub struct MyStructPatch { #[doc = "Assigns a value. If set, all other operations are ignored."] pub assign: ::std::option::Option<::std::boxed::Box>, @@ -1725,387 +1725,52 @@ where #[allow(clippy::derivable_impls)] -impl ::std::default::Default for self::MyStructFieldPatch { +impl ::std::default::Default for self::MyStructFieldN10Patch { fn default() -> Self { Self { - boolVal: ::std::default::Default::default(), - byteVal: ::std::default::Default::default(), - i16Val: ::std::default::Default::default(), - i32Val: ::std::default::Default::default(), - i64Val: ::std::default::Default::default(), - floatVal: ::std::default::Default::default(), - doubleVal: ::std::default::Default::default(), - stringVal: ::std::default::Default::default(), - binaryVal: ::std::default::Default::default(), - enumVal: ::std::default::Default::default(), - structVal: ::std::default::Default::default(), - unionVal: ::std::default::Default::default(), - lateStructVal: ::std::default::Default::default(), - durationVal: ::std::default::Default::default(), - timeVal: ::std::default::Default::default(), - optBoolVal: ::std::default::Default::default(), - optByteVal: ::std::default::Default::default(), - optI16Val: ::std::default::Default::default(), - optI32Val: ::std::default::Default::default(), - optI64Val: ::std::default::Default::default(), - optFloatVal: ::std::default::Default::default(), - optDoubleVal: ::std::default::Default::default(), - optStringVal: ::std::default::Default::default(), - optBinaryVal: ::std::default::Default::default(), - optEnumVal: ::std::default::Default::default(), - optStructVal: ::std::default::Default::default(), - optLateStructVal: ::std::default::Default::default(), - optListVal: ::std::default::Default::default(), - optSetVal: ::std::default::Default::default(), - optMapVal: ::std::default::Default::default(), + assign: ::std::option::Option::None, + clear: ::std::default::Default::default(), _dot_dot_Default_default: self::dot_dot::OtherFields(()), } } } -impl ::std::fmt::Debug for self::MyStructFieldPatch { +impl ::std::fmt::Debug for self::MyStructFieldN10Patch { fn fmt(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { formatter - .debug_struct("MyStructFieldPatch") - .field("boolVal", &self.boolVal) - .field("byteVal", &self.byteVal) - .field("i16Val", &self.i16Val) - .field("i32Val", &self.i32Val) - .field("i64Val", &self.i64Val) - .field("floatVal", &self.floatVal) - .field("doubleVal", &self.doubleVal) - .field("stringVal", &self.stringVal) - .field("binaryVal", &self.binaryVal) - .field("enumVal", &self.enumVal) - .field("structVal", &self.structVal) - .field("unionVal", &self.unionVal) - .field("lateStructVal", &self.lateStructVal) - .field("durationVal", &self.durationVal) - .field("timeVal", &self.timeVal) - .field("optBoolVal", &self.optBoolVal) - .field("optByteVal", &self.optByteVal) - .field("optI16Val", &self.optI16Val) - .field("optI32Val", &self.optI32Val) - .field("optI64Val", &self.optI64Val) - .field("optFloatVal", &self.optFloatVal) - .field("optDoubleVal", &self.optDoubleVal) - .field("optStringVal", &self.optStringVal) - .field("optBinaryVal", &self.optBinaryVal) - .field("optEnumVal", &self.optEnumVal) - .field("optStructVal", &self.optStructVal) - .field("optLateStructVal", &self.optLateStructVal) - .field("optListVal", &self.optListVal) - .field("optSetVal", &self.optSetVal) - .field("optMapVal", &self.optMapVal) + .debug_struct("MyStructFieldN10Patch") + .field("assign", &self.assign) + .field("clear", &self.clear) .finish() } } -unsafe impl ::std::marker::Send for self::MyStructFieldPatch {} -unsafe impl ::std::marker::Sync for self::MyStructFieldPatch {} +unsafe impl ::std::marker::Send for self::MyStructFieldN10Patch {} +unsafe impl ::std::marker::Sync for self::MyStructFieldN10Patch {} -impl ::fbthrift::GetTType for self::MyStructFieldPatch { +impl ::fbthrift::GetTType for self::MyStructFieldN10Patch { const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; } -impl ::fbthrift::GetUri for self::MyStructFieldPatch { +impl ::fbthrift::GetUri for self::MyStructFieldN10Patch { fn uri() -> &'static str { - "test.dev/fixtures/patch/MyStructFieldPatch" + "test.dev/fixtures/patch/MyStructFieldN10Patch" } } -impl

::fbthrift::Serialize

for self::MyStructFieldPatch +impl

::fbthrift::Serialize

for self::MyStructFieldN10Patch where P: ::fbthrift::ProtocolWriter, { fn write(&self, p: &mut P) { - p.write_struct_begin("MyStructFieldPatch"); - p.write_field_begin("boolVal", ::fbthrift::TType::Struct, -1); - ::fbthrift::Serialize::write(&self.boolVal, p); - p.write_field_end(); - p.write_field_begin("byteVal", ::fbthrift::TType::Struct, -2); - ::fbthrift::Serialize::write(&self.byteVal, p); - p.write_field_end(); - p.write_field_begin("i16Val", ::fbthrift::TType::Struct, -3); - ::fbthrift::Serialize::write(&self.i16Val, p); - p.write_field_end(); - p.write_field_begin("i32Val", ::fbthrift::TType::Struct, -4); - ::fbthrift::Serialize::write(&self.i32Val, p); - p.write_field_end(); - p.write_field_begin("i64Val", ::fbthrift::TType::Struct, -5); - ::fbthrift::Serialize::write(&self.i64Val, p); - p.write_field_end(); - p.write_field_begin("floatVal", ::fbthrift::TType::Struct, -6); - ::fbthrift::Serialize::write(&self.floatVal, p); - p.write_field_end(); - p.write_field_begin("doubleVal", ::fbthrift::TType::Struct, -7); - ::fbthrift::Serialize::write(&self.doubleVal, p); - p.write_field_end(); - p.write_field_begin("stringVal", ::fbthrift::TType::Struct, -8); - ::fbthrift::Serialize::write(&self.stringVal, p); - p.write_field_end(); - p.write_field_begin("binaryVal", ::fbthrift::TType::Struct, -9); - ::fbthrift::Serialize::write(&self.binaryVal, p); - p.write_field_end(); - p.write_field_begin("enumVal", ::fbthrift::TType::Struct, -10); - ::fbthrift::Serialize::write(&self.enumVal, p); - p.write_field_end(); - p.write_field_begin("structVal", ::fbthrift::TType::Struct, -11); - ::fbthrift::Serialize::write(&self.structVal, p); - p.write_field_end(); - p.write_field_begin("unionVal", ::fbthrift::TType::Struct, -12); - ::fbthrift::Serialize::write(&self.unionVal, p); - p.write_field_end(); - p.write_field_begin("lateStructVal", ::fbthrift::TType::Struct, -13); - ::fbthrift::Serialize::write(&self.lateStructVal, p); - p.write_field_end(); - p.write_field_begin("durationVal", ::fbthrift::TType::Struct, -14); - ::fbthrift::Serialize::write(&self.durationVal, p); - p.write_field_end(); - p.write_field_begin("timeVal", ::fbthrift::TType::Struct, -15); - ::fbthrift::Serialize::write(&self.timeVal, p); - p.write_field_end(); - p.write_field_begin("optBoolVal", ::fbthrift::TType::Struct, -16); - ::fbthrift::Serialize::write(&self.optBoolVal, p); - p.write_field_end(); - p.write_field_begin("optByteVal", ::fbthrift::TType::Struct, -17); - ::fbthrift::Serialize::write(&self.optByteVal, p); - p.write_field_end(); - p.write_field_begin("optI16Val", ::fbthrift::TType::Struct, -18); - ::fbthrift::Serialize::write(&self.optI16Val, p); - p.write_field_end(); - p.write_field_begin("optI32Val", ::fbthrift::TType::Struct, -19); - ::fbthrift::Serialize::write(&self.optI32Val, p); - p.write_field_end(); - p.write_field_begin("optI64Val", ::fbthrift::TType::Struct, -20); - ::fbthrift::Serialize::write(&self.optI64Val, p); - p.write_field_end(); - p.write_field_begin("optFloatVal", ::fbthrift::TType::Struct, -21); - ::fbthrift::Serialize::write(&self.optFloatVal, p); - p.write_field_end(); - p.write_field_begin("optDoubleVal", ::fbthrift::TType::Struct, -22); - ::fbthrift::Serialize::write(&self.optDoubleVal, p); - p.write_field_end(); - p.write_field_begin("optStringVal", ::fbthrift::TType::Struct, -23); - ::fbthrift::Serialize::write(&self.optStringVal, p); - p.write_field_end(); - p.write_field_begin("optBinaryVal", ::fbthrift::TType::Struct, -24); - ::fbthrift::Serialize::write(&self.optBinaryVal, p); - p.write_field_end(); - p.write_field_begin("optEnumVal", ::fbthrift::TType::Struct, -25); - ::fbthrift::Serialize::write(&self.optEnumVal, p); - p.write_field_end(); - p.write_field_begin("optStructVal", ::fbthrift::TType::Struct, -26); - ::fbthrift::Serialize::write(&self.optStructVal, p); - p.write_field_end(); - p.write_field_begin("optLateStructVal", ::fbthrift::TType::Struct, -27); - ::fbthrift::Serialize::write(&self.optLateStructVal, p); - p.write_field_end(); - p.write_field_begin("optListVal", ::fbthrift::TType::Struct, -28); - ::fbthrift::Serialize::write(&self.optListVal, p); - p.write_field_end(); - p.write_field_begin("optSetVal", ::fbthrift::TType::Struct, -29); - ::fbthrift::Serialize::write(&self.optSetVal, p); - p.write_field_end(); - p.write_field_begin("optMapVal", ::fbthrift::TType::Struct, -30); - ::fbthrift::Serialize::write(&self.optMapVal, p); - p.write_field_end(); - p.write_field_stop(); - p.write_struct_end(); - } -} - -impl

::fbthrift::Deserialize

for self::MyStructFieldPatch -where - P: ::fbthrift::ProtocolReader, -{ - fn read(p: &mut P) -> ::anyhow::Result { - static FIELDS: &[::fbthrift::Field] = &[ - ::fbthrift::Field::new("binaryVal", ::fbthrift::TType::Struct, -9), - ::fbthrift::Field::new("boolVal", ::fbthrift::TType::Struct, -1), - ::fbthrift::Field::new("byteVal", ::fbthrift::TType::Struct, -2), - ::fbthrift::Field::new("doubleVal", ::fbthrift::TType::Struct, -7), - ::fbthrift::Field::new("durationVal", ::fbthrift::TType::Struct, -14), - ::fbthrift::Field::new("enumVal", ::fbthrift::TType::Struct, -10), - ::fbthrift::Field::new("floatVal", ::fbthrift::TType::Struct, -6), - ::fbthrift::Field::new("i16Val", ::fbthrift::TType::Struct, -3), - ::fbthrift::Field::new("i32Val", ::fbthrift::TType::Struct, -4), - ::fbthrift::Field::new("i64Val", ::fbthrift::TType::Struct, -5), - ::fbthrift::Field::new("lateStructVal", ::fbthrift::TType::Struct, -13), - ::fbthrift::Field::new("optBinaryVal", ::fbthrift::TType::Struct, -24), - ::fbthrift::Field::new("optBoolVal", ::fbthrift::TType::Struct, -16), - ::fbthrift::Field::new("optByteVal", ::fbthrift::TType::Struct, -17), - ::fbthrift::Field::new("optDoubleVal", ::fbthrift::TType::Struct, -22), - ::fbthrift::Field::new("optEnumVal", ::fbthrift::TType::Struct, -25), - ::fbthrift::Field::new("optFloatVal", ::fbthrift::TType::Struct, -21), - ::fbthrift::Field::new("optI16Val", ::fbthrift::TType::Struct, -18), - ::fbthrift::Field::new("optI32Val", ::fbthrift::TType::Struct, -19), - ::fbthrift::Field::new("optI64Val", ::fbthrift::TType::Struct, -20), - ::fbthrift::Field::new("optLateStructVal", ::fbthrift::TType::Struct, -27), - ::fbthrift::Field::new("optListVal", ::fbthrift::TType::Struct, -28), - ::fbthrift::Field::new("optMapVal", ::fbthrift::TType::Struct, -30), - ::fbthrift::Field::new("optSetVal", ::fbthrift::TType::Struct, -29), - ::fbthrift::Field::new("optStringVal", ::fbthrift::TType::Struct, -23), - ::fbthrift::Field::new("optStructVal", ::fbthrift::TType::Struct, -26), - ::fbthrift::Field::new("stringVal", ::fbthrift::TType::Struct, -8), - ::fbthrift::Field::new("structVal", ::fbthrift::TType::Struct, -11), - ::fbthrift::Field::new("timeVal", ::fbthrift::TType::Struct, -15), - ::fbthrift::Field::new("unionVal", ::fbthrift::TType::Struct, -12), - ]; - let mut field_boolVal = ::std::option::Option::None; - let mut field_byteVal = ::std::option::Option::None; - let mut field_i16Val = ::std::option::Option::None; - let mut field_i32Val = ::std::option::Option::None; - let mut field_i64Val = ::std::option::Option::None; - let mut field_floatVal = ::std::option::Option::None; - let mut field_doubleVal = ::std::option::Option::None; - let mut field_stringVal = ::std::option::Option::None; - let mut field_binaryVal = ::std::option::Option::None; - let mut field_enumVal = ::std::option::Option::None; - let mut field_structVal = ::std::option::Option::None; - let mut field_unionVal = ::std::option::Option::None; - let mut field_lateStructVal = ::std::option::Option::None; - let mut field_durationVal = ::std::option::Option::None; - let mut field_timeVal = ::std::option::Option::None; - let mut field_optBoolVal = ::std::option::Option::None; - let mut field_optByteVal = ::std::option::Option::None; - let mut field_optI16Val = ::std::option::Option::None; - let mut field_optI32Val = ::std::option::Option::None; - let mut field_optI64Val = ::std::option::Option::None; - let mut field_optFloatVal = ::std::option::Option::None; - let mut field_optDoubleVal = ::std::option::Option::None; - let mut field_optStringVal = ::std::option::Option::None; - let mut field_optBinaryVal = ::std::option::Option::None; - let mut field_optEnumVal = ::std::option::Option::None; - let mut field_optStructVal = ::std::option::Option::None; - let mut field_optLateStructVal = ::std::option::Option::None; - let mut field_optListVal = ::std::option::Option::None; - let mut field_optSetVal = ::std::option::Option::None; - let mut field_optMapVal = ::std::option::Option::None; - let _ = p.read_struct_begin(|_| ())?; - loop { - let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; - match (fty, fid as ::std::primitive::i32) { - (::fbthrift::TType::Stop, _) => break, - (::fbthrift::TType::Struct, -1) => field_boolVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -2) => field_byteVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -3) => field_i16Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -4) => field_i32Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -5) => field_i64Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -6) => field_floatVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -7) => field_doubleVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -8) => field_stringVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -9) => field_binaryVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -10) => field_enumVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -11) => field_structVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -12) => field_unionVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -13) => field_lateStructVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -14) => field_durationVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -15) => field_timeVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -16) => field_optBoolVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -17) => field_optByteVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -18) => field_optI16Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -19) => field_optI32Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -20) => field_optI64Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -21) => field_optFloatVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -22) => field_optDoubleVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -23) => field_optStringVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -24) => field_optBinaryVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -25) => field_optEnumVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -26) => field_optStructVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -27) => field_optLateStructVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -28) => field_optListVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -29) => field_optSetVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (::fbthrift::TType::Struct, -30) => field_optMapVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), - (fty, _) => p.skip(fty)?, - } - p.read_field_end()?; - } - p.read_struct_end()?; - ::std::result::Result::Ok(Self { - boolVal: field_boolVal.unwrap_or_default(), - byteVal: field_byteVal.unwrap_or_default(), - i16Val: field_i16Val.unwrap_or_default(), - i32Val: field_i32Val.unwrap_or_default(), - i64Val: field_i64Val.unwrap_or_default(), - floatVal: field_floatVal.unwrap_or_default(), - doubleVal: field_doubleVal.unwrap_or_default(), - stringVal: field_stringVal.unwrap_or_default(), - binaryVal: field_binaryVal.unwrap_or_default(), - enumVal: field_enumVal.unwrap_or_default(), - structVal: field_structVal.unwrap_or_default(), - unionVal: field_unionVal.unwrap_or_default(), - lateStructVal: field_lateStructVal.unwrap_or_default(), - durationVal: field_durationVal.unwrap_or_default(), - timeVal: field_timeVal.unwrap_or_default(), - optBoolVal: field_optBoolVal.unwrap_or_default(), - optByteVal: field_optByteVal.unwrap_or_default(), - optI16Val: field_optI16Val.unwrap_or_default(), - optI32Val: field_optI32Val.unwrap_or_default(), - optI64Val: field_optI64Val.unwrap_or_default(), - optFloatVal: field_optFloatVal.unwrap_or_default(), - optDoubleVal: field_optDoubleVal.unwrap_or_default(), - optStringVal: field_optStringVal.unwrap_or_default(), - optBinaryVal: field_optBinaryVal.unwrap_or_default(), - optEnumVal: field_optEnumVal.unwrap_or_default(), - optStructVal: field_optStructVal.unwrap_or_default(), - optLateStructVal: field_optLateStructVal.unwrap_or_default(), - optListVal: field_optListVal.unwrap_or_default(), - optSetVal: field_optSetVal.unwrap_or_default(), - optMapVal: field_optMapVal.unwrap_or_default(), - _dot_dot_Default_default: self::dot_dot::OtherFields(()), - }) - } -} - - -#[allow(clippy::derivable_impls)] -impl ::std::default::Default for self::MyStructFieldN10Patch { - fn default() -> Self { - Self { - assign: ::std::option::Option::None, - clear: ::std::default::Default::default(), - _dot_dot_Default_default: self::dot_dot::OtherFields(()), - } - } -} - -impl ::std::fmt::Debug for self::MyStructFieldN10Patch { - fn fmt(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - formatter - .debug_struct("MyStructFieldN10Patch") - .field("assign", &self.assign) - .field("clear", &self.clear) - .finish() - } -} - -unsafe impl ::std::marker::Send for self::MyStructFieldN10Patch {} -unsafe impl ::std::marker::Sync for self::MyStructFieldN10Patch {} - -impl ::fbthrift::GetTType for self::MyStructFieldN10Patch { - const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; -} - -impl ::fbthrift::GetUri for self::MyStructFieldN10Patch { - fn uri() -> &'static str { - "test.dev/fixtures/patch/MyStructFieldN10Patch" - } -} - -impl

::fbthrift::Serialize

for self::MyStructFieldN10Patch -where - P: ::fbthrift::ProtocolWriter, -{ - fn write(&self, p: &mut P) { - p.write_struct_begin("MyStructFieldN10Patch"); - if let ::std::option::Option::Some(some) = &self.assign { - p.write_field_begin("assign", ::fbthrift::TType::I32, 1); - ::fbthrift::Serialize::write(some, p); - p.write_field_end(); - } - p.write_field_begin("clear", ::fbthrift::TType::Bool, 2); - ::fbthrift::Serialize::write(&self.clear, p); + p.write_struct_begin("MyStructFieldN10Patch"); + if let ::std::option::Option::Some(some) = &self.assign { + p.write_field_begin("assign", ::fbthrift::TType::I32, 1); + ::fbthrift::Serialize::write(some, p); + p.write_field_end(); + } + p.write_field_begin("clear", ::fbthrift::TType::Bool, 2); + ::fbthrift::Serialize::write(&self.clear, p); p.write_field_end(); p.write_field_stop(); p.write_struct_end(); @@ -2566,6 +2231,341 @@ where #[allow(clippy::derivable_impls)] +impl ::std::default::Default for self::MyStructFieldPatch { + fn default() -> Self { + Self { + optMapVal: ::std::default::Default::default(), + optSetVal: ::std::default::Default::default(), + optListVal: ::std::default::Default::default(), + optLateStructVal: ::std::default::Default::default(), + optStructVal: ::std::default::Default::default(), + optEnumVal: ::std::default::Default::default(), + optBinaryVal: ::std::default::Default::default(), + optStringVal: ::std::default::Default::default(), + optDoubleVal: ::std::default::Default::default(), + optFloatVal: ::std::default::Default::default(), + optI64Val: ::std::default::Default::default(), + optI32Val: ::std::default::Default::default(), + optI16Val: ::std::default::Default::default(), + optByteVal: ::std::default::Default::default(), + optBoolVal: ::std::default::Default::default(), + timeVal: ::std::default::Default::default(), + durationVal: ::std::default::Default::default(), + lateStructVal: ::std::default::Default::default(), + unionVal: ::std::default::Default::default(), + structVal: ::std::default::Default::default(), + enumVal: ::std::default::Default::default(), + binaryVal: ::std::default::Default::default(), + stringVal: ::std::default::Default::default(), + doubleVal: ::std::default::Default::default(), + floatVal: ::std::default::Default::default(), + i64Val: ::std::default::Default::default(), + i32Val: ::std::default::Default::default(), + i16Val: ::std::default::Default::default(), + byteVal: ::std::default::Default::default(), + boolVal: ::std::default::Default::default(), + _dot_dot_Default_default: self::dot_dot::OtherFields(()), + } + } +} + +impl ::std::fmt::Debug for self::MyStructFieldPatch { + fn fmt(&self, formatter: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + formatter + .debug_struct("MyStructFieldPatch") + .field("optMapVal", &self.optMapVal) + .field("optSetVal", &self.optSetVal) + .field("optListVal", &self.optListVal) + .field("optLateStructVal", &self.optLateStructVal) + .field("optStructVal", &self.optStructVal) + .field("optEnumVal", &self.optEnumVal) + .field("optBinaryVal", &self.optBinaryVal) + .field("optStringVal", &self.optStringVal) + .field("optDoubleVal", &self.optDoubleVal) + .field("optFloatVal", &self.optFloatVal) + .field("optI64Val", &self.optI64Val) + .field("optI32Val", &self.optI32Val) + .field("optI16Val", &self.optI16Val) + .field("optByteVal", &self.optByteVal) + .field("optBoolVal", &self.optBoolVal) + .field("timeVal", &self.timeVal) + .field("durationVal", &self.durationVal) + .field("lateStructVal", &self.lateStructVal) + .field("unionVal", &self.unionVal) + .field("structVal", &self.structVal) + .field("enumVal", &self.enumVal) + .field("binaryVal", &self.binaryVal) + .field("stringVal", &self.stringVal) + .field("doubleVal", &self.doubleVal) + .field("floatVal", &self.floatVal) + .field("i64Val", &self.i64Val) + .field("i32Val", &self.i32Val) + .field("i16Val", &self.i16Val) + .field("byteVal", &self.byteVal) + .field("boolVal", &self.boolVal) + .finish() + } +} + +unsafe impl ::std::marker::Send for self::MyStructFieldPatch {} +unsafe impl ::std::marker::Sync for self::MyStructFieldPatch {} + +impl ::fbthrift::GetTType for self::MyStructFieldPatch { + const TTYPE: ::fbthrift::TType = ::fbthrift::TType::Struct; +} + +impl ::fbthrift::GetUri for self::MyStructFieldPatch { + fn uri() -> &'static str { + "test.dev/fixtures/patch/MyStructFieldPatch" + } +} + +impl

::fbthrift::Serialize

for self::MyStructFieldPatch +where + P: ::fbthrift::ProtocolWriter, +{ + fn write(&self, p: &mut P) { + p.write_struct_begin("MyStructFieldPatch"); + p.write_field_begin("optMapVal", ::fbthrift::TType::Struct, -30); + ::fbthrift::Serialize::write(&self.optMapVal, p); + p.write_field_end(); + p.write_field_begin("optSetVal", ::fbthrift::TType::Struct, -29); + ::fbthrift::Serialize::write(&self.optSetVal, p); + p.write_field_end(); + p.write_field_begin("optListVal", ::fbthrift::TType::Struct, -28); + ::fbthrift::Serialize::write(&self.optListVal, p); + p.write_field_end(); + p.write_field_begin("optLateStructVal", ::fbthrift::TType::Struct, -27); + ::fbthrift::Serialize::write(&self.optLateStructVal, p); + p.write_field_end(); + p.write_field_begin("optStructVal", ::fbthrift::TType::Struct, -26); + ::fbthrift::Serialize::write(&self.optStructVal, p); + p.write_field_end(); + p.write_field_begin("optEnumVal", ::fbthrift::TType::Struct, -25); + ::fbthrift::Serialize::write(&self.optEnumVal, p); + p.write_field_end(); + p.write_field_begin("optBinaryVal", ::fbthrift::TType::Struct, -24); + ::fbthrift::Serialize::write(&self.optBinaryVal, p); + p.write_field_end(); + p.write_field_begin("optStringVal", ::fbthrift::TType::Struct, -23); + ::fbthrift::Serialize::write(&self.optStringVal, p); + p.write_field_end(); + p.write_field_begin("optDoubleVal", ::fbthrift::TType::Struct, -22); + ::fbthrift::Serialize::write(&self.optDoubleVal, p); + p.write_field_end(); + p.write_field_begin("optFloatVal", ::fbthrift::TType::Struct, -21); + ::fbthrift::Serialize::write(&self.optFloatVal, p); + p.write_field_end(); + p.write_field_begin("optI64Val", ::fbthrift::TType::Struct, -20); + ::fbthrift::Serialize::write(&self.optI64Val, p); + p.write_field_end(); + p.write_field_begin("optI32Val", ::fbthrift::TType::Struct, -19); + ::fbthrift::Serialize::write(&self.optI32Val, p); + p.write_field_end(); + p.write_field_begin("optI16Val", ::fbthrift::TType::Struct, -18); + ::fbthrift::Serialize::write(&self.optI16Val, p); + p.write_field_end(); + p.write_field_begin("optByteVal", ::fbthrift::TType::Struct, -17); + ::fbthrift::Serialize::write(&self.optByteVal, p); + p.write_field_end(); + p.write_field_begin("optBoolVal", ::fbthrift::TType::Struct, -16); + ::fbthrift::Serialize::write(&self.optBoolVal, p); + p.write_field_end(); + p.write_field_begin("timeVal", ::fbthrift::TType::Struct, -15); + ::fbthrift::Serialize::write(&self.timeVal, p); + p.write_field_end(); + p.write_field_begin("durationVal", ::fbthrift::TType::Struct, -14); + ::fbthrift::Serialize::write(&self.durationVal, p); + p.write_field_end(); + p.write_field_begin("lateStructVal", ::fbthrift::TType::Struct, -13); + ::fbthrift::Serialize::write(&self.lateStructVal, p); + p.write_field_end(); + p.write_field_begin("unionVal", ::fbthrift::TType::Struct, -12); + ::fbthrift::Serialize::write(&self.unionVal, p); + p.write_field_end(); + p.write_field_begin("structVal", ::fbthrift::TType::Struct, -11); + ::fbthrift::Serialize::write(&self.structVal, p); + p.write_field_end(); + p.write_field_begin("enumVal", ::fbthrift::TType::Struct, -10); + ::fbthrift::Serialize::write(&self.enumVal, p); + p.write_field_end(); + p.write_field_begin("binaryVal", ::fbthrift::TType::Struct, -9); + ::fbthrift::Serialize::write(&self.binaryVal, p); + p.write_field_end(); + p.write_field_begin("stringVal", ::fbthrift::TType::Struct, -8); + ::fbthrift::Serialize::write(&self.stringVal, p); + p.write_field_end(); + p.write_field_begin("doubleVal", ::fbthrift::TType::Struct, -7); + ::fbthrift::Serialize::write(&self.doubleVal, p); + p.write_field_end(); + p.write_field_begin("floatVal", ::fbthrift::TType::Struct, -6); + ::fbthrift::Serialize::write(&self.floatVal, p); + p.write_field_end(); + p.write_field_begin("i64Val", ::fbthrift::TType::Struct, -5); + ::fbthrift::Serialize::write(&self.i64Val, p); + p.write_field_end(); + p.write_field_begin("i32Val", ::fbthrift::TType::Struct, -4); + ::fbthrift::Serialize::write(&self.i32Val, p); + p.write_field_end(); + p.write_field_begin("i16Val", ::fbthrift::TType::Struct, -3); + ::fbthrift::Serialize::write(&self.i16Val, p); + p.write_field_end(); + p.write_field_begin("byteVal", ::fbthrift::TType::Struct, -2); + ::fbthrift::Serialize::write(&self.byteVal, p); + p.write_field_end(); + p.write_field_begin("boolVal", ::fbthrift::TType::Struct, -1); + ::fbthrift::Serialize::write(&self.boolVal, p); + p.write_field_end(); + p.write_field_stop(); + p.write_struct_end(); + } +} + +impl

::fbthrift::Deserialize

for self::MyStructFieldPatch +where + P: ::fbthrift::ProtocolReader, +{ + fn read(p: &mut P) -> ::anyhow::Result { + static FIELDS: &[::fbthrift::Field] = &[ + ::fbthrift::Field::new("binaryVal", ::fbthrift::TType::Struct, -9), + ::fbthrift::Field::new("boolVal", ::fbthrift::TType::Struct, -1), + ::fbthrift::Field::new("byteVal", ::fbthrift::TType::Struct, -2), + ::fbthrift::Field::new("doubleVal", ::fbthrift::TType::Struct, -7), + ::fbthrift::Field::new("durationVal", ::fbthrift::TType::Struct, -14), + ::fbthrift::Field::new("enumVal", ::fbthrift::TType::Struct, -10), + ::fbthrift::Field::new("floatVal", ::fbthrift::TType::Struct, -6), + ::fbthrift::Field::new("i16Val", ::fbthrift::TType::Struct, -3), + ::fbthrift::Field::new("i32Val", ::fbthrift::TType::Struct, -4), + ::fbthrift::Field::new("i64Val", ::fbthrift::TType::Struct, -5), + ::fbthrift::Field::new("lateStructVal", ::fbthrift::TType::Struct, -13), + ::fbthrift::Field::new("optBinaryVal", ::fbthrift::TType::Struct, -24), + ::fbthrift::Field::new("optBoolVal", ::fbthrift::TType::Struct, -16), + ::fbthrift::Field::new("optByteVal", ::fbthrift::TType::Struct, -17), + ::fbthrift::Field::new("optDoubleVal", ::fbthrift::TType::Struct, -22), + ::fbthrift::Field::new("optEnumVal", ::fbthrift::TType::Struct, -25), + ::fbthrift::Field::new("optFloatVal", ::fbthrift::TType::Struct, -21), + ::fbthrift::Field::new("optI16Val", ::fbthrift::TType::Struct, -18), + ::fbthrift::Field::new("optI32Val", ::fbthrift::TType::Struct, -19), + ::fbthrift::Field::new("optI64Val", ::fbthrift::TType::Struct, -20), + ::fbthrift::Field::new("optLateStructVal", ::fbthrift::TType::Struct, -27), + ::fbthrift::Field::new("optListVal", ::fbthrift::TType::Struct, -28), + ::fbthrift::Field::new("optMapVal", ::fbthrift::TType::Struct, -30), + ::fbthrift::Field::new("optSetVal", ::fbthrift::TType::Struct, -29), + ::fbthrift::Field::new("optStringVal", ::fbthrift::TType::Struct, -23), + ::fbthrift::Field::new("optStructVal", ::fbthrift::TType::Struct, -26), + ::fbthrift::Field::new("stringVal", ::fbthrift::TType::Struct, -8), + ::fbthrift::Field::new("structVal", ::fbthrift::TType::Struct, -11), + ::fbthrift::Field::new("timeVal", ::fbthrift::TType::Struct, -15), + ::fbthrift::Field::new("unionVal", ::fbthrift::TType::Struct, -12), + ]; + let mut field_optMapVal = ::std::option::Option::None; + let mut field_optSetVal = ::std::option::Option::None; + let mut field_optListVal = ::std::option::Option::None; + let mut field_optLateStructVal = ::std::option::Option::None; + let mut field_optStructVal = ::std::option::Option::None; + let mut field_optEnumVal = ::std::option::Option::None; + let mut field_optBinaryVal = ::std::option::Option::None; + let mut field_optStringVal = ::std::option::Option::None; + let mut field_optDoubleVal = ::std::option::Option::None; + let mut field_optFloatVal = ::std::option::Option::None; + let mut field_optI64Val = ::std::option::Option::None; + let mut field_optI32Val = ::std::option::Option::None; + let mut field_optI16Val = ::std::option::Option::None; + let mut field_optByteVal = ::std::option::Option::None; + let mut field_optBoolVal = ::std::option::Option::None; + let mut field_timeVal = ::std::option::Option::None; + let mut field_durationVal = ::std::option::Option::None; + let mut field_lateStructVal = ::std::option::Option::None; + let mut field_unionVal = ::std::option::Option::None; + let mut field_structVal = ::std::option::Option::None; + let mut field_enumVal = ::std::option::Option::None; + let mut field_binaryVal = ::std::option::Option::None; + let mut field_stringVal = ::std::option::Option::None; + let mut field_doubleVal = ::std::option::Option::None; + let mut field_floatVal = ::std::option::Option::None; + let mut field_i64Val = ::std::option::Option::None; + let mut field_i32Val = ::std::option::Option::None; + let mut field_i16Val = ::std::option::Option::None; + let mut field_byteVal = ::std::option::Option::None; + let mut field_boolVal = ::std::option::Option::None; + let _ = p.read_struct_begin(|_| ())?; + loop { + let (_, fty, fid) = p.read_field_begin(|_| (), FIELDS)?; + match (fty, fid as ::std::primitive::i32) { + (::fbthrift::TType::Stop, _) => break, + (::fbthrift::TType::Struct, -30) => field_optMapVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -29) => field_optSetVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -28) => field_optListVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -27) => field_optLateStructVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -26) => field_optStructVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -25) => field_optEnumVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -24) => field_optBinaryVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -23) => field_optStringVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -22) => field_optDoubleVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -21) => field_optFloatVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -20) => field_optI64Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -19) => field_optI32Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -18) => field_optI16Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -17) => field_optByteVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -16) => field_optBoolVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -15) => field_timeVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -14) => field_durationVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -13) => field_lateStructVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -12) => field_unionVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -11) => field_structVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -10) => field_enumVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -9) => field_binaryVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -8) => field_stringVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -7) => field_doubleVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -6) => field_floatVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -5) => field_i64Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -4) => field_i32Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -3) => field_i16Val = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -2) => field_byteVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (::fbthrift::TType::Struct, -1) => field_boolVal = ::std::option::Option::Some(::fbthrift::Deserialize::read(p)?), + (fty, _) => p.skip(fty)?, + } + p.read_field_end()?; + } + p.read_struct_end()?; + ::std::result::Result::Ok(Self { + optMapVal: field_optMapVal.unwrap_or_default(), + optSetVal: field_optSetVal.unwrap_or_default(), + optListVal: field_optListVal.unwrap_or_default(), + optLateStructVal: field_optLateStructVal.unwrap_or_default(), + optStructVal: field_optStructVal.unwrap_or_default(), + optEnumVal: field_optEnumVal.unwrap_or_default(), + optBinaryVal: field_optBinaryVal.unwrap_or_default(), + optStringVal: field_optStringVal.unwrap_or_default(), + optDoubleVal: field_optDoubleVal.unwrap_or_default(), + optFloatVal: field_optFloatVal.unwrap_or_default(), + optI64Val: field_optI64Val.unwrap_or_default(), + optI32Val: field_optI32Val.unwrap_or_default(), + optI16Val: field_optI16Val.unwrap_or_default(), + optByteVal: field_optByteVal.unwrap_or_default(), + optBoolVal: field_optBoolVal.unwrap_or_default(), + timeVal: field_timeVal.unwrap_or_default(), + durationVal: field_durationVal.unwrap_or_default(), + lateStructVal: field_lateStructVal.unwrap_or_default(), + unionVal: field_unionVal.unwrap_or_default(), + structVal: field_structVal.unwrap_or_default(), + enumVal: field_enumVal.unwrap_or_default(), + binaryVal: field_binaryVal.unwrap_or_default(), + stringVal: field_stringVal.unwrap_or_default(), + doubleVal: field_doubleVal.unwrap_or_default(), + floatVal: field_floatVal.unwrap_or_default(), + i64Val: field_i64Val.unwrap_or_default(), + i32Val: field_i32Val.unwrap_or_default(), + i16Val: field_i16Val.unwrap_or_default(), + byteVal: field_byteVal.unwrap_or_default(), + boolVal: field_boolVal.unwrap_or_default(), + _dot_dot_Default_default: self::dot_dot::OtherFields(()), + }) + } +} + + +#[allow(clippy::derivable_impls)] impl ::std::default::Default for self::MyStructPatch { fn default() -> Self { Self { -- 2.11.4.GIT