/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace apache { namespace thrift { namespace op { namespace detail { // Latest Thrift Static Patch version that the process is aware of. Any Thrift // Static Patch with a version higher than this will not be processed by the // binary. This is to ensure that the binary does not attempt to process a // Thrift Static Patch that includes operations or features it does not support, // which could lead to data corruption or other issues inline constexpr int32_t kThriftStaticPatchVersion = 1; // Adapter for all base types. template using AssignPatchAdapter = InlineAdapter>; template using BoolPatchAdapter = InlineAdapter>; template using NumberPatchAdapter = InlineAdapter>; template using StringPatchAdapter = InlineAdapter>; template using BinaryPatchAdapter = InlineAdapter>; // Adapters for structred types. template using FieldPatchAdapter = InlineAdapter>; template using StructPatchAdapter = InlineAdapter>; template using UnionPatchAdapter = InlineAdapter>; // Adapters for containers. template using ListPatchAdapter = InlineAdapter>; template using SetPatchAdapter = InlineAdapter>; template using MapPatchAdapter = InlineAdapter>; } // namespace detail } // namespace op } // namespace thrift } // namespace apache