<?hh
/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */

namespace facebook\thrift\op;

/**
 * An annotation that indicates a patch representation should be generated for
 * the associated definition.
 * 
 * This is deprecated and we should use the new codegen workflow instead.
 *
 * Original thrift struct:-
 * GeneratePatch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/GeneratePatch'))>>
class GeneratePatch implements \IThriftSyncStruct, \IThriftStructMetadata {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
  ];
  const dict<string, int> FIELDMAP = dict[
  ];

  const type TConstructorShape = shape(
  );

  const int STRUCTURAL_ID = 957977401221134810;

  public function __construct()[] {
  }

  public static function withDefaultValues()[]: this {
    return new static();
  }

  public static function fromShape(self::TConstructorShape $shape)[]: this {
    return new static(
    );
  }

  public function getName()[]: string {
    return 'GeneratePatch';
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.GeneratePatch",
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\Program' => \facebook\thrift\annotation\Program::fromShape(
          shape(
          )
        ),
        '\facebook\thrift\annotation\Structured' => \facebook\thrift\annotation\Structured::fromShape(
          shape(
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * An annotation that indicates a patch representation should be generated for
 * the associated definition. Similar to `GeneratePatch` but only works for new
 * codegen workflow and it won't work on package level.
 *
 * Original thrift struct:-
 * GeneratePatchNew
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/GeneratePatchNew'))>>
class GeneratePatchNew implements \IThriftSyncStruct, \IThriftStructMetadata {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
  ];
  const dict<string, int> FIELDMAP = dict[
  ];

  const type TConstructorShape = shape(
  );

  const int STRUCTURAL_ID = 957977401221134810;

  public function __construct()[] {
  }

  public static function withDefaultValues()[]: this {
    return new static();
  }

  public static function fromShape(self::TConstructorShape $shape)[]: this {
    return new static(
    );
  }

  public function getName()[]: string {
    return 'GeneratePatchNew';
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.GeneratePatchNew",
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\Structured' => \facebook\thrift\annotation\Structured::fromShape(
          shape(
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * Original thrift struct:-
 * AssignOnlyPatch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/AssignOnlyPatch'))>>
class AssignOnlyPatch implements \IThriftSyncStruct, \IThriftStructMetadata {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
  ];
  const dict<string, int> FIELDMAP = dict[
  ];

  const type TConstructorShape = shape(
  );

  const int STRUCTURAL_ID = 957977401221134810;

  public function __construct()[] {
  }

  public static function withDefaultValues()[]: this {
    return new static();
  }

  public static function fromShape(self::TConstructorShape $shape)[]: this {
    return new static(
    );
  }

  public function getName()[]: string {
    return 'AssignOnlyPatch';
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.AssignOnlyPatch",
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\Field' => \facebook\thrift\annotation\Field::fromShape(
          shape(
          )
        ),
        '\facebook\thrift\annotation\Structured' => \facebook\thrift\annotation\Structured::fromShape(
          shape(
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * A patch for a boolean value.
 *
 * Original thrift struct:-
 * BoolPatch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/BoolPatch'))>>
class BoolPatch implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftStructWithClearTerseFields {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'assign',
      'type' => \TType::BOOL,
    ),
    2 => shape(
      'var' => 'clear',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
    9 => shape(
      'var' => 'invert',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'assign' => 1,
    'clear' => 2,
    'invert' => 9,
  ];

  const type TConstructorShape = shape(
    ?'assign' => ?bool,
    ?'clear' => ?bool,
    ?'invert' => ?bool,
  );

  const int STRUCTURAL_ID = 6587786969423386652;
  /**
   * Assigns to a (set) value.
   * 
   * If set, all other patch operations are ignored.
   * 
   * Note: Only modifies set field values.
   * 
   * Original thrift field:-
   * 1: bool assign
   */
  public ?bool $assign;
  /**
   * Clear any set value.
   * 
   * Original thrift field:-
   * 2: bool clear
   */
  public bool $clear;
  /**
   * If the bool value should be inverted.
   * 
   * Original thrift field:-
   * 9: bool invert
   */
  public bool $invert;

  public function __construct(?bool $assign = null, ?bool $clear = null, ?bool $invert = null)[] {
    $this->assign = $assign;
    $this->clear = $clear ?? false;
    $this->invert = $invert ?? 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'),
      Shapes::idx($shape, 'invert'),
    );
  }

  public function getName()[]: string {
    return 'BoolPatch';
  }

  public function clearTerseFields()[write_props]: void {
    $this->clear = false;
    $this->invert = false;
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.BoolPatch",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BOOL_TYPE,
                )
              ),
              "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",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 9,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BOOL_TYPE,
                )
              ),
              "name" => "invert",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\cpp\Adapter' => \facebook\thrift\annotation\cpp\Adapter::fromShape(
          shape(
            "name" => "::apache::thrift::op::detail::BoolPatchAdapter<::apache::thrift::op::BoolPatchStruct>",
            "underlyingName" => "BoolPatchStruct",
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * A patch for an 8-bit integer value.
 *
 * Original thrift struct:-
 * BytePatch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/BytePatch'))>>
class BytePatch implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftStructWithClearTerseFields {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'assign',
      'type' => \TType::BYTE,
    ),
    2 => shape(
      'var' => 'clear',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
    8 => shape(
      'var' => 'add',
      'is_terse' => true,
      'type' => \TType::BYTE,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'assign' => 1,
    'clear' => 2,
    'add' => 8,
  ];

  const type TConstructorShape = shape(
    ?'assign' => ?int,
    ?'clear' => ?bool,
    ?'add' => ?int,
  );

  const int STRUCTURAL_ID = 353839682464366106;
  /**
   * Assigns to a (set) value.
   * 
   * If set, all other patch operations are ignored.
   * 
   * Note: Only modifies set field values.
   * 
   * Original thrift field:-
   * 1: byte assign
   */
  public ?int $assign;
  /**
   * Clear any set value.
   * 
   * Original thrift field:-
   * 2: bool clear
   */
  public bool $clear;
  /**
   * Add to a given value.
   * 
   * Original thrift field:-
   * 8: byte add
   */
  public int $add;

  public function __construct(?int $assign = null, ?bool $clear = null, ?int $add = null)[] {
    $this->assign = $assign;
    $this->clear = $clear ?? false;
    $this->add = $add ?? 0;
  }

  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'),
    );
  }

  public function getName()[]: string {
    return 'BytePatch';
  }

  public function clearTerseFields()[write_props]: void {
    $this->clear = false;
    $this->add = 0;
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.BytePatch",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BYTE_TYPE,
                )
              ),
              "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",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 8,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BYTE_TYPE,
                )
              ),
              "name" => "add",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\cpp\Adapter' => \facebook\thrift\annotation\cpp\Adapter::fromShape(
          shape(
            "name" => "::apache::thrift::op::detail::NumberPatchAdapter<::apache::thrift::op::BytePatchStruct>",
            "underlyingName" => "BytePatchStruct",
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * A patch for a 16-bit integer value.
 *
 * Original thrift struct:-
 * I16Patch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/I16Patch'))>>
class I16Patch implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftStructWithClearTerseFields {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'assign',
      'type' => \TType::I16,
    ),
    2 => shape(
      'var' => 'clear',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
    8 => shape(
      'var' => 'add',
      'is_terse' => true,
      'type' => \TType::I16,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'assign' => 1,
    'clear' => 2,
    'add' => 8,
  ];

  const type TConstructorShape = shape(
    ?'assign' => ?int,
    ?'clear' => ?bool,
    ?'add' => ?int,
  );

  const int STRUCTURAL_ID = 218422147056489009;
  /**
   * Assigns to a (set) value.
   * 
   * If set, all other patch operations are ignored.
   * 
   * Note: Only modifies set field values.
   * 
   * Original thrift field:-
   * 1: i16 assign
   */
  public ?int $assign;
  /**
   * Clear any set value.
   * 
   * Original thrift field:-
   * 2: bool clear
   */
  public bool $clear;
  /**
   * Add to a given value.
   * 
   * Original thrift field:-
   * 8: i16 add
   */
  public int $add;

  public function __construct(?int $assign = null, ?bool $clear = null, ?int $add = null)[] {
    $this->assign = $assign;
    $this->clear = $clear ?? false;
    $this->add = $add ?? 0;
  }

  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'),
    );
  }

  public function getName()[]: string {
    return 'I16Patch';
  }

  public function clearTerseFields()[write_props]: void {
    $this->clear = false;
    $this->add = 0;
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.I16Patch",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE,
                )
              ),
              "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",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 8,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I16_TYPE,
                )
              ),
              "name" => "add",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\cpp\Adapter' => \facebook\thrift\annotation\cpp\Adapter::fromShape(
          shape(
            "name" => "::apache::thrift::op::detail::NumberPatchAdapter<::apache::thrift::op::I16PatchStruct>",
            "underlyingName" => "I16PatchStruct",
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * A patch for a 32-bit integer value.
 *
 * Original thrift struct:-
 * I32Patch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/I32Patch'))>>
class I32Patch implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftStructWithClearTerseFields {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'assign',
      'type' => \TType::I32,
    ),
    2 => shape(
      'var' => 'clear',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
    8 => shape(
      'var' => 'add',
      'is_terse' => true,
      'type' => \TType::I32,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'assign' => 1,
    'clear' => 2,
    'add' => 8,
  ];

  const type TConstructorShape = shape(
    ?'assign' => ?int,
    ?'clear' => ?bool,
    ?'add' => ?int,
  );

  const int STRUCTURAL_ID = 8147514463397038431;
  /**
   * Assigns to a (set) value.
   * 
   * If set, all other patch operations are ignored.
   * 
   * Note: Only modifies set field values.
   * 
   * Original thrift field:-
   * 1: i32 assign
   */
  public ?int $assign;
  /**
   * Clears any set value.
   * 
   * Original thrift field:-
   * 2: bool clear
   */
  public bool $clear;
  /**
   * Add to a given value.
   * 
   * Original thrift field:-
   * 8: i32 add
   */
  public int $add;

  public function __construct(?int $assign = null, ?bool $clear = null, ?int $add = null)[] {
    $this->assign = $assign;
    $this->clear = $clear ?? false;
    $this->add = $add ?? 0;
  }

  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'),
    );
  }

  public function getName()[]: string {
    return 'I32Patch';
  }

  public function clearTerseFields()[write_props]: void {
    $this->clear = false;
    $this->add = 0;
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.I32Patch",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                )
              ),
              "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",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 8,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                )
              ),
              "name" => "add",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\cpp\Adapter' => \facebook\thrift\annotation\cpp\Adapter::fromShape(
          shape(
            "name" => "::apache::thrift::op::detail::NumberPatchAdapter<::apache::thrift::op::I32PatchStruct>",
            "underlyingName" => "I32PatchStruct",
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * A patch for a 64-bit integer value.
 *
 * Original thrift struct:-
 * I64Patch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/I64Patch'))>>
class I64Patch implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftStructWithClearTerseFields {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'assign',
      'type' => \TType::I64,
    ),
    2 => shape(
      'var' => 'clear',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
    8 => shape(
      'var' => 'add',
      'is_terse' => true,
      'type' => \TType::I64,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'assign' => 1,
    'clear' => 2,
    'add' => 8,
  ];

  const type TConstructorShape = shape(
    ?'assign' => ?int,
    ?'clear' => ?bool,
    ?'add' => ?int,
  );

  const int STRUCTURAL_ID = 3463481380739863248;
  /**
   * Assigns to a (set) value.
   * 
   * If set, all other patch operations are ignored.
   * 
   * Note: Only modifies set field values.
   * 
   * Original thrift field:-
   * 1: i64 assign
   */
  public ?int $assign;
  /**
   * Clear any set value.
   * 
   * Original thrift field:-
   * 2: bool clear
   */
  public bool $clear;
  /**
   * Add to a given value.
   * 
   * Original thrift field:-
   * 8: i64 add
   */
  public int $add;

  public function __construct(?int $assign = null, ?bool $clear = null, ?int $add = null)[] {
    $this->assign = $assign;
    $this->clear = $clear ?? false;
    $this->add = $add ?? 0;
  }

  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'),
    );
  }

  public function getName()[]: string {
    return 'I64Patch';
  }

  public function clearTerseFields()[write_props]: void {
    $this->clear = false;
    $this->add = 0;
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.I64Patch",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I64_TYPE,
                )
              ),
              "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",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 8,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I64_TYPE,
                )
              ),
              "name" => "add",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\cpp\Adapter' => \facebook\thrift\annotation\cpp\Adapter::fromShape(
          shape(
            "name" => "::apache::thrift::op::detail::NumberPatchAdapter<::apache::thrift::op::I64PatchStruct>",
            "underlyingName" => "I64PatchStruct",
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * A patch for a 32-bit floating point value.
 *
 * Original thrift struct:-
 * FloatPatch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/FloatPatch'))>>
class FloatPatch implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftStructWithClearTerseFields {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'assign',
      'type' => \TType::FLOAT,
    ),
    2 => shape(
      'var' => 'clear',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
    8 => shape(
      'var' => 'add',
      'is_terse' => true,
      'type' => \TType::FLOAT,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'assign' => 1,
    'clear' => 2,
    'add' => 8,
  ];

  const type TConstructorShape = shape(
    ?'assign' => ?float,
    ?'clear' => ?bool,
    ?'add' => ?float,
  );

  const int STRUCTURAL_ID = 2148458437976210697;
  /**
   * Assigns to a (set) value.
   * 
   * If set, all other patch operations are ignored.
   * 
   * Note: Only modifies set field values.
   * 
   * Original thrift field:-
   * 1: float assign
   */
  public ?float $assign;
  /**
   * Clear any set value.
   * 
   * Original thrift field:-
   * 2: bool clear
   */
  public bool $clear;
  /**
   * Add to a given value.
   * 
   * Original thrift field:-
   * 8: float add
   */
  public float $add;

  public function __construct(?float $assign = null, ?bool $clear = null, ?float $add = null)[] {
    $this->assign = $assign;
    $this->clear = $clear ?? false;
    $this->add = $add ?? 0.0;
  }

  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'),
    );
  }

  public function getName()[]: string {
    return 'FloatPatch';
  }

  public function clearTerseFields()[write_props]: void {
    $this->clear = false;
    $this->add = 0.0;
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.FloatPatch",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_FLOAT_TYPE,
                )
              ),
              "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",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 8,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_FLOAT_TYPE,
                )
              ),
              "name" => "add",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\cpp\Adapter' => \facebook\thrift\annotation\cpp\Adapter::fromShape(
          shape(
            "name" => "::apache::thrift::op::detail::NumberPatchAdapter<::apache::thrift::op::FloatPatchStruct>",
            "underlyingName" => "FloatPatchStruct",
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * A patch for an 64-bit floating point value.
 *
 * Original thrift struct:-
 * DoublePatch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/DoublePatch'))>>
class DoublePatch implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftStructWithClearTerseFields {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'assign',
      'type' => \TType::DOUBLE,
    ),
    2 => shape(
      'var' => 'clear',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
    8 => shape(
      'var' => 'add',
      'is_terse' => true,
      'type' => \TType::DOUBLE,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'assign' => 1,
    'clear' => 2,
    'add' => 8,
  ];

  const type TConstructorShape = shape(
    ?'assign' => ?float,
    ?'clear' => ?bool,
    ?'add' => ?float,
  );

  const int STRUCTURAL_ID = 5393538735552286670;
  /**
   * Assigns to a (set) value.
   * 
   * If set, all other patch operations are ignored.
   * 
   * Note: Only modifies set field values.
   * 
   * Original thrift field:-
   * 1: double assign
   */
  public ?float $assign;
  /**
   * Clear any set value.
   * 
   * Original thrift field:-
   * 2: bool clear
   */
  public bool $clear;
  /**
   * Add to a given value.
   * 
   * Original thrift field:-
   * 8: double add
   */
  public float $add;

  public function __construct(?float $assign = null, ?bool $clear = null, ?float $add = null)[] {
    $this->assign = $assign;
    $this->clear = $clear ?? false;
    $this->add = $add ?? 0.0;
  }

  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'),
    );
  }

  public function getName()[]: string {
    return 'DoublePatch';
  }

  public function clearTerseFields()[write_props]: void {
    $this->clear = false;
    $this->add = 0.0;
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.DoublePatch",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_DOUBLE_TYPE,
                )
              ),
              "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",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 8,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_DOUBLE_TYPE,
                )
              ),
              "name" => "add",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\cpp\Adapter' => \facebook\thrift\annotation\cpp\Adapter::fromShape(
          shape(
            "name" => "::apache::thrift::op::detail::NumberPatchAdapter<::apache::thrift::op::DoublePatchStruct>",
            "underlyingName" => "DoublePatchStruct",
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * A patch for a string value.
 *
 * Original thrift struct:-
 * StringPatch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/StringPatch'))>>
class StringPatch implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftStructWithClearTerseFields {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'assign',
      'type' => \TType::STRING,
    ),
    2 => shape(
      'var' => 'clear',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
    8 => shape(
      'var' => 'prepend',
      'is_terse' => true,
      'type' => \TType::STRING,
    ),
    9 => shape(
      'var' => 'append',
      'is_terse' => true,
      'type' => \TType::STRING,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'assign' => 1,
    'clear' => 2,
    'prepend' => 8,
    'append' => 9,
  ];

  const type TConstructorShape = shape(
    ?'assign' => ?string,
    ?'clear' => ?bool,
    ?'prepend' => ?string,
    ?'append' => ?string,
  );

  const int STRUCTURAL_ID = 4803569377705535564;
  /**
   * Assigns to a (set) value.
   * 
   * If set, all other patch operations are ignored.
   * 
   * Note: Only modifies set field values.
   * 
   * Original thrift field:-
   * 1: string assign
   */
  public ?string $assign;
  /**
   * Clear a given string.
   * 
   * Original thrift field:-
   * 2: bool clear
   */
  public bool $clear;
  /**
   * Prepend to a given value.
   * 
   * Original thrift field:-
   * 8: string prepend
   */
  public string $prepend;
  /**
   * Append to a given value.
   * 
   * Original thrift field:-
   * 9: string append
   */
  public string $append;

  public function __construct(?string $assign = null, ?bool $clear = null, ?string $prepend = null, ?string $append = null)[] {
    $this->assign = $assign;
    $this->clear = $clear ?? false;
    $this->prepend = $prepend ?? '';
    $this->append = $append ?? '';
  }

  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, 'prepend'),
      Shapes::idx($shape, 'append'),
    );
  }

  public function getName()[]: string {
    return 'StringPatch';
  }

  public function clearTerseFields()[write_props]: void {
    $this->clear = false;
    $this->prepend = '';
    $this->append = '';
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.StringPatch",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                )
              ),
              "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",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 8,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                )
              ),
              "name" => "prepend",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 9,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                )
              ),
              "name" => "append",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\cpp\Adapter' => \facebook\thrift\annotation\cpp\Adapter::fromShape(
          shape(
            "name" => "::apache::thrift::op::detail::StringPatchAdapter<::apache::thrift::op::StringPatchStruct>",
            "underlyingName" => "StringPatchStruct",
          )
        ),
      ],
      'fields' => dict[
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * A patch for a binary value.
 *
 * Original thrift struct:-
 * BinaryPatch
 */
<<\ThriftTypeInfo(shape('uri' => 'facebook.com/thrift/op/BinaryPatch'))>>
class BinaryPatch implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftStructWithClearTerseFields {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'assign',
      'type' => \TType::STRING,
      'is_binary' => true,
    ),
    2 => shape(
      'var' => 'clear',
      'is_terse' => true,
      'type' => \TType::BOOL,
    ),
    8 => shape(
      'var' => 'prepend',
      'is_terse' => true,
      'type' => \TType::STRING,
      'is_binary' => true,
    ),
    9 => shape(
      'var' => 'append',
      'is_terse' => true,
      'type' => \TType::STRING,
      'is_binary' => true,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'assign' => 1,
    'clear' => 2,
    'prepend' => 8,
    'append' => 9,
  ];

  const type TConstructorShape = shape(
    ?'assign' => ?string,
    ?'clear' => ?bool,
    ?'prepend' => ?string,
    ?'append' => ?string,
  );

  const int STRUCTURAL_ID = 3833420858319564148;
  /**
   * Assigns to a (set) value.
   * 
   * If set, all other patch operations are ignored.
   * 
   * Note: Only modifies set field values.
   * 
   * Original thrift field:-
   * 1: standard.ByteBuffer assign
   */
  public ?string $assign;
  /**
   * Clear a given binary.
   * 
   * Original thrift field:-
   * 2: bool clear
   */
  public bool $clear;
  /**
   * Prepend to a given value.
   * 
   * Original thrift field:-
   * 8: standard.ByteBuffer prepend
   */
  public string $prepend;
  /**
   * Append to a given value.
   * 
   * Original thrift field:-
   * 9: standard.ByteBuffer append
   */
  public string $append;

  public function __construct(?string $assign = null, ?bool $clear = null, ?string $prepend = null, ?string $append = null)[] {
    $this->assign = $assign;
    $this->clear = $clear ?? false;
    $this->prepend = $prepend ?? '';
    $this->append = $append ?? '';
  }

  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, 'prepend'),
      Shapes::idx($shape, 'append'),
    );
  }

  public function getName()[]: string {
    return 'BinaryPatch';
  }

  public function clearTerseFields()[write_props]: void {
    $this->clear = false;
    $this->prepend = '';
    $this->append = '';
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "patch.BinaryPatch",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_typedef" => \tmeta_ThriftTypedefType::fromShape(
                    shape(
                      "name" => "standard.ByteBuffer",
                      "underlyingType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BINARY_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "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",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 8,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_typedef" => \tmeta_ThriftTypedefType::fromShape(
                    shape(
                      "name" => "standard.ByteBuffer",
                      "underlyingType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BINARY_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "prepend",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 9,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_typedef" => \tmeta_ThriftTypedefType::fromShape(
                    shape(
                      "name" => "standard.ByteBuffer",
                      "underlyingType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_BINARY_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "append",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[
        '\facebook\thrift\annotation\cpp\Adapter' => \facebook\thrift\annotation\cpp\Adapter::fromShape(
          shape(
            "name" => "::apache::thrift::op::detail::BinaryPatchAdapter<::apache::thrift::op::BinaryPatchStruct>",
            "underlyingName" => "BinaryPatchStruct",
          )
        ),
      ],
      'fields' => dict[
        'assign' => shape(
          'field' => dict[],
          'type' => dict[
            '\facebook\thrift\annotation\cpp\Type' => \facebook\thrift\annotation\cpp\Type::fromShape(
              shape(
                "name" => "folly::IOBuf",
              )
            ),
            '\facebook\thrift\annotation\java\Adapter' => \facebook\thrift\annotation\java\Adapter::fromShape(
              shape(
                "adapterClassName" => "com.facebook.thrift.adapter.common.UnpooledByteBufTypeAdapter",
                "typeClassName" => "io.netty.buffer.ByteBuf",
              )
            ),
          ],
        ),
        'prepend' => shape(
          'field' => dict[],
          'type' => dict[
            '\facebook\thrift\annotation\cpp\Type' => \facebook\thrift\annotation\cpp\Type::fromShape(
              shape(
                "name" => "folly::IOBuf",
              )
            ),
            '\facebook\thrift\annotation\java\Adapter' => \facebook\thrift\annotation\java\Adapter::fromShape(
              shape(
                "adapterClassName" => "com.facebook.thrift.adapter.common.UnpooledByteBufTypeAdapter",
                "typeClassName" => "io.netty.buffer.ByteBuf",
              )
            ),
          ],
        ),
        'append' => shape(
          'field' => dict[],
          'type' => dict[
            '\facebook\thrift\annotation\cpp\Type' => \facebook\thrift\annotation\cpp\Type::fromShape(
              shape(
                "name" => "folly::IOBuf",
              )
            ),
            '\facebook\thrift\annotation\java\Adapter' => \facebook\thrift\annotation\java\Adapter::fromShape(
              shape(
                "adapterClassName" => "com.facebook.thrift.adapter.common.UnpooledByteBufTypeAdapter",
                "typeClassName" => "io.netty.buffer.ByteBuf",
              )
            ),
          ],
        ),
      ],
    );
  }

  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

