{{! 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. }}{{! Builder class for every struct in the module. }} {{> common/auto_generated_py}} from cpython cimport bool as pbool, int as pint, float as pfloat cimport folly.iobuf as _fbthrift_iobuf cimport thrift.py3.builder {{#program:includeNamespaces}} {{#hasTypes?}} cimport {{#includeNamespace}}{{value}}.{{/includeNamespace}}types as _{{#includeNamespace}}{{value}}_{{/includeNamespace}}types cimport {{#includeNamespace}}{{value}}.{{/includeNamespace}}builders as _{{#includeNamespace}}{{value}}_{{/includeNamespace}}builders {{/hasTypes?}} {{/program:includeNamespaces}} cimport {{#program:py3Namespaces}}{{value}}.{{/program:py3Namespaces}}{{program:name}}.types as _{{#program:py3Namespaces}}{{value}}_{{/program:py3Namespaces}}{{program:name}}_types {{#program:filtered_structs}} cdef class {{struct:name}}_Builder(thrift.py3.builder.StructBuilder): {{^struct:py3_fields?}} pass {{/struct:py3_fields?}} {{#struct:py3_fields}} cdef public {{#field:type}}{{! }}{{#type:list?}}list {{/type:list?}}{{! }}{{#type:map?}}dict {{/type:map?}}{{! }}{{#type:set?}}set {{/type:set?}}{{! }}{{#type:integer?}}pint {{/type:integer?}}{{! }}{{#type:floating_point?}}pfloat {{/type:floating_point?}}{{! }}{{#type:struct?}}object {{/type:struct?}}{{! }}{{#type:cythonTypeNoneable?}}{{^type:struct?}}{{! }}{{> types/cython_python_type}} {{! }}{{/type:struct?}}{{/type:cythonTypeNoneable?}}{{! }}{{/field:type}}{{field:py_name}}{{#field:hasModifiedName?}} "{{field:cppName}}"{{/field:hasModifiedName?}} {{/struct:py3_fields}} {{/program:filtered_structs}}