├── .hgignore ├── src └── googleapis │ ├── __init__.py │ └── codegen │ ├── filesys │ ├── testdata │ │ ├── tree │ │ │ ├── abc │ │ │ ├── def │ │ │ └── subdir │ │ │ │ └── 123 │ │ ├── zips │ │ │ ├── a-c.zip │ │ │ ├── a-d.zip │ │ │ └── d-e.zip │ │ └── file1.txt │ └── __init__.py │ ├── testdata │ ├── _out_of_dir.tmpl │ ├── library │ │ └── templates │ │ │ ├── foo.tmpl │ │ │ ├── bar.tmpl │ │ │ ├── ___package_path___ │ │ │ └── xxx.tmpl │ │ │ ├── app_yaml.tmpl │ │ │ └── ___topLevelModels_wireName___.tmpl │ ├── languages │ │ └── java │ │ │ ├── 1.0 │ │ │ └── test.tmpl │ │ │ ├── 1.0dev │ │ │ └── test.tmpl │ │ │ ├── generator_test │ │ │ └── features.json │ │ │ └── imports_test.java.tmpl │ ├── bundle │ │ ├── LICENSE.txt │ │ └── ___unzip___package.zip │ ├── _call_test.tmpl │ ├── broken.json │ ├── _eoltest2.tmpl │ ├── _eoltest.tmpl │ ├── _escape_test.tmpl │ ├── targets.json │ ├── golden │ │ └── diff_test.sh │ └── AndroidManifest.xml │ ├── __init__.py │ ├── languages │ ├── sample │ │ └── 0.1 │ │ │ ├── templates │ │ │ ├── _file_header.tmpl │ │ │ ├── _parameter_type.tmpl │ │ │ ├── src │ │ │ │ ├── ___package___ │ │ │ │ │ └── ___topLevelModels_className___.xxx.tmpl │ │ │ │ └── recursive_generate.tmpl │ │ │ ├── pubspec.yaml.tmpl │ │ │ ├── _parameter_doc.tmpl │ │ │ ├── _enum.tmpl │ │ │ └── _recursive_generate.tmpl │ │ │ └── features.json │ ├── java │ │ ├── 1.19.0 │ │ │ └── templates │ │ │ │ ├── pom.xml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _file_header.tmpl │ │ │ │ ├── _model_def.tmpl │ │ │ │ ├── _alt_def.tmpl │ │ │ │ ├── _required_param_def.tmpl │ │ │ │ ├── _pattern_check_def.tmpl │ │ │ │ ├── _proguard_content_def.tmpl │ │ │ │ └── _resource.tmpl │ │ ├── 1.19.1 │ │ │ └── templates │ │ │ │ ├── pom.xml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _file_header.tmpl │ │ │ │ ├── _model_def.tmpl │ │ │ │ ├── _alt_def.tmpl │ │ │ │ ├── _required_param_def.tmpl │ │ │ │ ├── _pattern_check_def.tmpl │ │ │ │ ├── _proguard_content_def.tmpl │ │ │ │ └── _resource.tmpl │ │ ├── 1.20.0 │ │ │ └── templates │ │ │ │ ├── pom.xml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _file_header.tmpl │ │ │ │ ├── _model_def.tmpl │ │ │ │ ├── _alt_def.tmpl │ │ │ │ ├── _required_param_def.tmpl │ │ │ │ ├── _pattern_check_def.tmpl │ │ │ │ ├── _proguard_content_def.tmpl │ │ │ │ └── _resource.tmpl │ │ ├── 1.21.0 │ │ │ └── templates │ │ │ │ ├── pom.xml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _file_header.tmpl │ │ │ │ ├── _model_def.tmpl │ │ │ │ ├── _alt_def.tmpl │ │ │ │ ├── _required_param_def.tmpl │ │ │ │ ├── _proguard_content_def.tmpl │ │ │ │ └── _resource.tmpl │ │ ├── 1.22.0 │ │ │ └── templates │ │ │ │ ├── pom.xml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _file_header.tmpl │ │ │ │ ├── _model_def.tmpl │ │ │ │ ├── _alt_def.tmpl │ │ │ │ ├── _required_param_def.tmpl │ │ │ │ ├── _proguard_content_def.tmpl │ │ │ │ └── _resource.tmpl │ │ ├── 1.23.0 │ │ │ └── templates │ │ │ │ ├── pom.xml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _file_header.tmpl │ │ │ │ ├── _model_def.tmpl │ │ │ │ ├── _alt_def.tmpl │ │ │ │ ├── _required_param_def.tmpl │ │ │ │ ├── _proguard_content_def.tmpl │ │ │ │ └── _resource.tmpl │ │ ├── 1.24.0 │ │ │ └── templates │ │ │ │ ├── pom.xml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _file_header.tmpl │ │ │ │ ├── _model_def.tmpl │ │ │ │ ├── _alt_def.tmpl │ │ │ │ ├── _required_param_def.tmpl │ │ │ │ ├── _proguard_content_def.tmpl │ │ │ │ └── _resource.tmpl │ │ ├── 1.24.1 │ │ │ └── templates │ │ │ │ ├── pom.xml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _file_header.tmpl │ │ │ │ ├── _model_def.tmpl │ │ │ │ ├── _alt_def.tmpl │ │ │ │ ├── _required_param_def.tmpl │ │ │ │ ├── _proguard_content_def.tmpl │ │ │ │ └── _resource.tmpl │ │ ├── 1.25.0 │ │ │ └── templates │ │ │ │ ├── pom.xml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _file_header.tmpl │ │ │ │ ├── _model_def.tmpl │ │ │ │ ├── _alt_def.tmpl │ │ │ │ ├── _required_param_def.tmpl │ │ │ │ ├── _proguard_content_def.tmpl │ │ │ │ └── _resource.tmpl │ │ └── default │ │ │ └── templates │ │ │ ├── pom.xml.tmpl │ │ │ ├── _parameter.tmpl │ │ │ ├── _file_header.tmpl │ │ │ ├── _model_def.tmpl │ │ │ ├── _alt_def.tmpl │ │ │ ├── _required_param_def.tmpl │ │ │ ├── _proguard_content_def.tmpl │ │ │ └── _resource.tmpl │ ├── any │ │ ├── README │ │ ├── html │ │ │ ├── docs_generator.tmpl │ │ │ ├── _link_generator.tmpl │ │ │ ├── _method_parameter_row.tmpl │ │ │ ├── _property_path.tmpl │ │ │ ├── _README.txt │ │ │ ├── _resource_property_row.tmpl │ │ │ ├── _resource_alt_json.tmpl │ │ │ ├── index.html.tmpl │ │ │ ├── _index_resource_info.tmpl │ │ │ ├── _resource_file_path.tmpl │ │ │ ├── _method_response.tmpl │ │ │ └── _resource_tree.tmpl │ │ └── discovery_check │ │ │ ├── _model_content.tmpl │ │ │ ├── _resource.tmpl │ │ │ ├── _model.tmpl │ │ │ ├── report.txt.tmpl │ │ │ └── _method.tmpl │ ├── cpp │ │ ├── 0.1.3 │ │ │ ├── features.json │ │ │ └── templates │ │ │ │ ├── _service_scopes_cc.tmpl │ │ │ │ ├── _model_h.tmpl │ │ │ │ ├── _model_cc.tmpl │ │ │ │ ├── _resource_method_h.tmpl │ │ │ │ ├── _resource_method_cc.tmpl │ │ │ │ ├── ___package___ │ │ │ │ ├── ___api_kitchensink___.cc.tmpl │ │ │ │ ├── ___api_kitchensink___.h.tmpl │ │ │ │ └── CMakeLists.txt.tmpl │ │ │ │ ├── _time_stamp.tmpl │ │ │ │ ├── _resource_cc.tmpl │ │ │ │ ├── _declare_method_attributes_h.tmpl │ │ │ │ ├── _declare_method_attributes_cc.tmpl │ │ │ │ ├── _append_query_parameter_cc.tmpl │ │ │ │ ├── _service_scopes_h.tmpl │ │ │ │ ├── _append_uri_template_variable_cc.tmpl │ │ │ │ ├── _monolithic_kitchensink_cc_impl.tmpl │ │ │ │ └── _model_cc_impl.tmpl │ │ ├── 0.1.4 │ │ │ ├── features.json │ │ │ └── templates │ │ │ │ ├── _service_scopes_cc.tmpl │ │ │ │ ├── _model_h.tmpl │ │ │ │ ├── _model_cc.tmpl │ │ │ │ ├── _resource_method_h.tmpl │ │ │ │ ├── _resource_method_cc.tmpl │ │ │ │ ├── ___package___ │ │ │ │ ├── ___api_kitchensink___.cc.tmpl │ │ │ │ ├── ___api_kitchensink___.h.tmpl │ │ │ │ └── CMakeLists.txt.tmpl │ │ │ │ ├── _time_stamp.tmpl │ │ │ │ ├── _resource_cc.tmpl │ │ │ │ ├── _declare_method_attributes_h.tmpl │ │ │ │ ├── _declare_method_attributes_cc.tmpl │ │ │ │ ├── _append_query_parameter_cc.tmpl │ │ │ │ ├── _service_scopes_h.tmpl │ │ │ │ ├── _append_uri_template_variable_cc.tmpl │ │ │ │ ├── _monolithic_kitchensink_cc_impl.tmpl │ │ │ │ └── _model_cc_impl.tmpl │ │ ├── default │ │ │ ├── features.json │ │ │ └── templates │ │ │ │ ├── _service_scopes_cc.tmpl │ │ │ │ ├── _model_h.tmpl │ │ │ │ ├── _model_cc.tmpl │ │ │ │ ├── _resource_method_h.tmpl │ │ │ │ ├── _resource_method_cc.tmpl │ │ │ │ ├── ___package___ │ │ │ │ ├── ___api_kitchensink___.cc.tmpl │ │ │ │ ├── ___api_kitchensink___.h.tmpl │ │ │ │ └── CMakeLists.txt.tmpl │ │ │ │ ├── _time_stamp.tmpl │ │ │ │ ├── _resource_cc.tmpl │ │ │ │ ├── _declare_method_attributes_h.tmpl │ │ │ │ ├── _append_query_parameter_cc.tmpl │ │ │ │ ├── _service_scopes_h.tmpl │ │ │ │ ├── _declare_method_attributes_cc.tmpl │ │ │ │ ├── _append_uri_template_variable_cc.tmpl │ │ │ │ └── _monolithic_kitchensink_cc_impl.tmpl │ │ └── 0.1.2 │ │ │ ├── features.json │ │ │ └── templates │ │ │ ├── _service_scopes_cc.tmpl │ │ │ ├── _model_h.tmpl │ │ │ ├── _model_cc.tmpl │ │ │ ├── _resource_method_h.tmpl │ │ │ ├── _resource_method_cc.tmpl │ │ │ ├── ___package___ │ │ │ ├── ___api_kitchensink___.cc.tmpl │ │ │ ├── ___api_kitchensink___.h.tmpl │ │ │ └── CMakeLists.txt.tmpl │ │ │ ├── _append_uri_template_variable_cc.tmpl │ │ │ ├── _time_stamp.tmpl │ │ │ ├── _resource_cc.tmpl │ │ │ ├── _declare_method_attributes_h.tmpl │ │ │ ├── _declare_method_attributes_cc.tmpl │ │ │ ├── _append_query_parameter_cc.tmpl │ │ │ ├── _service_scopes_h.tmpl │ │ │ ├── _monolithic_kitchensink_cc_impl.tmpl │ │ │ └── _model_cc_impl.tmpl │ ├── objc │ │ └── default │ │ │ ├── features.json │ │ │ └── templates │ │ │ ├── _constants_m_impl.tmpl │ │ │ ├── ___api_monolithicSourceName___.h.tmpl │ │ │ ├── ___api_monolithicSourceName___.m.tmpl │ │ │ ├── _monolithic_h_impl.tmpl │ │ │ ├── _time_stamp.tmpl │ │ │ ├── ___package___ │ │ │ ├── ___api_className___Constants.m.tmpl │ │ │ ├── ___api_className___.h.tmpl │ │ │ ├── ___api_serviceName___.m.tmpl │ │ │ ├── ___topLevelModels_className___.m.tmpl │ │ │ ├── ___api_query___.m.tmpl │ │ │ ├── ___topLevelModels_className___.h.tmpl │ │ │ └── ___api_className___Constants.h.tmpl │ │ │ ├── _model_h_impl.tmpl │ │ │ └── _service_m_impl.tmpl │ ├── csharp │ │ ├── 1.9.0 │ │ │ ├── features.json │ │ │ └── templates │ │ │ │ ├── _get_resource.tmpl │ │ │ │ ├── _time_stamp.tmpl │ │ │ │ ├── _base_request.tmpl │ │ │ │ ├── _init_parameters.tmpl │ │ │ │ ├── packages.config.tmpl │ │ │ │ └── _resource.tmpl │ │ ├── 1.9.2 │ │ │ ├── features.json │ │ │ └── templates │ │ │ │ ├── _get_resource.tmpl │ │ │ │ ├── _time_stamp.tmpl │ │ │ │ ├── _base_request.tmpl │ │ │ │ ├── _init_parameters.tmpl │ │ │ │ ├── packages.config.tmpl │ │ │ │ └── _resource.tmpl │ │ └── default │ │ │ ├── features.json │ │ │ └── templates │ │ │ ├── _get_resource.tmpl │ │ │ ├── _time_stamp.tmpl │ │ │ ├── _base_request.tmpl │ │ │ ├── _init_parameters.tmpl │ │ │ ├── packages.config.tmpl │ │ │ └── _resource.tmpl │ ├── dart │ │ ├── 0.1 │ │ │ ├── templates │ │ │ │ ├── _parameter_type.tmpl │ │ │ │ ├── google_api____api_name_______api_version___ │ │ │ │ │ └── pubspec.yaml.tmpl │ │ │ │ ├── _parameter.tmpl │ │ │ │ ├── _serialize.tmpl │ │ │ │ ├── _parse.tmpl │ │ │ │ └── _resource.tmpl │ │ │ └── features.json │ │ └── 0.2 │ │ │ ├── templates │ │ │ ├── google_api____api_name_______api_version___ │ │ │ │ ├── lib │ │ │ │ │ ├── src │ │ │ │ │ │ └── common │ │ │ │ │ │ │ ├── resources.dart.tmpl │ │ │ │ │ │ │ └── schemas.dart.tmpl │ │ │ │ │ ├── ___api_name_______api_version____api_client.dart.tmpl │ │ │ │ │ ├── ___api_name_______api_version____api_browser.dart.tmpl │ │ │ │ │ └── ___api_name_______api_version____api_console.dart.tmpl │ │ │ │ └── pubspec.yaml.tmpl │ │ │ ├── _parameter_type.tmpl │ │ │ ├── _parameter.tmpl │ │ │ ├── _parse.tmpl │ │ │ ├── _serialize.tmpl │ │ │ └── _resource.tmpl │ │ │ └── features.json │ ├── gwt │ │ ├── 0.4-alpha │ │ │ ├── templates │ │ │ │ ├── _enum.tmpl │ │ │ │ ├── _resource_ctors.tmpl │ │ │ │ ├── com │ │ │ │ │ └── google │ │ │ │ │ │ └── api │ │ │ │ │ │ └── gwt │ │ │ │ │ │ └── services │ │ │ │ │ │ └── ___api_className___.gwt.xml.tmpl │ │ │ │ ├── _resource.tmpl │ │ │ │ └── ___package___ │ │ │ │ │ └── package-info.java.tmpl │ │ │ └── features.json │ │ └── default │ │ │ ├── templates │ │ │ ├── _resource_ctors.tmpl │ │ │ ├── com │ │ │ │ └── google │ │ │ │ │ └── api │ │ │ │ │ └── gwt │ │ │ │ │ └── services │ │ │ │ │ └── ___api_className___.gwt.xml.tmpl │ │ │ ├── _enum.tmpl │ │ │ ├── _resource.tmpl │ │ │ └── ___package___ │ │ │ │ └── package-info.java.tmpl │ │ │ └── features.json │ ├── php │ │ ├── 1.1.0 │ │ │ ├── templates │ │ │ │ ├── _resource_var.tmpl │ │ │ │ ├── README.txt.tmpl │ │ │ │ ├── _func_params.tmpl │ │ │ │ ├── _resource_decl.tmpl │ │ │ │ ├── _methods_decl.tmpl │ │ │ │ └── _resource.tmpl │ │ │ └── features.json │ │ ├── 1.1.1 │ │ │ ├── templates │ │ │ │ ├── _resource_var.tmpl │ │ │ │ ├── README.txt.tmpl │ │ │ │ ├── _func_params.tmpl │ │ │ │ ├── _resource_decl.tmpl │ │ │ │ ├── _methods_decl.tmpl │ │ │ │ └── _resource.tmpl │ │ │ └── features.json │ │ ├── 1.1.4 │ │ │ ├── templates │ │ │ │ ├── _resource_var.tmpl │ │ │ │ ├── README.txt.tmpl │ │ │ │ ├── _func_params.tmpl │ │ │ │ ├── _resource_decl.tmpl │ │ │ │ ├── _methods_decl.tmpl │ │ │ │ └── _resource.tmpl │ │ │ └── features.json │ │ ├── 1.2.0 │ │ │ ├── templates │ │ │ │ ├── _resource_var.tmpl │ │ │ │ ├── _func_params.tmpl │ │ │ │ ├── _resource_decl.tmpl │ │ │ │ ├── _methods_decl.tmpl │ │ │ │ └── ___api_className___ │ │ │ │ │ └── Resource │ │ │ │ │ └── ___resources_className___.php.tmpl │ │ │ └── features.json │ │ ├── 1.2.1 │ │ │ ├── templates │ │ │ │ ├── _resource_var.tmpl │ │ │ │ ├── _func_params.tmpl │ │ │ │ ├── _resource_decl.tmpl │ │ │ │ ├── _methods_decl.tmpl │ │ │ │ └── ___api_className___ │ │ │ │ │ └── Resource │ │ │ │ │ └── ___resources_className___.php.tmpl │ │ │ └── features.json │ │ ├── 1.3.0 │ │ │ ├── templates │ │ │ │ ├── _resource_var.tmpl │ │ │ │ ├── _func_params.tmpl │ │ │ │ ├── _resource_decl.tmpl │ │ │ │ ├── _methods_decl.tmpl │ │ │ │ └── ___api_className___ │ │ │ │ │ └── Resource │ │ │ │ │ └── ___resources_className___.php.tmpl │ │ │ └── features.json │ │ └── default │ │ │ ├── templates │ │ │ ├── _resource_var.tmpl │ │ │ ├── README.txt.tmpl │ │ │ ├── _func_params.tmpl │ │ │ ├── _resource_decl.tmpl │ │ │ ├── _methods_decl.tmpl │ │ │ └── _resource.tmpl │ │ │ └── features.json │ └── python │ │ └── 1.0 │ │ └── features.json │ ├── script_stubs.py │ ├── utilities │ ├── html_stripper.py │ ├── convert_size_test.py │ └── ordered_set_test.py │ └── documenting_language_model_test.py ├── .gitignore ├── MANIFEST.in ├── generate.sh └── RunTests.sh /.hgignore: -------------------------------------------------------------------------------- 1 | .*\.pyc 2 | -------------------------------------------------------------------------------- /src/googleapis/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.7 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/filesys/testdata/tree/abc: -------------------------------------------------------------------------------- 1 | abc 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/filesys/testdata/tree/def: -------------------------------------------------------------------------------- 1 | def 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/_out_of_dir.tmpl: -------------------------------------------------------------------------------- 1 | OUT OF DIR -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/library/templates/foo.tmpl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/googleapis/codegen/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.7 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/filesys/testdata/tree/subdir/123: -------------------------------------------------------------------------------- 1 | 123 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/filesys/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.7 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/languages/java/1.0/test.tmpl: -------------------------------------------------------------------------------- 1 | Test -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/languages/java/1.0dev/test.tmpl: -------------------------------------------------------------------------------- 1 | Test -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.class 3 | build/ 4 | dist/ 5 | *.egg-info/ 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/bundle/LICENSE.txt: -------------------------------------------------------------------------------- 1 | I am a license file 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/library/templates/bar.tmpl: -------------------------------------------------------------------------------- 1 | This is the file bar.tmpl 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/_call_test.tmpl: -------------------------------------------------------------------------------- 1 | 1{{ foo }}1 2{{ api.xxx }}2 3{{ qux }}3 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/library/templates/___package_path___/xxx.tmpl: -------------------------------------------------------------------------------- 1 | A file under a flexible path 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/broken.json: -------------------------------------------------------------------------------- 1 | { 2 | "thisfile": "contains bad json to test the json file checker.", 3 | } 4 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include CHANGES LICENSE README setup.py ez_setup.py MANIFEST.in 2 | include *.sh 3 | recursive-include src * 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/library/templates/app_yaml.tmpl: -------------------------------------------------------------------------------- 1 | app_yaml is a magic file name which becomes app.yaml after expansion. 2 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/_eoltest2.tmpl: -------------------------------------------------------------------------------- 1 | {% noeol %} 2 | | 3 | {% eol %} 4 | | 5 | {% endnoeol %} 6 | {% eol %} 7 | X 8 | 9 | X 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/_eoltest.tmpl: -------------------------------------------------------------------------------- 1 | {% noeol %} 2 | | 3 | {% eol %} 4 | | 5 | {% endnoeol %} 6 | 7 | 8 | X 9 | 10 | 11 | X 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/sample/0.1/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% language cpp %}{% copyright_block %} 2 | 3 | // I might put standard imports here. 4 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/_escape_test.tmpl: -------------------------------------------------------------------------------- 1 | method({% parameter_list %} 2 | {% parameter %} 3 | {{ foo }} a{% end_parameter %} 4 | {% end_parameter_list %}) -------------------------------------------------------------------------------- /src/googleapis/codegen/filesys/testdata/zips/a-c.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/apis-client-generator/HEAD/src/googleapis/codegen/filesys/testdata/zips/a-c.zip -------------------------------------------------------------------------------- /src/googleapis/codegen/filesys/testdata/zips/a-d.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/apis-client-generator/HEAD/src/googleapis/codegen/filesys/testdata/zips/a-d.zip -------------------------------------------------------------------------------- /src/googleapis/codegen/filesys/testdata/zips/d-e.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/apis-client-generator/HEAD/src/googleapis/codegen/filesys/testdata/zips/d-e.zip -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.0/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.1/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.20.0/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.21.0/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.22.0/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.23.0/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.0/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.1/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.25.0/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/default/templates/pom.xml.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.ownerDomain != "google.com" %}{% halt %}{% else %}{% call_template _pom_xml %}{% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/README: -------------------------------------------------------------------------------- 1 | The 'any' language is for templates that are not in any specific programming 2 | language. E.g. an API method documenter. 3 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "cpp", 3 | "description": "C++ libraries for Google APIs.", 4 | "releaseVersion": "0.1.3" 5 | } 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "cpp", 3 | "description": "C++ libraries for Google APIs.", 4 | "releaseVersion": "0.1.4" 5 | } 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "cpp", 3 | "description": "C++ libraries for Google APIs.", 4 | "releaseVersion": "0.1.5" 5 | } 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/library/templates/___topLevelModels_wireName___.tmpl: -------------------------------------------------------------------------------- 1 | // A template which is instantiated once for each data model 2 | I am {{ model.wireName }} 3 | -------------------------------------------------------------------------------- /src/googleapis/codegen/filesys/testdata/file1.txt: -------------------------------------------------------------------------------- 1 | Test data for library_package_test.py 2 | If you edit this file, you will break a unit test whichj 3 | depends on its size being 125 4 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/bundle/___unzip___package.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/google/apis-client-generator/HEAD/src/googleapis/codegen/testdata/bundle/___unzip___package.zip -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/docs_generator.tmpl: -------------------------------------------------------------------------------- 1 | {% for r in api.resources %} 2 | {% call_template _resource_tree resource=r dir="" title_path="" %} 3 | {% endfor %} 4 | 5 | {% halt %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "Objective-C", 3 | "description": "Objective-C libraries for Google APIs.", 4 | "releaseVersion": "0.1" 5 | } 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/languages/java/generator_test/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "java", 3 | "description": "Java libraries for Google APIs.", 4 | "generator": "gwt", 5 | "requires": [] 6 | } 7 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "cpp", 3 | "description": "C++ libraries for Google APIs.", 4 | "releaseVersion": "0.1.2", 5 | "patch": "a", 6 | "patchDate": "20140410" 7 | } 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.0/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "csharp", 3 | "description": "C# libraries for Google APIs.", 4 | "releaseVersion": "1.9.0", 5 | "baseClientLibrary": "1.9.0", 6 | "nugetVersion": "1.9.0" 7 | } 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.2/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "csharp", 3 | "description": "C# libraries for Google APIs.", 4 | "releaseVersion": "1.9.2", 5 | "baseClientLibrary": "1.9.2", 6 | "nugetVersion": "1.9.2" 7 | } 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/default/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "csharp", 3 | "description": "C# libraries for Google APIs.", 4 | "releaseVersion": "1.10.0", 5 | "baseClientLibrary": "1.10.0", 6 | "nugetVersion": "1.10.0" 7 | } 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_link_generator.tmpl: -------------------------------------------------------------------------------- 1 | {% noeol %} 2 | 3 | {% if item.isSchema and item.associatedResource %} 4 | {% call_template _resource_file_path resource=item.associatedResource children="" %} 5 | {% endif %} 6 | 7 | {% endnoeol%} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_service_scopes_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.authscopes %}{% for authscope in api.authscopes %} 2 | const StringPiece {{ api.className }}::SCOPES::{{ authscope.name|upper }}("{{ authscope.value }}"); 3 | {% endfor %}{% endif %} 4 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_service_scopes_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.authscopes %}{% for authscope in api.authscopes %} 2 | const StringPiece {{ api.className }}::SCOPES::{{ authscope.name|upper }}("{{ authscope.value }}"); 3 | {% endfor %}{% endif %} 4 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.1/templates/_parameter_type.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders the type of a parameter. 3 | [param] the parameter. 4 | {% endcomment %}{% if param.enumType %}{{ param.enumType.codeType }}{% else %}{{ param.codeType }}{% endif %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_service_scopes_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.authscopes %}{% for authscope in api.authscopes %} 2 | const char {{ api.className }}::SCOPES::{{ authscope.name|upper }}[] = {"{{ authscope.value }}"}; 3 | {% endfor %} 4 | {% endif %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_service_scopes_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.authscopes %}{% for authscope in api.authscopes %} 2 | const char {{ api.className }}::SCOPES::{{ authscope.name|upper }}[] = {"{{ authscope.value }}"}; 3 | {% endfor %} 4 | {% endif %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/sample/0.1/templates/_parameter_type.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders the type of a parameter. 3 | [param] the parameter. 4 | {% endcomment %}{% if param.enumType %}{{ param.enumType.codeType }}{% else %}{{ param.codeType }}{% endif %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/google_api____api_name_______api_version___/lib/src/common/resources.dart.tmpl: -------------------------------------------------------------------------------- 1 | part of {{ api.name }}_{{ api.version }}_api_client; 2 | {% for r in api.resources %} 3 | {% call_template _resource resource=r %} 4 | {% endfor %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/google_api____api_name_______api_version___/lib/src/common/schemas.dart.tmpl: -------------------------------------------------------------------------------- 1 | part of {{ api.name }}_{{ api.version }}_api_client; 2 | {% for model in api.models %} 3 | {% call_template _model_content model=model %} 4 | {% endfor %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_model_h.tmpl: -------------------------------------------------------------------------------- 1 | {% if not guarded_model.isSchema %}{% for child in guarded_model.children %}{% call_template _model_h guarded_model=child %}{% endfor %}{% else %} 2 | {% call_template _model_h_impl current_model=guarded_model %}{% endif %} 3 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_model_h.tmpl: -------------------------------------------------------------------------------- 1 | {% if not guarded_model.isSchema %}{% for child in guarded_model.children %}{% call_template _model_h guarded_model=child %}{% endfor %}{% else %} 2 | {% call_template _model_h_impl current_model=guarded_model %}{% endif %} 3 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_model_h.tmpl: -------------------------------------------------------------------------------- 1 | {% if not guarded_model.isSchema %}{% for child in guarded_model.children %}{% call_template _model_h guarded_model=child %}{% endfor %}{% else %} 2 | {% call_template _model_h_impl current_model=guarded_model %}{% endif %} 3 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_model_h.tmpl: -------------------------------------------------------------------------------- 1 | {% if not guarded_model.isSchema %}{% for child in guarded_model.children %}{% call_template _model_h guarded_model=child %}{% endfor %}{% else %} 2 | {% call_template _model_h_impl current_model=guarded_model %}{% endif %} 3 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/targets.json: -------------------------------------------------------------------------------- 1 | { 2 | "java" : { 3 | "stable" : { 4 | "releaseVersion" : "0.0.1", 5 | "path" : "stable", 6 | "description" : "This release targets Java X.Y.Z" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_model_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if not guarded_model.isSchema %}{% for child in guarded_model.children %}{% call_template _model_cc guarded_model=child %}{% endfor %}{% else %} 2 | {% call_template _model_cc_impl current_model=guarded_model %} 3 | {% endif %} 4 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_model_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if not guarded_model.isSchema %}{% for child in guarded_model.children %}{% call_template _model_cc guarded_model=child %}{% endfor %}{% else %} 2 | {% call_template _model_cc_impl current_model=guarded_model %} 3 | {% endif %} 4 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_model_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if not guarded_model.isSchema %}{% for child in guarded_model.children %}{% call_template _model_cc guarded_model=child %}{% endfor %}{% else %} 2 | {% call_template _model_cc_impl current_model=guarded_model %} 3 | {% endif %} 4 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/0.4-alpha/templates/_enum.tmpl: -------------------------------------------------------------------------------- 1 | public enum {{ enum.className }} { 2 | {% for name_value_desc in enum.pairs %} 3 | {% doc_comment_if name_value_desc.2 %} 4 | @PropertyName("{{ name_value_desc.1 }}") {{ name_value_desc.0 }},{% endfor %} 5 | ; 6 | } 7 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_model_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if not guarded_model.isSchema %}{% for child in guarded_model.children %}{% call_template _model_cc guarded_model=child %}{% endfor %}{% else %} 2 | {% call_template _model_cc_impl current_model=guarded_model %} 3 | {% endif %} 4 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_method_parameter_row.tmpl: -------------------------------------------------------------------------------- 1 | 2 | {{ param.wireName }} 3 | {{ param.type }} 4 | {% checksummed_div %}{{ param.wireName }}-description{% divbody %}{{ param.description }}{% endchecksummed_div %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_resource_method_h.tmpl: -------------------------------------------------------------------------------- 1 | {% for method in resource.methods %} 2 | {% call_template _method_h method=method %} 3 | {% endfor %} 4 | 5 | {% for subresource in resource.resources %} 6 | {% call_template _resource_method_h resource=subresource %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_resource_method_h.tmpl: -------------------------------------------------------------------------------- 1 | {% for method in resource.methods %} 2 | {% call_template _method_h method=method %} 3 | {% endfor %} 4 | 5 | {% for subresource in resource.resources %} 6 | {% call_template _resource_method_h resource=subresource %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_resource_method_h.tmpl: -------------------------------------------------------------------------------- 1 | {% for method in resource.methods %} 2 | {% call_template _method_h method=method %} 3 | {% endfor %} 4 | 5 | {% for subresource in resource.resources %} 6 | {% call_template _resource_method_h resource=subresource %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_resource_method_h.tmpl: -------------------------------------------------------------------------------- 1 | {% for method in resource.methods %} 2 | {% call_template _method_h method=method %} 3 | {% endfor %} 4 | 5 | {% for subresource in resource.resources %} 6 | {% call_template _resource_method_h resource=subresource %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.1/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Dart libraries for Google APIs.", 3 | "releaseVersion": "0.1", 4 | "requires": [ 5 | { 6 | "name": "Google API Dart Client", 7 | "environments": ["*"], 8 | "version": "0" 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/sample/0.1/templates/src/___package___/___topLevelModels_className___.xxx.tmpl: -------------------------------------------------------------------------------- 1 | {% language java %}{% collapsenewlines %}{% call_template _file_header %} 2 | 3 | package {{ model.module.name }}; 4 | 5 | {% call_template _model_def model=model %} 6 | 7 | {% endcollapsenewlines %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_resource_method_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% for method in resource.methods %} 2 | {% call_template _method_cc method=method %} 3 | {% endfor %} 4 | 5 | {% for subresource in resource.resources %} 6 | {% call_template _resource_method_cc resource=subresource %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_resource_method_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% for method in resource.methods %} 2 | {% call_template _method_cc method=method %} 3 | {% endfor %} 4 | 5 | {% for subresource in resource.resources %} 6 | {% call_template _resource_method_cc resource=subresource %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_resource_method_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% for method in resource.methods %} 2 | {% call_template _method_cc method=method %} 3 | {% endfor %} 4 | 5 | {% for subresource in resource.resources %} 6 | {% call_template _resource_method_cc resource=subresource %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_resource_method_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% for method in resource.methods %} 2 | {% call_template _method_cc method=method %} 3 | {% endfor %} 4 | 5 | {% for subresource in resource.resources %} 6 | {% call_template _resource_method_cc resource=subresource %} 7 | {% endfor %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/_constants_m_impl.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% for enum in api.enums %} 2 | // {{enum.className}} - {{ enum.propertyName }} 3 | {% for element in enum.elements %}NSString * const {{ element.constantName }} = {% literal element.value %}; 4 | {% endfor %}{% endfor %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/0.4-alpha/templates/_resource_ctors.tmpl: -------------------------------------------------------------------------------- 1 | /** Returns the {@link #{{ resource.className }}Context} context. */ 2 | {{ resource.contextCodeType }}Context {{ resource.contextCodeName }}(); 3 | {% for r in resource.resources %} 4 | {% call_template _resource_ctors resource=r %}{% endfor %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/default/templates/_resource_ctors.tmpl: -------------------------------------------------------------------------------- 1 | /** Returns the {@link #{{ resource.className }}Context} context. */ 2 | {{ resource.contextCodeType }}Context {{ resource.contextCodeName }}(); 3 | {% for r in resource.resources %} 4 | {% call_template _resource_ctors resource=r %}{% endfor %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_property_path.tmpl: -------------------------------------------------------------------------------- 1 | {% noeol %} 2 | 3 | {% if schema.parent %} 4 | {% with parent=schema.parent %}{% call_template _property_path schema=parent %}{% endwith%} 5 | {% endif %} 6 | 7 | {% if schema.anonymous %} 8 | {{ schema.wireName }}. 9 | {% endif %} 10 | 11 | {% endnoeol %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/default/templates/com/google/api/gwt/services/___api_className___.gwt.xml.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Run the Google APIs client generator 4 | # 5 | 6 | case $0 in 7 | /* ) 8 | TOP=$(dirname "$0") 9 | ;; 10 | * ) 11 | TOP=$(dirname "$(/bin/pwd)/$0") 12 | ;; 13 | esac 14 | 15 | export PYTHONPATH=$TOP/src:$PYTHONPATH 16 | python $TOP/src/googleapis/codegen/generate_library.py $* 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "dart", 3 | "description": "Dart libraries for Google APIs.", 4 | "releaseVersion": "0.2", 5 | "requires": [ 6 | { 7 | "name": "Google API Dart Client", 8 | "environments": ["*"], 9 | "version": "0" 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/0.4-alpha/templates/com/google/api/gwt/services/___api_className___.gwt.xml.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/discovery_check/_model_content.tmpl: -------------------------------------------------------------------------------- 1 | name: {{ model.wireName }} 2 | kind: {{ model.kind }} 3 | id: {{ model.id }} 4 | description: {{ model.description }}{% for prop in model.properties %} 5 | property {{ prop.wireName }} { 6 | description: {{ prop.description }} 7 | type: {{ prop.codeType }} 8 | }{% endfor %} 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.0/templates/_resource_var.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | 3 | {% if resource.json and resource.phpPropName %} 4 | public ${{ resource.phpPropName }}; 5 | {% endif %} 6 | 7 | {% for r in resource.resources %} 8 | {% call_template _resource_var resource=r %} 9 | {% endfor %} 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.1/templates/_resource_var.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | 3 | {% if resource.json and resource.phpPropName %} 4 | public ${{ resource.phpPropName }}; 5 | {% endif %} 6 | 7 | {% for r in resource.resources %} 8 | {% call_template _resource_var resource=r %} 9 | {% endfor %} 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.4/templates/_resource_var.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | 3 | {% if resource.json and resource.phpPropName %} 4 | public ${{ resource.phpPropName }}; 5 | {% endif %} 6 | 7 | {% for r in resource.resources %} 8 | {% call_template _resource_var resource=r %} 9 | {% endfor %} 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.0/templates/_resource_var.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | 3 | {% if resource.json and resource.phpPropName %} 4 | public ${{ resource.phpPropName }}; 5 | {% endif %} 6 | 7 | {% for r in resource.resources %} 8 | {% call_template _resource_var resource=r %} 9 | {% endfor %} 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.1/templates/_resource_var.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | 3 | {% if resource.json and resource.phpPropName %} 4 | public ${{ resource.phpPropName }}; 5 | {% endif %} 6 | 7 | {% for r in resource.resources %} 8 | {% call_template _resource_var resource=r %} 9 | {% endfor %} 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.3.0/templates/_resource_var.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | 3 | {% if resource.json and resource.phpPropName %} 4 | public ${{ resource.phpPropName }}; 5 | {% endif %} 6 | 7 | {% for r in resource.resources %} 8 | {% call_template _resource_var resource=r %} 9 | {% endfor %} 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/default/templates/_resource_var.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | 3 | {% if resource.json and resource.phpPropName %} 4 | public ${{ resource.phpPropName }}; 5 | {% endif %} 6 | 7 | {% for r in resource.resources %} 8 | {% call_template _resource_var resource=r %} 9 | {% endfor %} 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_README.txt: -------------------------------------------------------------------------------- 1 | 2 | An experimental API documentation generator. 3 | 4 | Usage: 5 | expand_templates.py --templates=html --discovery=discovery.json \ 6 | --output_dir=docs 7 | 8 | You will need to grab a CSS file to get good results. We like 9 | https://developers.google.com/_static/css/screen.css 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/sample/0.1/templates/src/recursive_generate.tmpl: -------------------------------------------------------------------------------- 1 | // Demonstrate recursively calling templates to generate a tree of files. 2 | {% with dir="1" level=1 %} // we need variables for call_template 3 | {% call_template _recursive_generate dir=dir level=level %} 4 | {% endwith %} 5 | {% halt %} // suppress output for this file. 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/discovery_check/_resource.tmpl: -------------------------------------------------------------------------------- 1 | resource {{% indent %} 2 | name: {{ resource.wireName }} 3 | id: {{ resource.wireName }} 4 | {% for m in resource.methods %}{% call_template _method method m %} 5 | {% endfor %} 6 | {% for subr in resource.resources %}{% call_template _resource resource subr %} 7 | {% endfor %} 8 | {% endindent %}} 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.0/templates/_get_resource.tmpl: -------------------------------------------------------------------------------- 1 | private readonly {{ resource.className }}Resource {{ resource.codeName }}; 2 | 3 | /// Gets the {{ resource.className }} resource. 4 | public virtual {{ resource.className }}Resource {{ resource.className }} 5 | { 6 | get { return {{ resource.codeName }}; } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.2/templates/_get_resource.tmpl: -------------------------------------------------------------------------------- 1 | private readonly {{ resource.className }}Resource {{ resource.codeName }}; 2 | 3 | /// Gets the {{ resource.className }} resource. 4 | public virtual {{ resource.className }}Resource {{ resource.className }} 5 | { 6 | get { return {{ resource.codeName }}; } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/default/templates/_get_resource.tmpl: -------------------------------------------------------------------------------- 1 | private readonly {{ resource.className }}Resource {{ resource.codeName }}; 2 | 3 | /// Gets the {{ resource.className }} resource. 4 | public virtual {{ resource.className }}Resource {{ resource.className }} 5 | { 6 | get { return {{ resource.codeName }}; } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /RunTests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Run the Google APIs client generator tests 4 | # 5 | 6 | case $0 in 7 | /* ) 8 | TOP=$(dirname "$0") 9 | ;; 10 | * ) 11 | TOP=$(dirname "$(/bin/pwd)/$0") 12 | ;; 13 | esac 14 | 15 | export PYTHONPATH=$TOP/src 16 | 17 | cd $TOP/src/googleapis/codegen 18 | for test in *_test.py ; do 19 | python $test 20 | done 21 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/___api_monolithicSourceName___.h.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | {% if options.useSingleSourceFile %} 5 | {% call_template _monolithic_h_impl %} 6 | {% else %} 7 | {% halt %} {# do not emit this file at all if using multiple source files #} 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/___api_monolithicSourceName___.m.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | {% if options.useSingleSourceFile %} 5 | {% call_template _monolithic_m_impl %} 6 | {% else %} 7 | {% halt %} {# do not emit this file at all if using multiple source files #} 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/___package___/___api_kitchensink___.cc.tmpl: -------------------------------------------------------------------------------- 1 | {% language cpp %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | {% if options.useSingleSourceFile %} 5 | {% call_template _monolithic_kitchensink_cc_impl api=api %} 6 | {% else %} 7 | {% halt %} {# do not emit this file at all if using multiple source files #} 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/___package___/___api_kitchensink___.cc.tmpl: -------------------------------------------------------------------------------- 1 | {% language cpp %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | {% if options.useSingleSourceFile %} 5 | {% call_template _monolithic_kitchensink_cc_impl api=api %} 6 | {% else %} 7 | {% halt %} {# do not emit this file at all if using multiple source files #} 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/___package___/___api_kitchensink___.cc.tmpl: -------------------------------------------------------------------------------- 1 | {% language cpp %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | {% if options.useSingleSourceFile %} 5 | {% call_template _monolithic_kitchensink_cc_impl api=api %} 6 | {% else %} 7 | {% halt %} {# do not emit this file at all if using multiple source files #} 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/_parameter_type.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders the type of a parameter. 3 | [param] the parameter. 4 | 5 | TODO(timarmstrong): Re-enable this line once we're using enums again: 6 | {% if param.enumType %}{{ param.enumType.codeType }}{% else %}{{ param.codeType }}{% endif %} 7 | 8 | {% endcomment %} 9 | {{ param.codeType }} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/default/templates/_enum.tmpl: -------------------------------------------------------------------------------- 1 | /** Possible values for {@link #{{ param.setterName }}({{ param.memberName }})}. */ 2 | public enum {{ enum.className }} { 3 | {% for element in enum.elements %} 4 | {% doc_comment_if element.description %} 5 | @PropertyName({% literal element.wireName %}) {{ element.constantName }},{% endfor %} 6 | ; 7 | } 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/___package___/___api_kitchensink___.cc.tmpl: -------------------------------------------------------------------------------- 1 | {% language cpp %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | {% if options.useSingleSourceFile %} 5 | {% call_template _monolithic_kitchensink_cc_impl api=api %} 6 | {% else %} 7 | {% halt %} {# do not emit this file at all if using multiple source files #} 8 | {% endif %} 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.0/templates/README.txt.tmpl: -------------------------------------------------------------------------------- 1 | PHP library for {{ api.title }} {{ api.version }} 2 | 3 | {% if options.include_timestamp %} 4 | Created on {{ tool.runDate }} at {{ tool.runTime }}{% endif %} 5 | 6 | Requirements: 7 | {% for preq in features.requires %} 8 | {{ preq.name }}, version {{ preq.version }} 9 | URL: {{ preq.downloadLink }} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.1/templates/README.txt.tmpl: -------------------------------------------------------------------------------- 1 | PHP library for {{ api.title }} {{ api.version }} 2 | 3 | {% if options.include_timestamp %} 4 | Created on {{ tool.runDate }} at {{ tool.runTime }}{% endif %} 5 | 6 | Requirements: 7 | {% for preq in features.requires %} 8 | {{ preq.name }}, version {{ preq.version }} 9 | URL: {{ preq.downloadLink }} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.4/templates/README.txt.tmpl: -------------------------------------------------------------------------------- 1 | PHP library for {{ api.title }} {{ api.version }} 2 | 3 | {% if options.include_timestamp %} 4 | Created on {{ tool.runDate }} at {{ tool.runTime }}{% endif %} 5 | 6 | Requirements: 7 | {% for preq in features.requires %} 8 | {{ preq.name }}, version {{ preq.version }} 9 | URL: {{ preq.downloadLink }} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/default/templates/README.txt.tmpl: -------------------------------------------------------------------------------- 1 | PHP library for {{ api.title }} {{ api.version }} 2 | 3 | {% if options.include_timestamp %} 4 | Created on {{ tool.runDate }} at {{ tool.runTime }}{% endif %} 5 | 6 | Requirements: 7 | {% for preq in features.requires %} 8 | {{ preq.name }}, version {{ preq.version }} 9 | URL: {{ preq.downloadLink }} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/discovery_check/_model.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model model child %}{% endfor %}{% else %} 2 | schema {{ model.fullClassName }} {{% indent %} 3 | {% call_template _model_content model model %} 4 | {% for child in model.children %}{% call_template _model model child %} 5 | {% endfor %}{% endindent %}}{% endif %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.0/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.1/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.20.0/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.21.0/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.22.0/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.23.0/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.0/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.1/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.25.0/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/default/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% filter java_parameter_wrap %}{% filter noblanklines %}{{ parameter.description }} 2 | {% if parameter.default %}[default: {{ parameter.default }}]{% endif %} 3 | {% if parameter.minimum %}[minimum: {{ parameter.minimum }}]{% endif %} 4 | {% if parameter.maximum %}[maximum: {{ parameter.maximum }}]{% endif %} 5 | {% endfilter %}{% endfilter %} 6 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/google_api____api_name_______api_version___/lib/___api_name_______api_version____api_client.dart.tmpl: -------------------------------------------------------------------------------- 1 | library {{ api.name }}_{{ api.version }}_api_client; 2 | 3 | import "dart:core" as core; 4 | import "dart:async" as async; 5 | import "dart:convert"; 6 | 7 | part "src/common/client.dart"; 8 | part "src/common/schemas.dart"; 9 | part "src/common/resources.dart"; 10 | 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/google_api____api_name_______api_version___/pubspec.yaml.tmpl: -------------------------------------------------------------------------------- 1 | name: {{ api.owner|lower }}_api_{{ api.name }}_{{ api.version }} 2 | description: >{% indent %} 3 | {{ api.description }}{% endindent %} 4 | version: {{ features.releaseVersion }}.{{ api.revision }} 5 | author: Sam McCall 6 | dependencies: 7 | js: '>=0.0.18' 8 | google_oauth2_client: '>=0.2.9' 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/sample/0.1/templates/pubspec.yaml.tmpl: -------------------------------------------------------------------------------- 1 | # This is a Dart pubspec file. It exists here just to show you a file which 2 | # is not part of the rest of the source, which you want to appear at the top 3 | # level of output. 4 | name: {{ api.name }}_{{ api.version }} 5 | description: >{% indent %} 6 | {{ api.description }}{% endindent %} 7 | version: {{ features.releaseVersion }}.{{ api.revision }} 8 | author: Google Inc. 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.1/templates/google_api____api_name_______api_version___/pubspec.yaml.tmpl: -------------------------------------------------------------------------------- 1 | name: google_api_{{ api.name }}_{{ api.version }} 2 | description: >{% indent %} 3 | {{ api.description }}{% endindent %} 4 | version: {{ features.releaseVersion }}.{{ api.revision }} 5 | author: Sam McCall 6 | dependencies: 7 | google_api_common: 8 | git: https://code.google.com/p/google-api-dart-client.common/ 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.0/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.1/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.20.0/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.21.0/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.22.0/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.23.0/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.0/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.1/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.25.0/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/default/templates/_file_header.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% copyright_block %} 3 | /* 4 | * This code was generated by https://github.com/google/apis-client-generator/ 5 | {% if options.include_timestamp %} 6 | * {% if tool.buildDate %}(build: {{ tool.buildDate }}){% endif %} 7 | * on {{ tool.runDate }} at {{ tool.runTime }} {% endif %} 8 | * Modify at your own risk. 9 | */ 10 | {% endfilter %} 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders a description of a parameter, including default, minimum, and maximum values. 3 | {% endcomment %} 4 | [{{ parameter.codeName }}] - {{ parameter.description }}{% if parameter.default %} (Default: {{ parameter.default }}){% endif %}{% if parameter.minimum %} (Minimum: {{ parameter.minimum }}){% endif %}{% if parameter.maximum %} (Maximum: {{ parameter.maximum }}){% endif %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_append_uri_template_variable_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if variable.data_type.json_type == 'array' %} 2 | {{ api.client_namespace }}::AppendIteratorToUrl( 3 | {{ variable.memberName }}.begin(), {{ variable.memberName }}.end(), 4 | "{{ variable.codeName }}", target); 5 | {% else %} 6 | target->append({{ api.client_namespace }}::CppValueToEscapedUrlValue( 7 | {{ variable.memberName }})); 8 | {% endif %} 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/_monolithic_h_impl.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %} 2 | {% call_template ___package___/___api_className___Constants.h %} 3 | 4 | {% for model in api.models %} 5 | {% call_template ___package___/___topLevelModels_className___.h model=model %} 6 | {% endfor %} 7 | 8 | {% if api.query %} 9 | {% call_template ___package___/___api_query___.h %} 10 | {% endif %} 11 | {% call_template ___package___/___api_serviceName___.h %} 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.0/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "php", 3 | "description": "PHP libraries for Google APIs.", 4 | "releaseVersion": "1.1.0", 5 | "baseClientLibrary": "1.1.0", 6 | "requires": [ 7 | { 8 | "name": "Google API PHP Client", 9 | "environments": ["*"], 10 | "downloadLink": "https://github.com/google/google-api-php-client/releases", 11 | "version": "${baseClientLibrary}" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.1/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "php", 3 | "description": "PHP libraries for Google APIs.", 4 | "releaseVersion": "1.1.1", 5 | "baseClientLibrary": "1.1.1", 6 | "requires": [ 7 | { 8 | "name": "Google API PHP Client", 9 | "environments": ["*"], 10 | "downloadLink": "https://github.com/google/google-api-php-client/releases", 11 | "version": "${baseClientLibrary}" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.4/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "php", 3 | "description": "PHP libraries for Google APIs.", 4 | "releaseVersion": "1.1.4", 5 | "baseClientLibrary": "1.1.1", 6 | "requires": [ 7 | { 8 | "name": "Google API PHP Client", 9 | "environments": ["*"], 10 | "downloadLink": "https://github.com/google/google-api-php-client/releases", 11 | "version": "${baseClientLibrary}" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.0/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "php", 3 | "description": "PHP libraries for Google APIs.", 4 | "releaseVersion": "1.2.0", 5 | "baseClientLibrary": "1.1.1", 6 | "requires": [ 7 | { 8 | "name": "Google API PHP Client", 9 | "environments": ["*"], 10 | "downloadLink": "https://github.com/google/google-api-php-client/releases", 11 | "version": "${baseClientLibrary}" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.1/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "php", 3 | "description": "PHP libraries for Google APIs.", 4 | "releaseVersion": "1.2.1", 5 | "baseClientLibrary": "1.1.1", 6 | "requires": [ 7 | { 8 | "name": "Google API PHP Client", 9 | "environments": ["*"], 10 | "downloadLink": "https://github.com/google/google-api-php-client/releases", 11 | "version": "${baseClientLibrary}" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.3.0/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "php", 3 | "description": "PHP libraries for Google APIs.", 4 | "releaseVersion": "1.3.0", 5 | "baseClientLibrary": "1.1.1", 6 | "requires": [ 7 | { 8 | "name": "Google API PHP Client", 9 | "environments": ["*"], 10 | "downloadLink": "https://github.com/google/google-api-php-client/releases", 11 | "version": "${baseClientLibrary}" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/default/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "php", 3 | "description": "PHP libraries for Google APIs.", 4 | "releaseVersion": "1.1.1", 5 | "baseClientLibrary": "1.1.1", 6 | "requires": [ 7 | { 8 | "name": "Google API PHP Client", 9 | "environments": ["*"], 10 | "downloadLink": "https://github.com/google/google-api-php-client/releases", 11 | "version": "${baseClientLibrary}" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_time_stamp.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | // This code was generated by {{ tool.name }} {{ tool.version }} 3 | {% if options.include_timestamp %} 4 | {% if tool.buildDate %} 5 | // Build date: {{ tool.buildDate }} 6 | {% endif %} 7 | {% if tool.runDate %} 8 | // on: {{ tool.runDate }}, {{ tool.runTime }} 9 | {% endif %} 10 | // C++ generator version: {{ features.releaseVersion }} 11 | {% endif %} 12 | {% endfilter %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_time_stamp.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | // This code was generated by {{ tool.name }} {{ tool.version }} 3 | {% if options.include_timestamp %} 4 | {% if tool.buildDate %} 5 | // Build date: {{ tool.buildDate }} 6 | {% endif %} 7 | {% if tool.runDate %} 8 | // on: {{ tool.runDate }}, {{ tool.runTime }} 9 | {% endif %} 10 | // C++ generator version: {{ features.releaseVersion }} 11 | {% endif %} 12 | {% endfilter %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_time_stamp.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | // This code was generated by {{ tool.name }} {{ tool.version }} 3 | {% if options.include_timestamp %} 4 | {% if tool.buildDate %} 5 | // Build date: {{ tool.buildDate }} 6 | {% endif %} 7 | {% if tool.runDate %} 8 | // on: {{ tool.runDate }}, {{ tool.runTime }} 9 | {% endif %} 10 | // C++ generator version: {{ features.releaseVersion }} 11 | {% endif %} 12 | {% endfilter %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.1/templates/_parameter.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders a description of a parameter, including default, minimum, and maximum values. 3 | {% endcomment %}{% filter java_parameter_wrap %}{{ parameter.description }} 4 | {% if parameter.default %}Default: {{ parameter.default }}.{% endif %} 5 | {% if parameter.minimum %}Minimum: {{ parameter.minimum }}.{% endif %} 6 | {% if parameter.maximum %}Maximum: {{ parameter.maximum }}.{% endif %} 7 | {% endfilter %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_time_stamp.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | // This code was generated by {{ tool.name }} {{ tool.version }} 3 | {% if options.include_timestamp %} 4 | {% if tool.buildDate %} 5 | // Build date: {{ tool.buildDate }} 6 | {% endif %} 7 | {% if tool.runDate %} 8 | // on: {{ tool.runDate }}, {{ tool.runTime }} 9 | {% endif %} 10 | // C++ generator version: {{ surfaceFeatures.releaseVersion }} 11 | {% endif %} 12 | {% endfilter %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.1/templates/_serialize.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders an expression evaluating to a function from a value of a particular type to JSON. 3 | [type] the data type. 4 | {% endcomment %}{% if type.arrayOf %}map({% call_template _serialize type=type.baseType %}){% else %}{% if type.mapOf %}mapValues({% call_template _serialize type=type.baseType %}){% else %}{% if type.isScalar %}identity{% else %}{{ type.className }}.serialize{% endif %}{% endif %}{% endif %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.1/templates/_parse.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders an expression evaluating to a function from JSON to value of a particular type. 3 | [type] the data type. 4 | {% endcomment %}{% if type.arrayOf %}map({% call_template _parse type=type.baseType %}){% else %}{% if type.mapOf %}mapValues({% call_template _parse type=type.baseType %}){% else %}{% if type.builtIn and not type.reference %}identity{% else %}{{ type.className }}.parse{% endif %}{% endif %}{% endif %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/_parse.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders an expression evaluating to a function from JSON to value of a particular type. 3 | [type] the data type. 4 | {% endcomment %}{% if type.arrayOf %}map({% call_template _parse type=type.baseType %}){% else %}{% if type.mapOf %}mapValues({% call_template _parse type=type.baseType %}){% else %}{% if type.builtIn and not type.reference %}identity{% else %}{{ type.className }}.parse{% endif %}{% endif %}{% endif %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/_serialize.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders an expression evaluating to a function from a value of a particular type to JSON. 3 | [type] the data type. 4 | {% endcomment %}{% if type.arrayOf %}map({% call_template _serialize type=type.baseType %}){% else %}{% if type.mapOf %}mapValues({% call_template _serialize type=type.baseType %}){% else %}{% if type.builtIn and not type.reference %}identity{% else %}{{ type.className }}.serialize{% endif %}{% endif %}{% endif %} 5 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders a resource class. 3 | [resource] the resource to render. 4 | {% endcomment %} 5 | class {{ resource.className }} extends Resource { 6 | 7 | {{ resource.className }}(Client client) : super(client) { 8 | } 9 | {% for m in resource.methods %} 10 | {% indent %}{% call_template _method method=m %}{% endindent %}{% endfor %} 11 | } 12 | {% for r in resource.resources %} 13 | {% call_template _resource resource=r %}{% endfor %} 14 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/sample/0.1/templates/_parameter_doc.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders a description of a parameter, including default, minimum, and maximum values. 3 | {% endcomment %}[{{ parameter.parameterName }}] {% filter java_parameter_wrap %}{{ parameter.description }} 4 | {% if parameter.default %} Default: {{ parameter.default }}.{% endif %} 5 | {% if parameter.minimum %} Minimum: {{ parameter.minimum }}.{% endif %} 6 | {% if parameter.maximum %} Maximum: {{ parameter.maximum }}.{% endif %} 7 | {% endfilter %} 8 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.0/templates/_func_params.tmpl: -------------------------------------------------------------------------------- 1 | {% parameter_list %} 2 | {% for p in method.requiredParameters %} 3 | {% parameter %}{{ p.typeHint }} ${{p.memberName}}{% end_parameter %} 4 | {% endfor %} 5 | {% if method.requestType %} 6 | {% parameter %} 7 | {{ api.ownerName }}_Service_{{ api.className }}_{{ method.requestType.className }} $postBody 8 | {% end_parameter %} 9 | {% endif %} 10 | {% parameter %}$optParams = array(){% end_parameter %} 11 | {% end_parameter_list %} 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.1/templates/_func_params.tmpl: -------------------------------------------------------------------------------- 1 | {% parameter_list %} 2 | {% for p in method.requiredParameters %} 3 | {% parameter %}{{ p.typeHint }} ${{p.memberName}}{% end_parameter %} 4 | {% endfor %} 5 | {% if method.requestType %} 6 | {% parameter %} 7 | {{ api.ownerName }}_Service_{{ api.className }}_{{ method.requestType.className }} $postBody 8 | {% end_parameter %} 9 | {% endif %} 10 | {% parameter %}$optParams = array(){% end_parameter %} 11 | {% end_parameter_list %} 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.4/templates/_func_params.tmpl: -------------------------------------------------------------------------------- 1 | {% parameter_list %} 2 | {% for p in method.requiredParameters %} 3 | {% parameter %}{{ p.typeHint }} ${{p.memberName}}{% end_parameter %} 4 | {% endfor %} 5 | {% if method.requestType %} 6 | {% parameter %} 7 | {{ api.ownerName }}_Service_{{ api.className }}_{{ method.requestType.className }} $postBody 8 | {% end_parameter %} 9 | {% endif %} 10 | {% parameter %}$optParams = array(){% end_parameter %} 11 | {% end_parameter_list %} 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.0/templates/_func_params.tmpl: -------------------------------------------------------------------------------- 1 | {% parameter_list %} 2 | {% for p in method.requiredParameters %} 3 | {% parameter %}{{ p.typeHint }} ${{p.memberName}}{% end_parameter %} 4 | {% endfor %} 5 | {% if method.requestType %} 6 | {% parameter %} 7 | {{ api.ownerName }}_Service_{{ api.className }}_{{ method.requestType.className }} $postBody 8 | {% end_parameter %} 9 | {% endif %} 10 | {% parameter %}$optParams = array(){% end_parameter %} 11 | {% end_parameter_list %} 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.1/templates/_func_params.tmpl: -------------------------------------------------------------------------------- 1 | {% parameter_list %} 2 | {% for p in method.requiredParameters %} 3 | {% parameter %}{{ p.typeHint }} ${{p.memberName}}{% end_parameter %} 4 | {% endfor %} 5 | {% if method.requestType %} 6 | {% parameter %} 7 | {{ api.ownerName }}_Service_{{ api.className }}_{{ method.requestType.className }} $postBody 8 | {% end_parameter %} 9 | {% endif %} 10 | {% parameter %}$optParams = array(){% end_parameter %} 11 | {% end_parameter_list %} 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.3.0/templates/_func_params.tmpl: -------------------------------------------------------------------------------- 1 | {% parameter_list %} 2 | {% for p in method.requiredParameters %} 3 | {% parameter %}{{ p.typeHint }} ${{p.memberName}}{% end_parameter %} 4 | {% endfor %} 5 | {% if method.requestType %} 6 | {% parameter %} 7 | {{ api.ownerName }}_Service_{{ api.className }}_{{ method.requestType.className }} $postBody 8 | {% end_parameter %} 9 | {% endif %} 10 | {% parameter %}$optParams = array(){% end_parameter %} 11 | {% end_parameter_list %} 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/_time_stamp.tmpl: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // This code was generated by {{ tool.name }} {{ tool.version }}{% if options.include_timestamp %} 3 | // Build date: {{ tool.buildDate }} 4 | // on: {{ tool.runDate }}, {{ tool.runTime }}{% endif %} 5 | // Objective-C generator version: {{ features.releaseVersion }} 6 | // 7 | // Changes to this file may cause incorrect behavior and will be lost if 8 | // the code is regenerated. 9 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/default/templates/_func_params.tmpl: -------------------------------------------------------------------------------- 1 | {% parameter_list %} 2 | {% for p in method.requiredParameters %} 3 | {% parameter %}{{ p.typeHint }} ${{p.memberName}}{% end_parameter %} 4 | {% endfor %} 5 | {% if method.requestType %} 6 | {% parameter %} 7 | {{ api.ownerName }}_Service_{{ api.className }}_{{ method.requestType.className }} $postBody 8 | {% end_parameter %} 9 | {% endif %} 10 | {% parameter %}$optParams = array(){% end_parameter %} 11 | {% end_parameter_list %} 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/sample/0.1/templates/_enum.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders an enumeration type. 3 | [param] the parameter with the enumerated type 4 | {% endcomment %} 5 | // Enum {{ param.parentPath|join:"." }}.{{ param.enumType.className }} 6 | // {{ param.description }} 7 | class {{ param.enumType.className }} { 8 | {% for element in param.enumType.elements %} 9 | // {{ element.description }} 10 | const {{ param.codeType }} {{ element.constantName }} = {% literal element.value %}; 11 | {% endfor %} 12 | } 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/languages/java/imports_test.java.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * Test block comment 3 | */ 4 | 5 | package {{ model.module.name }}; 6 | 7 | {% filter noblanklines %} 8 | import com.google.api.client.http.HttpHeaders; 9 | not an import 10 | import com.google.api.client.json.GenericJson; 11 | import com.google.api.client.auth.oauth2.draft10.GoogleAccessTokenRequest; 12 | {% endfilter %} 13 | 14 | class Test { 15 | public static void main(String args[]) { 16 | System.out.println("Testing Imports."); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_resource_cc.tmpl: -------------------------------------------------------------------------------- 1 | {{ resource.packageRelativeClassName }}::{{ resource.className }}({{ api.className }}* service) 2 | : service_(service){% for subresource in resource.resources %}, {{ subresource.memberName }}(service){% endfor %} { 3 | } 4 | 5 | {% for method in resource.methods %} 6 | 7 | {% call_template _method_factory_cc method=method %} 8 | {% endfor %} 9 | 10 | {% for subresource in resource.resources %} 11 | {% call_template _resource_cc resource=subresource %} 12 | {% endfor %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_resource_cc.tmpl: -------------------------------------------------------------------------------- 1 | {{ resource.packageRelativeClassName }}::{{ resource.className }}({{ api.className }}* service) 2 | : service_(service){% for subresource in resource.resources %}, {{ subresource.memberName }}(service){% endfor %} { 3 | } 4 | 5 | {% for method in resource.methods %} 6 | 7 | {% call_template _method_factory_cc method=method %} 8 | {% endfor %} 9 | 10 | {% for subresource in resource.resources %} 11 | {% call_template _resource_cc resource=subresource %} 12 | {% endfor %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_resource_cc.tmpl: -------------------------------------------------------------------------------- 1 | {{ resource.packageRelativeClassName }}::{{ resource.className }}({{ api.className }}* service) 2 | : service_(service){% for subresource in resource.resources %}, {{ subresource.memberName }}(service){% endfor %} { 3 | } 4 | 5 | {% for method in resource.methods %} 6 | 7 | {% call_template _method_factory_cc method=method %} 8 | {% endfor %} 9 | 10 | {% for subresource in resource.resources %} 11 | {% call_template _resource_cc resource=subresource %} 12 | {% endfor %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_resource_cc.tmpl: -------------------------------------------------------------------------------- 1 | {{ resource.packageRelativeClassName }}::{{ resource.className }}({{ api.className }}* service) 2 | : service_(service){% for subresource in resource.resources %}, {{ subresource.memberName }}(service){% endfor %} { 3 | } 4 | 5 | {% for method in resource.methods %} 6 | 7 | {% call_template _method_factory_cc method=method %} 8 | {% endfor %} 9 | 10 | {% for subresource in resource.resources %} 11 | {% call_template _resource_cc resource=subresource %} 12 | {% endfor %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/sample/0.1/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "A sample codegen template tree", 3 | # the releaseVersion should always match the name to this template folder. 4 | "releaseVersion": "0.1", 5 | "someVariable": "This string is from features.json", 6 | "requires": [ 7 | { 8 | "name": "The magic foo library that we need", 9 | "environments": ["*"], 10 | "version": "0", 11 | "files": [ 12 | { 13 | "type": "binary", 14 | "path": "lib/foo.lib" 15 | } 16 | ] 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/python/1.0/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "python", 3 | "description": "Python libraries for Google APIs.", 4 | "releaseVersion": "1.0", 5 | "requires": [ 6 | { 7 | "name": "Google APIs Client Library for Python", 8 | "environments": ["*"], 9 | "version": "1.0", 10 | "files": [ 11 | { 12 | "type": "bundle", 13 | "downloadUrl": "http://google-api-python-client.googlecode.com/files/google-api-python-client-gae-1.0.zip" 14 | } 15 | ] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/script_stubs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.7 2 | """A shim to surface codegen scripts as setuptools console scripts.""" 3 | 4 | from google.apputils import run_script_module 5 | 6 | 7 | def RunGenerateLibrary(): 8 | # pylint:disable=g-import-not-at-top 9 | from googleapis.codegen import generate_library 10 | run_script_module.RunScriptModule(generate_library) 11 | 12 | 13 | def RunExpandTemplates(): 14 | # pylint:disable=g-import-not-at-top 15 | from googleapis.codegen import expand_templates 16 | run_script_module.RunScriptModule(expand_templates) 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.0/templates/_resource_decl.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% if resource.json %} 3 | $this->{{ resource.phpPropName }} = new {{ api.ownerName }}_Service_{{ api.className }}_{{ resource.className }}_Resource( 4 | $this, 5 | $this->serviceName, 6 | '{{ resource.codeName }}', 7 | {% indent 4 %}{% call_template _methods_decl methods=resource.methods %}{% endindent %} 8 | ); 9 | {% endif %} 10 | 11 | {% for r in resource.resources %} 12 | {% call_template _resource_decl resource=r %} 13 | {% endfor %} 14 | {% endfilter %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.1/templates/_resource_decl.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% if resource.json %} 3 | $this->{{ resource.phpPropName }} = new {{ api.ownerName }}_Service_{{ api.className }}_{{ resource.className }}_Resource( 4 | $this, 5 | $this->serviceName, 6 | '{{ resource.codeName }}', 7 | {% indent 4 %}{% call_template _methods_decl methods=resource.methods %}{% endindent %} 8 | ); 9 | {% endif %} 10 | 11 | {% for r in resource.resources %} 12 | {% call_template _resource_decl resource=r %} 13 | {% endfor %} 14 | {% endfilter %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.4/templates/_resource_decl.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% if resource.json %} 3 | $this->{{ resource.phpPropName }} = new {{ api.ownerName }}_Service_{{ api.className }}_{{ resource.className }}_Resource( 4 | $this, 5 | $this->serviceName, 6 | '{{ resource.codeName }}', 7 | {% indent 4 %}{% call_template _methods_decl methods=resource.methods %}{% endindent %} 8 | ); 9 | {% endif %} 10 | 11 | {% for r in resource.resources %} 12 | {% call_template _resource_decl resource=r %} 13 | {% endfor %} 14 | {% endfilter %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.0/templates/_resource_decl.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% if resource.json %} 3 | $this->{{ resource.phpPropName }} = new {{ api.ownerName }}_Service_{{ api.className }}_Resource_{{ resource.className }}( 4 | $this, 5 | $this->serviceName, 6 | '{{ resource.codeName }}', 7 | {% indent 4 %}{% call_template _methods_decl methods=resource.methods %}{% endindent %} 8 | ); 9 | {% endif %} 10 | 11 | {% for r in resource.resources %} 12 | {% call_template _resource_decl resource=r %} 13 | {% endfor %} 14 | {% endfilter %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.1/templates/_resource_decl.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% if resource.json %} 3 | $this->{{ resource.phpPropName }} = new {{ api.ownerName }}_Service_{{ api.className }}_Resource_{{ resource.className }}( 4 | $this, 5 | $this->serviceName, 6 | '{{ resource.codeName }}', 7 | {% indent 4 %}{% call_template _methods_decl methods=resource.methods %}{% endindent %} 8 | ); 9 | {% endif %} 10 | 11 | {% for r in resource.resources %} 12 | {% call_template _resource_decl resource=r %} 13 | {% endfor %} 14 | {% endfilter %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.3.0/templates/_resource_decl.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% if resource.json %} 3 | $this->{{ resource.phpPropName }} = new {{ api.ownerName }}_Service_{{ api.className }}_Resource_{{ resource.className }}( 4 | $this, 5 | $this->serviceName, 6 | '{{ resource.codeName }}', 7 | {% indent 4 %}{% call_template _methods_decl methods=resource.methods %}{% endindent %} 8 | ); 9 | {% endif %} 10 | 11 | {% for r in resource.resources %} 12 | {% call_template _resource_decl resource=r %} 13 | {% endfor %} 14 | {% endfilter %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/default/templates/_resource_decl.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% if resource.json %} 3 | $this->{{ resource.phpPropName }} = new {{ api.ownerName }}_Service_{{ api.className }}_{{ resource.className }}_Resource( 4 | $this, 5 | $this->serviceName, 6 | '{{ resource.codeName }}', 7 | {% indent 4 %}{% call_template _methods_decl methods=resource.methods %}{% endindent %} 8 | ); 9 | {% endif %} 10 | 11 | {% for r in resource.resources %} 12 | {% call_template _resource_decl resource=r %} 13 | {% endfor %} 14 | {% endfilter %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_resource_property_row.tmpl: -------------------------------------------------------------------------------- 1 | {% for prop in schema.properties %} 2 | 3 | {% call_template _property_path schema=schema %}{{ prop.wireName }} 4 | {{ prop.type }} 5 | {% checksummed_div %}{{ schema.wireName}}-{{ prop.wireName }}-description{% divbody %}{{ prop.description }}{% endchecksummed_div %} 6 | 7 | {% if prop.data_type.isSchema and prop.data_type.anonymous %} 8 | {% call_template _resource_property_row schema prop.data_type %} 9 | {% endif %} 10 | {% endfor %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_resource_alt_json.tmpl: -------------------------------------------------------------------------------- 1 | { 2 | {% indent %}{% for prop in schema.properties %}{% noeol %} 3 | 4 | "{{ prop.wireName }}" 5 | : 6 | 7 | 8 | {% endnoeol %}{% if prop.data_type.isSchema and prop.data_type.anonymous %}{% call_template _resource_alt_json schema=prop.data_type %}{% else %}{{ prop.type }}{% endif %}{% noeol %} 9 | 10 | {% if not forloop.last %},{% endif %} 11 | {% eol %} 12 | 13 | {% endnoeol %}{% endfor %}{% endindent %}} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/default/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * The {@link RequestContext} used to call methods on the "{{ resource.wireName }}" collection. 3 | */ 4 | @JsonRpcService 5 | public interface {{ resource.className }}Context extends RequestContext { 6 | {% for method in resource.methods %}{% indent %} 7 | {% call_template _method method=method %}{% endindent %}{% endfor %} 8 | } 9 | {% if resource.resources %}public interface {{ resource.className }} { 10 | {% for r in resource.resources %}{% indent %} 11 | {% call_template _resource resource=r %}{% endindent %}{% endfor %} 12 | }{% endif %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_declare_method_attributes_h.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% for p in parameters %} 3 | {% if p.isPrimitive or p.data_type.json_type == 'string' %} 4 | {{ p.codeType }} {{ p.memberName }}; 5 | {% else %}{% if p.required %} 6 | {{p.codeType }} {{ p.memberName }}; 7 | {% else %} 8 | {{ api.client_namespace }}::JsonCppCapsule< {{ p.codeType }} > {{ p.memberName }}; 9 | {% endif %}{% endif %}{% endfor %} 10 | 11 | {% for p in parameters %} 12 | {% if not p.required %} 13 | bool _have_{{ p.memberName }} : 1; 14 | {% endif %} 15 | {% endfor %} 16 | {% endfilter %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_declare_method_attributes_h.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% for p in parameters %} 3 | {% if p.isPrimitive or p.data_type.json_type == 'string' %} 4 | {{ p.codeType }} {{ p.memberName }}; 5 | {% else %}{% if p.required %} 6 | {{p.codeType }} {{ p.memberName }}; 7 | {% else %} 8 | {{ api.client_namespace }}::JsonCppCapsule< {{ p.codeType }} > {{ p.memberName }}; 9 | {% endif %}{% endif %}{% endfor %} 10 | 11 | {% for p in parameters %} 12 | {% if not p.required %} 13 | bool _have_{{ p.memberName }} : 1; 14 | {% endif %} 15 | {% endfor %} 16 | {% endfilter %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_declare_method_attributes_h.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% for p in parameters %} 3 | {% if p.isPrimitive or p.data_type.json_type == 'string' %} 4 | {{ p.codeType }} {{ p.memberName }}; 5 | {% else %}{% if p.required %} 6 | {{p.codeType }} {{ p.memberName }}; 7 | {% else %} 8 | {{ api.client_namespace }}::JsonCppCapsule< {{ p.codeType }} > {{ p.memberName }}; 9 | {% endif %}{% endif %}{% endfor %} 10 | 11 | {% for p in parameters %} 12 | {% if not p.required %} 13 | bool _have_{{ p.memberName }} : 1; 14 | {% endif %} 15 | {% endfor %} 16 | {% endfilter %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_declare_method_attributes_h.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | {% for p in parameters %} 3 | {% if p.isPrimitive or p.data_type.json_type == 'string' %} 4 | {{ p.codeType }} {{ p.memberName }}; 5 | {% else %}{% if p.required %} 6 | {{p.codeType }} {{ p.memberName }}; 7 | {% else %} 8 | {{ api.client_namespace }}::JsonCppCapsule< {{ p.codeType }} > {{ p.memberName }}; 9 | {% endif %}{% endif %}{% endfor %} 10 | 11 | {% for p in parameters %} 12 | {% if not p.required %} 13 | bool _have_{{ p.memberName }} : 1; 14 | {% endif %} 15 | {% endfor %} 16 | {% endfilter %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/0.4-alpha/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * The {@link RequestContext} used to call methods on the "{{ resource.wireName }}" collection. 3 | */ 4 | @JsonRpcService 5 | public interface {{ resource.className }}Context extends RequestContext { 6 | {% for method in resource.methods %}{% indent %} 7 | {% call_template _method method=method %}{% endindent %}{% endfor %} 8 | } 9 | {% if resource.resources %}public interface {{ resource.className }} { 10 | {% for r in resource.resources %}{% indent %} 11 | {% call_template _resource resource=r %}{% endindent %}{% endfor %} 12 | }{% endif %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/golden/diff_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Diff two files and PASS if they are equal, FAIL otherwise. 3 | # Usage: 4 | # diff_test.sh path_to_expected path_to_got 5 | 6 | # Find input files 7 | declare -r EXPECTED="$1" 8 | declare -r GOT="$2" 9 | 10 | diff_out=$(mktemp /tmp/diff_test.XXXXXXXXX) 11 | diff -cB "$EXPECTED" "$GOT" >"$diff_out" 12 | err=0 13 | if [[ -s "$diff_out" ]] ; then 14 | cat "$diff_out" 15 | err=1 16 | echo 'To update:' 17 | echo ' p4 edit ' "$EXPECTED" 18 | echo ' cp blaze-genfiles/'"$GOT" "$EXPECTED" 19 | echo FAIL 20 | else 21 | echo PASS 22 | fi 23 | exit $err 24 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_declare_method_attributes_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% noeol %}{% for p in parameters %} 2 | {% if p.required %},{% eol %} 3 | {{ p.memberName }}({{ p.parameterName }}{% if p.parameterCodeType == 'StringPiece' %}.as_string(){% endif %}) 4 | {% elif p.default %},{% eol %} 5 | {{ p.memberName }}({% if p.data_type.json_type == 'string' and not p.isPrimitive %}"{{ p.default }}"{% else %}{{ p.default }}{% endif %}) 6 | {% endif %} 7 | {% endfor %} 8 | {% for p in parameters %} 9 | {% if not p.required %},{% eol %} 10 | _have_{{ p.memberName }}(false) 11 | {% endif %} 12 | {% endfor %}{% endnoeol %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_declare_method_attributes_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% noeol %}{% for p in parameters %} 2 | {% if p.required %},{% eol %} 3 | {{ p.memberName }}({{ p.parameterName }}{% if p.parameterCodeType == 'StringPiece' %}.as_string(){% endif %}) 4 | {% elif p.default %},{% eol %} 5 | {{ p.memberName }}({% if p.data_type.json_type == 'string' and not p.isPrimitive %}"{{ p.default }}"{% else %}{{ p.default }}{% endif %}) 6 | {% endif %} 7 | {% endfor %} 8 | {% for p in parameters %} 9 | {% if not p.required %},{% eol %} 10 | _have_{{ p.memberName }}(false) 11 | {% endif %} 12 | {% endfor %}{% endnoeol %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_declare_method_attributes_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% noeol %}{% for p in parameters %} 2 | {% if p.required %},{% eol %} 3 | {{ p.memberName }}({{ p.parameterName }}{% if p.parameterCodeType == 'StringPiece' %}.as_string(){% endif %}) 4 | {% elif p.default %},{% eol %} 5 | {{ p.memberName }}({% if p.data_type.json_type == 'string' and not p.isPrimitive %}"{{ p.default }}"{% else %}{{ p.default }}{% endif %}) 6 | {% endif %} 7 | {% endfor %} 8 | {% for p in parameters %} 9 | {% if not p.required %},{% eol %} 10 | _have_{{ p.memberName }}(false) 11 | {% endif %} 12 | {% endfor %}{% endnoeol %} 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_append_query_parameter_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if variable.data_type.json_type == 'array' %} 2 | if (!{{ variable.memberName }}.empty()) { 3 | target->append(sep); 4 | {{ api.client_namespace }}::AppendIteratorToUrl( 5 | {{ variable.memberName }}.begin(), {{ variable.memberName }}.end(), 6 | "{{ variable.wireName }}", target); 7 | sep = "&"; 8 | } 9 | {% else %} 10 | StrAppend(target, sep, "{{ variable.wireName }}=", 11 | {{ api.client_namespace }}::CppValueToEscapedUrlValue( 12 | {{ variable.memberName }})); 13 | sep = "&"; 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_append_query_parameter_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if variable.data_type.json_type == 'array' %} 2 | if (!{{ variable.memberName }}.empty()) { 3 | target->append(sep); 4 | {{ api.client_namespace }}::AppendIteratorToUrl( 5 | {{ variable.memberName }}.begin(), {{ variable.memberName }}.end(), 6 | "{{ variable.wireName }}", target); 7 | sep = "&"; 8 | } 9 | {% else %} 10 | StrAppend(target, sep, "{{ variable.wireName }}=", 11 | {{ api.client_namespace }}::CppValueToEscapedUrlValue( 12 | {{ variable.memberName }})); 13 | sep = "&"; 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_append_query_parameter_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if variable.data_type.json_type == 'array' %} 2 | if (!{{ variable.memberName }}.empty()) { 3 | target->append(sep); 4 | {{ api.client_namespace }}::AppendIteratorToUrl( 5 | {{ variable.memberName }}.begin(), {{ variable.memberName }}.end(), 6 | "{{ variable.wireName }}", target); 7 | sep = "&"; 8 | } 9 | {% else %} 10 | StrAppend(target, sep, "{{ variable.wireName }}=", 11 | {{ api.client_namespace }}::CppValueToEscapedUrlValue( 12 | {{ variable.memberName }})); 13 | sep = "&"; 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/___package___/___api_kitchensink___.h.tmpl: -------------------------------------------------------------------------------- 1 | {% language cpp %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | #ifndef {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 5 | #define {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 6 | {% if options.useSingleSourceFile %} 7 | {% call_template _monolithic_kitchensink_h_impl api=api %} 8 | {% else %} 9 | {% for m in api.sortedTopLevelModels %}#include "{{ m.include_path }}" 10 | {% endfor %} 11 | #include "{{ api.include_path }}" 12 | {% endif %} 13 | 14 | #endif // {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/___package___/___api_kitchensink___.h.tmpl: -------------------------------------------------------------------------------- 1 | {% language cpp %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | #ifndef {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 5 | #define {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 6 | {% if options.useSingleSourceFile %} 7 | {% call_template _monolithic_kitchensink_h_impl api=api %} 8 | {% else %} 9 | {% for m in api.sortedTopLevelModels %}#include "{{ m.include_path }}" 10 | {% endfor %} 11 | #include "{{ api.include_path }}" 12 | {% endif %} 13 | 14 | #endif // {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/___package___/___api_kitchensink___.h.tmpl: -------------------------------------------------------------------------------- 1 | {% language cpp %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | #ifndef {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 5 | #define {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 6 | {% if options.useSingleSourceFile %} 7 | {% call_template _monolithic_kitchensink_h_impl api=api %} 8 | {% else %} 9 | {% for m in api.sortedTopLevelModels %}#include "{{ m.include_path }}" 10 | {% endfor %} 11 | #include "{{ api.include_path }}" 12 | {% endif %} 13 | 14 | #endif // {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_append_query_parameter_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% if variable.data_type.json_type == 'array' %} 2 | if (!{{ variable.memberName }}.empty()) { 3 | target->append(sep); 4 | {{ api.client_namespace }}::AppendIteratorToUrl( 5 | {{ variable.memberName }}.begin(), {{ variable.memberName }}.end(), 6 | "{{ variable.wireName }}", target); 7 | sep = "&"; 8 | } 9 | {% else %} 10 | absl::StrAppend(target, sep, "{{ variable.wireName }}=", 11 | {{ api.client_namespace }}::CppValueToEscapedUrlValue( 12 | {{ variable.memberName }})); 13 | sep = "&"; 14 | {% endif %} 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/___package___/___api_kitchensink___.h.tmpl: -------------------------------------------------------------------------------- 1 | {% language cpp %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | #ifndef {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 5 | #define {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 6 | {% if options.useSingleSourceFile %} 7 | {% call_template _monolithic_kitchensink_h_impl api=api %} 8 | {% else %} 9 | {% for m in api.sortedTopLevelModels %}#include "{{ m.include_path }}" 10 | {% endfor %} 11 | #include "{{ api.include_path }}" 12 | {% endif %} 13 | 14 | #endif // {{ api.module.name|upper }}_{{ api.kitchensink|upper }}_H_ 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/index.html.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 |
11 |

API Reference

12 |
13 |

This API reference is organized by resource type. Each resource type has one or more data representations and one or more methods.

14 | {% for r in api.resources %} 15 | {% call_template _index_resource_info resource=r %} 16 | {% endfor %} 17 |
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/default/templates/___package___/package-info.java.tmpl: -------------------------------------------------------------------------------- 1 | {% language java %}{% copyright_block %} 2 | 3 | /** 4 | * Support classes to facilitate interaction with {{ api.version }} of the {{ api.name }} service. 5 | * 6 | *

7 | * {{ api.description }} 8 | *

9 | * 10 | *

11 | * To get started in your code, call {@code GWT.create({{ api.className }}.class)} 12 | *

13 | * 14 | *

15 | * For more information about this service, see the 16 | * API Documentation 17 | *

18 | * 19 | * @author Google, Inc. 20 | */ 21 | package {{ api.module.name }}; 22 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.0/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.1/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.20.0/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.21.0/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.22.0/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.23.0/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.0/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.1/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.25.0/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/default/templates/_model_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if not model.isSchema %}{% for child in model.children %}{% call_template _model_def model=child %}{% endfor %}{% else %} 2 | /**{% filter block_comment %} 3 | * {% if model.description %}{{ model.description }}{% else %}Model definition for {{ model.className }}.{% endif %}{% endfilter %} 4 | */ 5 | public static final class {{ model.safeClassName }} extends com.google.api.client.json.GenericJson { 6 | 7 | {% call_template _model_content_def current_model=child %} 8 | {% for child in model.children %}{% indent %}{% call_template _model_def model=child %}{% endindent %}{% endfor %} 9 | }{% endif %} 10 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/0.4-alpha/templates/___package___/package-info.java.tmpl: -------------------------------------------------------------------------------- 1 | {% language java %}{% copyright_block %} 2 | 3 | /** 4 | * Support classes to facilitate interaction with {{ api.version }} of the {{ api.name }} service. 5 | * 6 | *

7 | * {{ api.description }} 8 | *

9 | * 10 | *

11 | * To get started in your code, call {@code GWT.create({{ api.className }}.class)} 12 | *

13 | * 14 | *

15 | * For more information about this service, see the 16 | * API Documentation 17 | *

18 | * 19 | * @author Google, Inc. 20 | */ 21 | package {{ api.module.name }}; 22 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/google_api____api_name_______api_version___/lib/___api_name_______api_version____api_browser.dart.tmpl: -------------------------------------------------------------------------------- 1 | library {{ api.name }}_{{ api.version }}_api_browser; 2 | 3 | import "{{ api.name }}_{{ api.version }}_api_client.dart"; 4 | export "{{ api.name }}_{{ api.version }}_api_client.dart"; 5 | 6 | import "dart:core" as core; 7 | import "dart:html" as html; 8 | import "dart:async" as async; 9 | import "dart:convert"; 10 | import "package:js/js.dart" as js; 11 | import "package:google_oauth2_client/google_oauth2_browser.dart" as oauth; 12 | 13 | part "src/browser/browserclient.dart"; 14 | part "src/browser/{{ api.name }}.dart"; 15 | 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.2/templates/_time_stamp.tmpl: -------------------------------------------------------------------------------- 1 | 2 | //------------------------------------------------------------------------------ 3 | // 4 | // This code was generated by {{ tool.name }} {{ tool.version }}{% if options.include_timestamp %} 5 | // Build date: {{ tool.buildDate }} 6 | // on: {{ tool.runDate }}, {{ tool.runTime }}{% endif %} 7 | // C# generater version: {{ features.releaseVersion }} 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_service_scopes_h.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.authscopes %}{% doc_comment noblock %} 2 | Declares the OAuth2.0 scopes used within {{ api.title }} 3 | 4 | These scopes shoudl be used when asking for credentials to invoke methods 5 | in the {{ api.className }}. 6 | {% enddoc_comment %} 7 | class SCOPES { 8 | public:{% indent %}{% for authscope in api.authscopes %} 9 | {% doc_comment noblock %} 10 | {{ authscope.description }} 11 | {% enddoc_comment %} 12 | static const char {{ authscope.name|upper }}[]; 13 | {% endfor %}{% endindent %} 14 | private: 15 | SCOPES(); // Never instantiated. 16 | ~SCOPES(); // Never instantiated. 17 | }; 18 | {% endif %} 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/default/templates/_time_stamp.tmpl: -------------------------------------------------------------------------------- 1 | 2 | //------------------------------------------------------------------------------ 3 | // 4 | // This code was generated by {{ tool.name }} {{ tool.version }}{% if options.include_timestamp %} 5 | // Build date: {{ tool.buildDate }} 6 | // on: {{ tool.runDate }}, {{ tool.runTime }}{% endif %} 7 | // C# generator version: {{ features.releaseVersion }} 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/utilities/html_stripper.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.7 2 | # 3 | # Copyright 2011 Google Inc. All Rights Reserved. 4 | 5 | """HTMLStripper based on HTMLParser.""" 6 | 7 | 8 | __author__ = 'wclarkso@google.com (Will Clarkson)' 9 | 10 | import HTMLParser 11 | 12 | 13 | class HTMLStripper(HTMLParser.HTMLParser): 14 | """Simple class to strip tags from HTML.""" 15 | 16 | def __init__(self): 17 | HTMLParser.HTMLParser.__init__(self) 18 | self.reset() 19 | self.fed = [] 20 | 21 | def handle_data(self, d): 22 | self.fed.append(d) 23 | 24 | def GetFedData(self): 25 | return ''.join(self.fed) 26 | 27 | def ClearFedData(self): 28 | self.fed = [] 29 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_service_scopes_h.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.authscopes %}{% doc_comment noblock %} 2 | Declares the OAuth2.0 scopes used within {{ api.title }} 3 | 4 | These scopes shoudl be used when asking for credentials to invoke methods 5 | in the {{ api.className }}. 6 | {% enddoc_comment %} 7 | class SCOPES { 8 | public:{% indent %}{% for authscope in api.authscopes %} 9 | {% doc_comment noblock %} 10 | {{ authscope.description }} 11 | {% enddoc_comment %} 12 | static const StringPiece {{ authscope.name|upper }}; 13 | {% endfor %}{% endindent %} 14 | private: 15 | SCOPES(); // Never instantiated. 16 | ~SCOPES(); // Never instantiated. 17 | }; 18 | {% endif %} 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_service_scopes_h.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.authscopes %}{% doc_comment noblock %} 2 | Declares the OAuth2.0 scopes used within {{ api.title }} 3 | 4 | These scopes shoudl be used when asking for credentials to invoke methods 5 | in the {{ api.className }}. 6 | {% enddoc_comment %} 7 | class SCOPES { 8 | public:{% indent %}{% for authscope in api.authscopes %} 9 | {% doc_comment noblock %} 10 | {{ authscope.description }} 11 | {% enddoc_comment %} 12 | static const char {{ authscope.name|upper }}[]; 13 | {% endfor %}{% endindent %} 14 | private: 15 | SCOPES(); // Never instantiated. 16 | ~SCOPES(); // Never instantiated. 17 | }; 18 | {% endif %} 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.0/templates/_time_stamp.tmpl: -------------------------------------------------------------------------------- 1 | 2 | //------------------------------------------------------------------------------ 3 | // 4 | // This code was generated by {{ tool.name }} {{ tool.version }}{% if options.include_timestamp %} 5 | // Build date: {{ tool.buildDate }} 6 | // on: {{ tool.runDate }}, {{ tool.runTime }}{% endif %} 7 | // C# generater version: {{ surfaceFeatures.releaseVersion }} 8 | // 9 | // Changes to this file may cause incorrect behavior and will be lost if 10 | // the code is regenerated. 11 | // 12 | //------------------------------------------------------------------------------ 13 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.0/templates/_methods_decl.tmpl: -------------------------------------------------------------------------------- 1 | array( 2 | 'methods' => array( 3 | {% for method in methods %}{% literal method.wireName %} => array( 4 | 'path' => {% literal method.path %}, 5 | 'httpMethod' => {% literal method.httpMethod %}, 6 | 'parameters' => array({% for p in method.parameters %} 7 | {% literal p.wireName %} => array( 8 | 'location' => {% literal p.location %}, 9 | 'type' => {% literal p.type %}, 10 | {% if p.repeated %}'repeated' => true,{% endif %} 11 | {% if p.required %}'required' => true,{% endif %} 12 | ), 13 | {% endfor %}), 14 | ),{% endfor %} 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.1/templates/_methods_decl.tmpl: -------------------------------------------------------------------------------- 1 | array( 2 | 'methods' => array( 3 | {% for method in methods %}{% literal method.wireName %} => array( 4 | 'path' => {% literal method.path %}, 5 | 'httpMethod' => {% literal method.httpMethod %}, 6 | 'parameters' => array({% for p in method.parameters %} 7 | {% literal p.wireName %} => array( 8 | 'location' => {% literal p.location %}, 9 | 'type' => {% literal p.type %}, 10 | {% if p.repeated %}'repeated' => true,{% endif %} 11 | {% if p.required %}'required' => true,{% endif %} 12 | ), 13 | {% endfor %}), 14 | ),{% endfor %} 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.4/templates/_methods_decl.tmpl: -------------------------------------------------------------------------------- 1 | array( 2 | 'methods' => array( 3 | {% for method in methods %}{% literal method.wireName %} => array( 4 | 'path' => {% literal method.path %}, 5 | 'httpMethod' => {% literal method.httpMethod %}, 6 | 'parameters' => array({% for p in method.parameters %} 7 | {% literal p.wireName %} => array( 8 | 'location' => {% literal p.location %}, 9 | 'type' => {% literal p.type %}, 10 | {% if p.repeated %}'repeated' => true,{% endif %} 11 | {% if p.required %}'required' => true,{% endif %} 12 | ), 13 | {% endfor %}), 14 | ),{% endfor %} 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.0/templates/_methods_decl.tmpl: -------------------------------------------------------------------------------- 1 | array( 2 | 'methods' => array( 3 | {% for method in methods %}{% literal method.wireName %} => array( 4 | 'path' => {% literal method.path %}, 5 | 'httpMethod' => {% literal method.httpMethod %}, 6 | 'parameters' => array({% for p in method.parameters %} 7 | {% literal p.wireName %} => array( 8 | 'location' => {% literal p.location %}, 9 | 'type' => {% literal p.type %}, 10 | {% if p.repeated %}'repeated' => true,{% endif %} 11 | {% if p.required %}'required' => true,{% endif %} 12 | ), 13 | {% endfor %}), 14 | ),{% endfor %} 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.1/templates/_methods_decl.tmpl: -------------------------------------------------------------------------------- 1 | array( 2 | 'methods' => array( 3 | {% for method in methods %}{% literal method.wireName %} => array( 4 | 'path' => {% literal method.path %}, 5 | 'httpMethod' => {% literal method.httpMethod %}, 6 | 'parameters' => array({% for p in method.parameters %} 7 | {% literal p.wireName %} => array( 8 | 'location' => {% literal p.location %}, 9 | 'type' => {% literal p.type %}, 10 | {% if p.repeated %}'repeated' => true,{% endif %} 11 | {% if p.required %}'required' => true,{% endif %} 12 | ), 13 | {% endfor %}), 14 | ),{% endfor %} 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.3.0/templates/_methods_decl.tmpl: -------------------------------------------------------------------------------- 1 | array( 2 | 'methods' => array( 3 | {% for method in methods %}{% literal method.wireName %} => array( 4 | 'path' => {% literal method.path %}, 5 | 'httpMethod' => {% literal method.httpMethod %}, 6 | 'parameters' => array({% for p in method.parameters %} 7 | {% literal p.wireName %} => array( 8 | 'location' => {% literal p.location %}, 9 | 'type' => {% literal p.type %}, 10 | {% if p.repeated %}'repeated' => true,{% endif %} 11 | {% if p.required %}'required' => true,{% endif %} 12 | ), 13 | {% endfor %}), 14 | ),{% endfor %} 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_service_scopes_h.tmpl: -------------------------------------------------------------------------------- 1 | {% if api.authscopes %}{% doc_comment noblock %} 2 | Declares the OAuth2.0 scopes used within {{ api.title }} 3 | 4 | These scopes shoudl be used when asking for credentials to invoke methods 5 | in the {{ api.className }}. 6 | {% enddoc_comment %} 7 | class SCOPES { 8 | public:{% indent %}{% for authscope in api.authscopes %} 9 | {% doc_comment noblock %} 10 | {{ authscope.description }} 11 | {% enddoc_comment %} 12 | static const StringPiece {{ authscope.name|upper }}; 13 | {% endfor %}{% endindent %} 14 | private: 15 | SCOPES(); // Never instantiated. 16 | ~SCOPES(); // Never instantiated. 17 | }; 18 | {% endif %} 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/default/templates/_methods_decl.tmpl: -------------------------------------------------------------------------------- 1 | array( 2 | 'methods' => array( 3 | {% for method in methods %}{% literal method.wireName %} => array( 4 | 'path' => {% literal method.path %}, 5 | 'httpMethod' => {% literal method.httpMethod %}, 6 | 'parameters' => array({% for p in method.parameters %} 7 | {% literal p.wireName %} => array( 8 | 'location' => {% literal p.location %}, 9 | 'type' => {% literal p.type %}, 10 | {% if p.repeated %}'repeated' => true,{% endif %} 11 | {% if p.required %}'required' => true,{% endif %} 12 | ), 13 | {% endfor %}), 14 | ),{% endfor %} 15 | ) 16 | ) 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.2/templates/google_api____api_name_______api_version___/lib/___api_name_______api_version____api_console.dart.tmpl: -------------------------------------------------------------------------------- 1 | library {{ api.name }}_{{ api.version }}_api_console; 2 | 3 | import "{{ api.name }}_{{ api.version }}_api_client.dart"; 4 | export "{{ api.name }}_{{ api.version }}_api_client.dart"; 5 | 6 | import "dart:core" as core; 7 | import "dart:io" as io; 8 | import "dart:async" as async; 9 | import "dart:uri" as uri; 10 | import "dart:convert"; 11 | import "package:http/http.dart" as http; 12 | import "package:google_oauth2_client/google_oauth2_console.dart" as oauth2; 13 | 14 | part "src/console/consoleclient.dart"; 15 | part "src/console/{{ api.name }}.dart"; 16 | 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/___package___/___api_className___Constants.m.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | // 5 | // {{ api.className }}Constants.m 6 | // 7 | 8 | // ---------------------------------------------------------------------------- 9 | // NOTE: This file is generated from Google API Discovery Service. 10 | // Service: 11 | // {{ api.title }} ({{ api.name }}/{{ api.version }}) 12 | // Description: 13 | // {{ api.description }} 14 | {% if api.documentationLink %}// Documentation: 15 | // {{ api.documentationLink }} 16 | {% endif %} 17 | #import "{{ api.className }}Constants.h" 18 | {% call_template _constants_m_impl %} 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.0/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.1/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.20.0/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.21.0/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.22.0/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.23.0/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.0/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.1/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.25.0/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.1/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * The "{{ resource.wireName }}" collection of methods. 3 | * Typical usage is: 4 | * 5 | * ${{ api.name }}Service = new {{ api.ownerName }}_Service_{{ api.className }}(...); 6 | * ${{ resource.codeName }} = ${{ api.name }}Service->{{ resource.codeName }}; 7 | * 8 | */ 9 | class {{ api.ownerName }}_Service_{{ api.className }}_{{ resource.className }}_Resource extends Google_Service_Resource 10 | {{% indent %}{% for method in resource.methods %} 11 | {% call_template _method method=method %}{% endfor %} 12 | {% endindent %}} 13 | {% for subr in resource.resources %} 14 | {% call_template _resource resource=subr %}{% endfor %} 15 | 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.4/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * The "{{ resource.wireName }}" collection of methods. 3 | * Typical usage is: 4 | * 5 | * ${{ api.name }}Service = new {{ api.ownerName }}_Service_{{ api.className }}(...); 6 | * ${{ resource.codeName }} = ${{ api.name }}Service->{{ resource.codeName }}; 7 | * 8 | */ 9 | class {{ api.ownerName }}_Service_{{ api.className }}_{{ resource.className }}_Resource extends Google_Service_Resource 10 | {{% indent %}{% for method in resource.methods %} 11 | {% call_template _method method=method %}{% endfor %} 12 | {% endindent %}} 13 | {% for subr in resource.resources %} 14 | {% call_template _resource resource=subr %}{% endfor %} 15 | 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.0/templates/___api_className___/Resource/___resources_className___.php.tmpl: -------------------------------------------------------------------------------- 1 | 8 | * ${{ api.name }}Service = new {{ api.ownerName }}_Service_{{ api.className }}(...); 9 | * ${{ resource.codeName }} = ${{ api.name }}Service->{{ resource.codeName }}; 10 | * 11 | */ 12 | class {{ api.ownerName }}_Service_{{ api.className }}_Resource_{{ resource.className }} extends Google_Service_Resource 13 | {{% indent %}{% for method in resource.methods %} 14 | {% call_template _method method=method %}{% endfor %} 15 | {% endindent %}} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.2.1/templates/___api_className___/Resource/___resources_className___.php.tmpl: -------------------------------------------------------------------------------- 1 | 8 | * ${{ api.name }}Service = new {{ api.ownerName }}_Service_{{ api.className }}(...); 9 | * ${{ resource.codeName }} = ${{ api.name }}Service->{{ resource.codeName }}; 10 | * 11 | */ 12 | class {{ api.ownerName }}_Service_{{ api.className }}_Resource_{{ resource.className }} extends Google_Service_Resource 13 | {{% indent %}{% for method in resource.methods %} 14 | {% call_template _method method=method %}{% endfor %} 15 | {% endindent %}} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.3.0/templates/___api_className___/Resource/___resources_className___.php.tmpl: -------------------------------------------------------------------------------- 1 | 8 | * ${{ api.name }}Service = new {{ api.ownerName }}_Service_{{ api.className }}(...); 9 | * ${{ resource.codeName }} = ${{ api.name }}Service->{{ resource.codeName }}; 10 | * 11 | */ 12 | class {{ api.ownerName }}_Service_{{ api.className }}_Resource_{{ resource.className }} extends Google_Service_Resource 13 | {{% indent %}{% for method in resource.methods %} 14 | {% call_template _method method=method %}{% endfor %} 15 | {% endindent %}} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/default/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * The "{{ resource.wireName }}" collection of methods. 3 | * Typical usage is: 4 | * 5 | * ${{ api.name }}Service = new {{ api.ownerName }}_Service_{{ api.className }}(...); 6 | * ${{ resource.codeName }} = ${{ api.name }}Service->{{ resource.codeName }}; 7 | * 8 | */ 9 | class {{ api.ownerName }}_Service_{{ api.className }}_{{ resource.className }}_Resource extends Google_Service_Resource 10 | {{% indent %}{% for method in resource.methods %} 11 | {% call_template _method method=method %}{% endfor %} 12 | {% endindent %}} 13 | {% for subr in resource.resources %} 14 | {% call_template _resource resource=subr %}{% endfor %} 15 | 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/default/templates/_alt_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | This template is used to determine when alt should be set to "json" in a method. 3 | set("alt", "json") is generated if any of the cases are true: 4 | * If method parameter alt!=json. 5 | * If method does not have an alt parameter and global parameter alt!=json. 6 | * If method does not have an alt parameter and global parameters does not have an alt parameter. 7 | {% endcomment %} 8 | {% if method.alt.default %} 9 | {% ifnotequal method.alt.default "json" %} 10 | set("alt", "json"); 11 | {% endifnotequal %} 12 | {% else %} 13 | {% ifnotequal api.alt.default "json" %} 14 | set("alt", "json"); 15 | {% endifnotequal %} 16 | {% endif %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/php/1.1.0/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * The "{{ resource.wireName }}" collection of methods. 3 | * Typical usage is: 4 | * 5 | * ${{ api.name }}Service = new {{ api.ownerName }}_Service_{{ api.className }}(...); 6 | * ${{ resource.codeName }} = ${{ api.name }}Service->{{ resource.codeName }}; 7 | * 8 | */ 9 | class {{ api.ownerName }}_Service_{{ api.className }}_{{ resource.className }}_Resource extends Google_Service_Resource 10 | {{% indent %} 11 | {% for method in resource.methods %} 12 | {% call_template _method method=method %}{% endfor %} 13 | {% endindent %}} 14 | {% for subr in resource.resources %} 15 | {% call_template _resource resource=subr %}{% endfor %} 16 | 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.0/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.1/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.20.0/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.21.0/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.22.0/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.23.0/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.0/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.1/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.25.0/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/default/templates/_required_param_def.tmpl: -------------------------------------------------------------------------------- 1 | {% for property in properties %} 2 | {% if property.data_type.required_for_methods %} 3 | {% for required_method in property.data_type.required_for_methods %} 4 | {% ifequal method.id required_method %} 5 | checkRequiredParameter(content, "content"); 6 | checkRequiredParameter(content{% param_getter_chain property %}, "{{ method.requestType.class_name }}{% param_getter_chain property %}"); 7 | {% if property.data_type.properties %} 8 | {% call_template _required_param_def properties=property.data_type.properties %} 9 | {% endif %} 10 | {% endifequal %} 11 | {% endfor %} 12 | {% endif %} 13 | {% endfor %} 14 | 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/___package___/___api_className___.h.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | // 5 | // {{ api.className }}.h 6 | // 7 | 8 | // ---------------------------------------------------------------------------- 9 | // NOTE: This file is generated from Google API Discovery Service. 10 | // Service: 11 | // {{ api.title }} ({{ api.name }}/{{ api.version }}) 12 | // Description: 13 | // {{ api.description }} 14 | 15 | #import "{{ api.className }}Constants.h" 16 | 17 | {% for model in api.models %}#import "{{ model.className }}.h" 18 | {% endfor %} 19 | {% if api.query %}#import "{{ api.query }}.h" 20 | {% endif %}#import "{{ api.serviceName }}.h" 21 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_index_resource_info.tmpl: -------------------------------------------------------------------------------- 1 |
2 |

{{ resource.className }}

3 |

For {{ resource.className }} Resource details, see the resource representation page.

4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | {% for m in resource.methods %} 13 | 14 | 15 | 16 | 17 | {% endfor %} 18 | 19 |
MethodREST URIDescription
{{ m.wireName }}{{ m.httpMethod }} {{ m.path }}{{ m.description }}
20 |
21 | 22 | {% for subres in resource.resources %} 23 | {% call_template _index_resource_info resource=subres %} 24 | {% endfor %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/___package___/___api_serviceName___.m.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | // 5 | // {{ api.serviceName }}.m 6 | // 7 | 8 | // ---------------------------------------------------------------------------- 9 | // NOTE: This file is generated from Google API Discovery Service. 10 | // Service: 11 | // {{ api.title }} ({{ api.name }}/{{ api.version }}) 12 | // Description: 13 | // {{ api.description }} 14 | // Classes: 15 | // {{ api.serviceName }} (0 custom class methods, 0 custom properties) 16 | {% if api.documentationLink %}// Documentation: 17 | // {{ api.documentationLink }} 18 | {% endif %} 19 | #import "{{ api.className }}.h" 20 | 21 | {% call_template _service_m_impl %} 22 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/___package___/___topLevelModels_className___.m.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% copyright_block %} 2 | 3 | // 4 | // {{ model.className }}.m 5 | // 6 | 7 | // ---------------------------------------------------------------------------- 8 | // NOTE: This file is generated from Google API Discovery Service. 9 | // Service: 10 | // {{ api.title }} ({{ api.name }}/{{ api.version }}) 11 | // Description: 12 | // {{ api.description }} 13 | // Classes: 14 | // {{ model.className }} (0 custom class methods, {{ model.properties|length }} custom properties) 15 | 16 | #import "{{ model.className }}.h" 17 | {% if model.importManager %} 18 | {% imports model %}{% endimports %} 19 | {% endif %} 20 | {% call_template _model_m_impl model=model %} 21 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_declare_method_attributes_cc.tmpl: -------------------------------------------------------------------------------- 1 | {% parameter_list ,\n\b\b append %} 2 | {% for p in parameters %} 3 | {% if p.required %} 4 | {% parameter %}{{ p.memberName }}({% if p.parameterCodeType == 'StringPiece' %}string({{ p.parameterName }}){% else %}{{ p.parameterName }}{% endif %}) 5 | {% end_parameter %} 6 | {% elif p.default %} 7 | {% parameter %}{{ p.memberName }}({% if p.data_type.json_type == 'string' and not p.isPrimitive %}"{{ p.default }}"{% else %}{{ p.default }}{% endif %}) 8 | {% end_parameter %} 9 | {% endif %} 10 | {% endfor %} 11 | {% for p in parameters %} 12 | {% if not p.required %} 13 | {% parameter %}_have_{{ p.memberName }}(false){% end_parameter %} 14 | {% endif %} 15 | {% endfor %} 16 | {% end_parameter_list %} 17 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.0/templates/_base_request.tmpl: -------------------------------------------------------------------------------- 1 | ///A base abstract class for {{ api.className }} requests. 2 | public abstract class {{ api.className }}BaseServiceRequest : Google.Apis.Requests.ClientServiceRequest 3 | { 4 | ///Constructs a new {{ api.className }}BaseServiceRequest instance. 5 | protected {{ api.className }}BaseServiceRequest(Google.Apis.Services.IClientService service) 6 | : base(service) 7 | { 8 | } 9 | {% indent %}{% for parameter in api.parameters %} 10 | {% call_template _parameter parameter=parameter %} 11 | {% endfor %}{% endindent %} 12 | {% indent %}/// Initializes {{ api.className }} parameter list. 13 | {% call_template _init_parameters parameters=api.parameters %}{% endindent %} 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.2/templates/_base_request.tmpl: -------------------------------------------------------------------------------- 1 | ///A base abstract class for {{ api.className }} requests. 2 | public abstract class {{ api.className }}BaseServiceRequest : Google.Apis.Requests.ClientServiceRequest 3 | { 4 | ///Constructs a new {{ api.className }}BaseServiceRequest instance. 5 | protected {{ api.className }}BaseServiceRequest(Google.Apis.Services.IClientService service) 6 | : base(service) 7 | { 8 | } 9 | {% indent %}{% for parameter in api.parameters %} 10 | {% call_template _parameter parameter=parameter %} 11 | {% endfor %}{% endindent %} 12 | {% indent %}/// Initializes {{ api.className }} parameter list. 13 | {% call_template _init_parameters parameters=api.parameters %}{% endindent %} 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/default/templates/_base_request.tmpl: -------------------------------------------------------------------------------- 1 | ///A base abstract class for {{ api.className }} requests. 2 | public abstract class {{ api.className }}BaseServiceRequest : Google.Apis.Requests.ClientServiceRequest 3 | { 4 | ///Constructs a new {{ api.className }}BaseServiceRequest instance. 5 | protected {{ api.className }}BaseServiceRequest(Google.Apis.Services.IClientService service) 6 | : base(service) 7 | { 8 | } 9 | {% indent %}{% for parameter in api.parameters %} 10 | {% call_template _parameter parameter=parameter %} 11 | {% endfor %}{% endindent %} 12 | {% indent %}/// Initializes {{ api.className }} parameter list. 13 | {% call_template _init_parameters parameters=api.parameters %}{% endindent %} 14 | } 15 | -------------------------------------------------------------------------------- /src/googleapis/codegen/utilities/convert_size_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.7 2 | 3 | 4 | from google.apputils import basetest 5 | from googleapis.codegen.utilities import convert_size 6 | 7 | 8 | class ConvertSizeTest(basetest.TestCase): 9 | """Test for unit conversion.""" 10 | 11 | def testConvertSize(self): 12 | self.assertEquals(None, convert_size.ConvertSize(None)) 13 | self.assertEquals(None, convert_size.ConvertSize('4')) 14 | self.assertEquals(None, convert_size.ConvertSize('4C')) 15 | self.assertEquals(4, convert_size.ConvertSize('4B')) 16 | self.assertEquals(4 * 2 ** 10, convert_size.ConvertSize('4KB')) 17 | self.assertEquals(12 * 2 ** 20, convert_size.ConvertSize('12MB')) 18 | self.assertEquals(10 * 2 ** 30, convert_size.ConvertSize('10GB')) 19 | 20 | 21 | if __name__ == '__main__': 22 | basetest.main() 23 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_append_uri_template_variable_cc.tmpl: -------------------------------------------------------------------------------- 1 | {#---------------------------------------------------------------------------#} 2 | {# TODO(aiuto): "if variable.data_type.arrayOf" is the right way to do this #} 3 | {# I would have changed it but there is no unit test for it, so I'm pretty #} 4 | {# sure the array branch is untested. It does not happen in our APIs anyway, #} 5 | {# so I am not spending time on it. #} 6 | {% if variable.data_type.json_type == 'array' %} 7 | {{ api.client_namespace }}::AppendIteratorToUrl( 8 | {{ variable.memberName }}.begin(), {{ variable.memberName }}.end(), 9 | "{{ variable.wireName }}", target); 10 | {% else %} 11 | {{ api.client_namespace }}::UriTemplate::AppendValue( 12 | {{ variable.memberName }}, config, target); 13 | {% endif %} 14 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_append_uri_template_variable_cc.tmpl: -------------------------------------------------------------------------------- 1 | {#---------------------------------------------------------------------------#} 2 | {# TODO(aiuto): "if variable.data_type.arrayOf" is the right way to do this #} 3 | {# I would have changed it but there is no unit test for it, so I'm pretty #} 4 | {# sure the array branch is untested. It does not happen in our APIs anyway, #} 5 | {# so I am not spending time on it. #} 6 | {% if variable.data_type.json_type == 'array' %} 7 | {{ api.client_namespace }}::AppendIteratorToUrl( 8 | {{ variable.memberName }}.begin(), {{ variable.memberName }}.end(), 9 | "{{ variable.wireName }}", target); 10 | {% else %} 11 | {{ api.client_namespace }}::UriTemplate::AppendValue( 12 | {{ variable.memberName }}, config, target); 13 | {% endif %} 14 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_resource_file_path.tmpl: -------------------------------------------------------------------------------- 1 | {% noeol %} 2 | 3 | {% comment %} 4 | resource.parent can be another resource or the API. The parent.parent lookup 5 | makes sure that the link starts at the top level resources and doesn't try to 6 | get the wireName of the API. 7 | {% endcomment %} 8 | {% if resource.parent.parent %} 9 | 10 | {% with children="/"|add:resource.wireName|add:children %} 11 | {% call_template _resource_path resource=resource.parent children=children %} 12 | {% endwith %} 13 | 14 | {% else %} 15 | 16 | {% comment %} 17 | We need a way to inject the relative root of this documentation set into this 18 | template, just before the slash. Maybe we can grab it from api.documentation 19 | and process that some way. 20 | {% endcomment %} 21 | /{{ resource.wireName }}{{ children }}.html 22 | 23 | {% endif %} 24 | 25 | {% endnoeol %} 26 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_append_uri_template_variable_cc.tmpl: -------------------------------------------------------------------------------- 1 | {#---------------------------------------------------------------------------#} 2 | {# TODO(aiuto): "if variable.data_type.arrayOf" is the right way to do this #} 3 | {# I would have changed it but there is no unit test for it, so I'm pretty #} 4 | {# sure the array branch is untested. It does not happen in our APIs anyway, #} 5 | {# so I am not spending time on it. #} 6 | {% if variable.data_type.json_type == 'array' %} 7 | {{ api.client_namespace }}::AppendIteratorToUrl( 8 | {{ variable.memberName }}.begin(), {{ variable.memberName }}.end(), 9 | "{{ variable.wireName }}", target); 10 | {% else %} 11 | {{ api.client_namespace }}::UriTemplate::AppendValue( 12 | {{ variable.memberName }}, config, target); 13 | {% endif %} 14 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.0/templates/_pattern_check_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if param.pattern %} 2 | if (!getSuppressPatternChecks()) { 3 | {% if param.repeated %} 4 | for (String {{ param.memberName }}Elem : {{ param.memberName }}) { 5 | com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), 6 | "Parameter {{ param.memberName }} elements must conform to the pattern " + 7 | {% literal param.pattern %}); 8 | } 9 | {% else %} 10 | com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), 11 | "Parameter {{ param.memberName }} must conform to the pattern " + 12 | {% literal param.pattern %}); 13 | {% endif %} 14 | } 15 | {% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.1/templates/_pattern_check_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if param.pattern %} 2 | if (!getSuppressPatternChecks()) { 3 | {% if param.repeated %} 4 | for (String {{ param.memberName }}Elem : {{ param.memberName }}) { 5 | com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), 6 | "Parameter {{ param.memberName }} elements must conform to the pattern " + 7 | {% literal param.pattern %}); 8 | } 9 | {% else %} 10 | com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), 11 | "Parameter {{ param.memberName }} must conform to the pattern " + 12 | {% literal param.pattern %}); 13 | {% endif %} 14 | } 15 | {% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.20.0/templates/_pattern_check_def.tmpl: -------------------------------------------------------------------------------- 1 | {% if param.pattern %} 2 | if (!getSuppressPatternChecks()) { 3 | {% if param.repeated %} 4 | for (String {{ param.memberName }}Elem : {{ param.memberName }}) { 5 | com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}Elem).matches(), 6 | "Parameter {{ param.memberName }} elements must conform to the pattern " + 7 | {% literal param.pattern %}); 8 | } 9 | {% else %} 10 | com.google.api.client.util.Preconditions.checkArgument({{param.constantName}}_PATTERN.matcher({{ param.memberName }}).matches(), 11 | "Parameter {{ param.memberName }} must conform to the pattern " + 12 | {% literal param.pattern %}); 13 | {% endif %} 14 | } 15 | {% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/sample/0.1/templates/_recursive_generate.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Demonstrate recursively calling templates to generate a tree of files. 3 | {% endcomment %} 4 | {% if level >= 5 %}{% halt %}{% endif %} 5 | 6 | {% with path=dir|add:"/"|add:"x.txt" %} 7 | {% write path %}// Path: {{ path }}. 8 | Content for level {{ level }}. 9 | {% endwrite %} 10 | {% endwith %} 11 | 12 | This text will never be in the output. Here is why. 13 | - It is not within the write block 14 | - so it collects in the overall call stack of src/recursive_generate.tmpl 15 | - which halts at the end, so this gets tossed. 16 | 17 | {% with level=level|add:"1" %} 18 | {% with level_str=level|stringformat:"d" %} 19 | {% with dir=dir|add:"/"|add:level_str %} 20 | {% call_template _recursive_generate dir=dir level=level %} 21 | {% endwith %} 22 | {% endwith %} 23 | {% endwith %} 24 | -------------------------------------------------------------------------------- /src/googleapis/codegen/testdata/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.0/templates/_init_parameters.tmpl: -------------------------------------------------------------------------------- 1 | protected override void InitParameters() 2 | { 3 | {% indent %}base.InitParameters(); 4 | {% for parameter in parameters %} 5 | RequestParameters.Add( 6 | {% indent %}{% parameter_list %} 7 | {% parameter %} 8 | "{{ parameter.wireName }}" 9 | {% end_parameter %} 10 | {% parameter %} 11 | new Google.Apis.Discovery.Parameter 12 | { 13 | Name = "{{ parameter.wireName }}", 14 | IsRequired = {% if parameter.required %}true{% else %}false{% endif %}, 15 | ParameterType = "{{parameter.location}}", 16 | DefaultValue = {% if parameter.default %}"{{parameter.default}}"{% else %}null{% endif %}, 17 | Pattern = {% if parameter.pattern %}@"{{parameter.pattern}}"{% else %}null{% endif %}, 18 | } 19 | {% end_parameter %} 20 | {% end_parameter_list %}{% endindent %});{% endfor %}{% endindent %} 21 | } 22 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.2/templates/_init_parameters.tmpl: -------------------------------------------------------------------------------- 1 | protected override void InitParameters() 2 | { 3 | {% indent %}base.InitParameters(); 4 | {% for parameter in parameters %} 5 | RequestParameters.Add( 6 | {% indent %}{% parameter_list %} 7 | {% parameter %} 8 | "{{ parameter.wireName }}" 9 | {% end_parameter %} 10 | {% parameter %} 11 | new Google.Apis.Discovery.Parameter 12 | { 13 | Name = "{{ parameter.wireName }}", 14 | IsRequired = {% if parameter.required %}true{% else %}false{% endif %}, 15 | ParameterType = "{{parameter.location}}", 16 | DefaultValue = {% if parameter.default %}"{{parameter.default}}"{% else %}null{% endif %}, 17 | Pattern = {% if parameter.pattern %}@"{{parameter.pattern}}"{% else %}null{% endif %}, 18 | } 19 | {% end_parameter %} 20 | {% end_parameter_list %}{% endindent %});{% endfor %}{% endindent %} 21 | } 22 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/default/templates/_init_parameters.tmpl: -------------------------------------------------------------------------------- 1 | protected override void InitParameters() 2 | { 3 | {% indent %}base.InitParameters(); 4 | {% for parameter in parameters %} 5 | RequestParameters.Add( 6 | {% indent %}{% parameter_list %} 7 | {% parameter %} 8 | "{{ parameter.wireName }}" 9 | {% end_parameter %} 10 | {% parameter %} 11 | new Google.Apis.Discovery.Parameter 12 | { 13 | Name = "{{ parameter.wireName }}", 14 | IsRequired = {% if parameter.required %}true{% else %}false{% endif %}, 15 | ParameterType = "{{parameter.location}}", 16 | DefaultValue = {% if parameter.default %}"{{parameter.default}}"{% else %}null{% endif %}, 17 | Pattern = {% if parameter.pattern %}@"{{parameter.pattern}}"{% else %}null{% endif %}, 18 | } 19 | {% end_parameter %} 20 | {% end_parameter_list %}{% endindent %});{% endfor %}{% endindent %} 21 | } 22 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/___package___/___api_query___.m.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | // 5 | // {{ api.query }}.m 6 | // 7 | 8 | // ---------------------------------------------------------------------------- 9 | // NOTE: This file is generated from Google API Discovery Service. 10 | // Service: 11 | // {{ api.title }} ({{ api.name }}/{{ api.version }}) 12 | // Description: 13 | // {{ api.description }} 14 | // Classes: 15 | // {{ api.query }} ({{ api.methods|length }} custom class methods, {{ api.allParameters|length }} custom properties) 16 | {% if api.documentationLink %}// Documentation: 17 | // {{ api.documentationLink }} 18 | {% endif %} 19 | #import "{{ api.query }}.h" 20 | {% if api.importManager %} 21 | {% imports api %}{% endimports %} 22 | {% endif %} 23 | {% call_template _query_m_impl %} 24 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/_model_h_impl.tmpl: -------------------------------------------------------------------------------- 1 | {% if model.importManager %} 2 | {% filter noblanklines %} 3 | {% for import in model.importManager.type_dependencies %} 4 | @class {{ import }}; 5 | {% endfor %} 6 | {% endfilter %} 7 | {% endif %} 8 | // ---------------------------------------------------------------------------- 9 | // 10 | // {{ model.className }} 11 | // 12 | 13 | {% doc_comment_if model.description %} 14 | 15 | @interface {{ model.className }} : {{ model.superClass }} 16 | {% if model.arrayOf %}@property(retain) {{ model.codeType }} items;{% endif %}{% for property in model.properties %} 17 | {% doc_comment_if property.description %} 18 | @property({{ property.attributes }}) {{ property.codeType }} *{{ property.codeName }}{{ property.clangDirective }};{% if property.typeComment %} // {{ property.typeComment }}{% endif %} 19 | {% endfor %} 20 | @end 21 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/___package___/___topLevelModels_className___.h.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | // 5 | // {{ model.className }}.h 6 | // 7 | 8 | // ---------------------------------------------------------------------------- 9 | // NOTE: This file is generated from Google API Discovery Service. 10 | // Service: 11 | // {{ api.title }} ({{ api.name }}/{{ api.version }}) 12 | // Description: 13 | // {{ api.description }} 14 | // Classes: 15 | // {{ model.className }} (0 custom class methods, {{ model.properties|length }} custom properties) 16 | {% if api.documentationLink %}// Documentation: 17 | // {{ api.documentationLink }} 18 | {% endif %} 19 | #if GTL_BUILT_AS_FRAMEWORK 20 | #import "GTL/GTLObject.h" 21 | #else 22 | #import "GTLObject.h" 23 | #endif 24 | {% call_template _model_h_impl model=model %} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/utilities/ordered_set_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.7 2 | """Tests for ordered_set.py.""" 3 | 4 | from google.apputils import basetest 5 | 6 | from googleapis.codegen.utilities import ordered_set 7 | 8 | 9 | class OrderedSetTest(basetest.TestCase): 10 | 11 | def testFrozenSet(self): 12 | s = ordered_set.FrozenOrderedSet(range(5)) 13 | self.assertLen(s, 5) 14 | self.assertTrue(4 in s) 15 | self.assertEqual([x for x in range(5)], list(s)) 16 | 17 | def testMutableSet(self): 18 | s = ordered_set.MutableOrderedSet() 19 | for i in range(5): 20 | s.add(i) 21 | self.assertLen(s, 5) 22 | self.assertTrue(4 in s) 23 | self.assertEqual([x for x in range(5)], list(s)) 24 | 25 | s.remove(3) 26 | self.assertEqual([0, 1, 2, 4], list(s)) 27 | s.clear() 28 | self.assertEmpty(s) 29 | 30 | 31 | if __name__ == '__main__': 32 | basetest.main() 33 | -------------------------------------------------------------------------------- /src/googleapis/codegen/documenting_language_model_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.7 2 | # Copyright 2012 Google Inc. All Rights Reserved. 3 | 4 | """Tests for language_model.DocumentingLanguageModel.""" 5 | 6 | __author__ = 'aiuto@google.com (Tony Aiuto)' 7 | 8 | from google.apputils import basetest 9 | from googleapis.codegen import language_model 10 | 11 | 12 | class DocumentingLanguageModelTest(basetest.TestCase): 13 | 14 | def testDocumentingLanguageModel(self): 15 | dlm = language_model.DocumentingLanguageModel() 16 | self.assertEquals('Array', dlm.ArrayOf(None, 'foo')) 17 | self.assertEquals('Map', dlm.MapOf(None, 'foo')) 18 | self.assertEquals('foo', dlm.GetCodeTypeFromDictionary({'type': 'foo'})) 19 | self.assertEquals('foo (int)', dlm.GetCodeTypeFromDictionary({ 20 | 'type': 'foo', 'format': 'int'})) 21 | 22 | 23 | if __name__ == '__main__': 24 | basetest.main() 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_monolithic_kitchensink_cc_impl.tmpl: -------------------------------------------------------------------------------- 1 | #include "{{ api.module.path }}{% if api.module.path != '' %}/{% endif %}{{ api.kitchensink }}.h" 2 | #include 3 | #include "{{ api.client_include_path }}/data/data_reader.h" 4 | #include "{{ api.client_include_path }}/service/media_uploader.h" 5 | #include "{{ api.client_include_path }}/transport/http_request.h" 6 | #include "{{ api.client_include_path }}/transport/http_transport.h" 7 | #include "{{ api.client_include_path }}/util/status.h" 8 | #include "{{ api.client_include_path }}/util/uri_utils.h" 9 | #include "{{ api.strings_include_path }}/strcat.h" 10 | 11 | namespace {{ api.module.name }} { 12 | 13 | {% call_template _service_impl_cc api=api %} 14 | 15 | {% for m in api.models %}{% if not m.parent %} 16 | {% call_template _model_cc_impl current_model=m %}{% endif %}{% endfor %} 17 | 18 | } // namespace {{ api.module.name }} 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_monolithic_kitchensink_cc_impl.tmpl: -------------------------------------------------------------------------------- 1 | #include "{{ api.module.path }}{% if api.module.path != '' %}/{% endif %}{{ api.kitchensink }}.h" 2 | #include 3 | #include "{{ api.client_include_path }}/data/data_reader.h" 4 | #include "{{ api.client_include_path }}/service/media_uploader.h" 5 | #include "{{ api.client_include_path }}/transport/http_request.h" 6 | #include "{{ api.client_include_path }}/transport/http_transport.h" 7 | #include "{{ api.client_include_path }}/util/status.h" 8 | #include "{{ api.client_include_path }}/util/uri_utils.h" 9 | #include "{{ api.strings_include_path }}/strcat.h" 10 | 11 | namespace {{ api.module.name }} { 12 | 13 | {% call_template _service_impl_cc api=api %} 14 | 15 | {% for m in api.models %}{% if not m.parent %} 16 | {% call_template _model_cc_impl current_model=m %}{% endif %}{% endfor %} 17 | 18 | } // namespace {{ api.module.name }} 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/default/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "gwt", 3 | "description": "GWT libraries for Google APIs.", 4 | "releaseVersion": "0.4-alpha", 5 | "baseClientLibrary": "2.4.0", 6 | "requires": [ 7 | { 8 | "name": "Google Web Toolkit", 9 | "environments": ["gwt"], 10 | "version": "2.4.0", 11 | "files": [ 12 | { 13 | "type": "bundle", 14 | "downloadUrl": "https://google-web-toolkit.googlecode.com/files/gwt-2.4.0.zip" 15 | },{ 16 | "type": "binary", 17 | "path": "dependencies/gwt-user.jar" 18 | } 19 | ] 20 | },{ 21 | "name": "GWT Client Library", 22 | "environments": ["gwt"], 23 | "version": "0.4-alpha", 24 | "files": [ 25 | { 26 | "type": "binary", 27 | "path": "dependencies/gwt-client.jar" 28 | } 29 | ] 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_monolithic_kitchensink_cc_impl.tmpl: -------------------------------------------------------------------------------- 1 | #include "{{ api.module.path }}{% if api.module.path != '' %}/{% endif %}{{ api.kitchensink }}.h" 2 | #include 3 | #include "{{ api.client_include_path }}/data/data_reader.h" 4 | #include "{{ api.client_include_path }}/service/media_uploader.h" 5 | #include "{{ api.client_include_path }}/transport/http_request.h" 6 | #include "{{ api.client_include_path }}/transport/http_transport.h" 7 | #include "{{ api.client_include_path }}/util/status.h" 8 | #include "{{ api.client_include_path }}/util/uri_utils.h" 9 | #include "{{ api.strings_include_path }}/strcat.h" 10 | 11 | namespace {{ api.module.name }} { 12 | 13 | {% call_template _service_impl_cc api=api %} 14 | 15 | {% for m in api.models %}{% if not m.parent %} 16 | {% call_template _model_cc_impl current_model=m %}{% endif %}{% endfor %} 17 | 18 | } // namespace {{ api.module.name }} { 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/_monolithic_kitchensink_cc_impl.tmpl: -------------------------------------------------------------------------------- 1 | #include "{{ api.module.path }}{% if api.module.path != '' %}/{% endif %}{{ api.kitchensink }}.h" 2 | #include 3 | #include "{{ api.client_include_path }}/data/data_reader.h" 4 | #include "{{ api.client_include_path }}/service/media_uploader.h" 5 | #include "{{ api.client_include_path }}/transport/http_request.h" 6 | #include "{{ api.client_include_path }}/transport/http_transport.h" 7 | #include "{{ api.client_include_path }}/util/status.h" 8 | #include "{{ api.client_include_path }}/util/uri_utils.h" 9 | #include "{{ api.absl_include_path }}/strings/str_cat.h" 10 | 11 | namespace {{ api.module.name }} { 12 | 13 | {% call_template _service_impl_cc api=api %} 14 | 15 | {% for m in api.models %}{% if not m.parent %} 16 | {% call_template _model_cc_impl current_model=m %}{% endif %}{% endfor %} 17 | 18 | } // namespace {{ api.module.name }} 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_method_response.tmpl: -------------------------------------------------------------------------------- 1 | {% if method.responseType.isVoid %} 2 |

If successful, this method returns an empty response body.

3 | 4 | {% elif method.responseType.isList %} 5 |

If successful, this method returns a response body with the following structure:

6 |
7 |
 8 | {% call_template _resource_alt_json schema=method.responseType %}
 9 | 
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% call_template _resource_property_row schema=method.responseType %} 21 | 22 |
Property NameValueDescription
23 | 24 |
25 | 26 | {% else %} 27 |

If successful, this method returns a {{ method.responseType.className }} resource in the response body.

28 | 29 | {% endif %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.0/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.0/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.1/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.19.1/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.20.0/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.20.0/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.21.0/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.21.0/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.22.0/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.22.0/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.23.0/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.23.0/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.0/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.0/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.1/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.24.1/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.25.0/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/1.25.0/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/default/templates/_proguard_content_def.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | TODO: not schema.reference does not capture the complete solution to b/8167652. 3 | There should instead be a mechanism to get the right answer easily. 4 | {% endcomment %} 5 | {% if not schema.builtIn and not schema.reference %} static { 6 | {% if schema.arrayOf %} 7 | // hack to force ProGuard to consider {{ schema.safeClassName }}Items used, since otherwise it would be stripped out 8 | // see https://github.com/google/google-api-java-client/issues/543 9 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}Items.class); 10 | {% else %} 11 | // hack to force ProGuard to consider {{ schema.safeClassName }} used, since otherwise it would be stripped out 12 | // see https://github.com/google/google-api-java-client/issues/543 13 | com.google.api.client.util.Data.nullOf({{ schema.safeClassName }}.class); 14 | {% endif %} 15 | }{% endif %} 16 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/java/default/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /** 2 | * An accessor for creating requests from the {{ resource.className }} collection. 3 | * 4 | *

The typical use is:

5 | *
 6 |  *   {@code {{ api.className }} {{ api.name }} = new {{ api.className }}(...);}
 7 |  *   {@code {{ api.className }}.{{ resource.className }}.List request = {{ api.name }}.{{ resource.codeName }}().list(parameters ...)}
 8 |  * 
9 | * 10 | * @return the resource collection 11 | */ 12 | public {{ resource.className }} {{ resource.codeName }}() { 13 | return new {{ resource.className }}(); 14 | } 15 | 16 | /** 17 | * The "{{ resource.wireName }}" collection of methods. 18 | */ 19 | public class {{ resource.className }} {{% indent %} 20 | {% for method in resource.methods %} 21 | {% call_template _method method=method %}{% endfor %} 22 | {% for subr in resource.resources %} 23 | {% call_template _resource resource=subr %}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/_model_cc_impl.tmpl: -------------------------------------------------------------------------------- 1 | {% if current_model.children %}{% for child in current_model.children %}{% call_template _model_cc guarded_model=child %}{% endfor %}{% endif %} 2 | // Object factory method (static). 3 | {{ current_model.packageRelativeClassName }}* {{ current_model.packageRelativeClassName }}::New() { 4 | return new {{ api.client_namespace }}::JsonCppCapsule<{{ current_model.className }}>; 5 | } 6 | 7 | // Standard immutable constructor. 8 | {{ current_model.packageRelativeClassName }}::{{ current_model.className }}(const Json::Value& storage) 9 | : {{ api.client_namespace }}::JsonCppData(storage) { 10 | } 11 | 12 | // Standard mutable constructor. 13 | {{ current_model.packageRelativeClassName }}::{{ current_model.className }}(Json::Value* storage) 14 | : {{ api.client_namespace }}::JsonCppData(storage) { 15 | } 16 | 17 | // Standard destructor. 18 | {{ current_model.packageRelativeClassName }}::~{{ current_model.className }}() { 19 | } 20 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/_model_cc_impl.tmpl: -------------------------------------------------------------------------------- 1 | {% if current_model.children %}{% for child in current_model.children %}{% call_template _model_cc guarded_model=child %}{% endfor %}{% endif %} 2 | // Object factory method (static). 3 | {{ current_model.packageRelativeClassName }}* {{ current_model.packageRelativeClassName }}::New() { 4 | return new {{ api.client_namespace }}::JsonCppCapsule<{{ current_model.className }}>; 5 | } 6 | 7 | // Standard immutable constructor. 8 | {{ current_model.packageRelativeClassName }}::{{ current_model.className }}(const Json::Value& storage) 9 | : {{ api.client_namespace }}::JsonCppData(storage) { 10 | } 11 | 12 | // Standard mutable constructor. 13 | {{ current_model.packageRelativeClassName }}::{{ current_model.className }}(Json::Value* storage) 14 | : {{ api.client_namespace }}::JsonCppData(storage) { 15 | } 16 | 17 | // Standard destructor. 18 | {{ current_model.packageRelativeClassName }}::~{{ current_model.className }}() { 19 | } 20 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/_model_cc_impl.tmpl: -------------------------------------------------------------------------------- 1 | {% if current_model.children %}{% for child in current_model.children %}{% call_template _model_cc guarded_model=child %}{% endfor %}{% endif %} 2 | // Object factory method (static). 3 | {{ current_model.packageRelativeClassName }}* {{ current_model.packageRelativeClassName }}::New() { 4 | return new {{ api.client_namespace }}::JsonCppCapsule<{{ current_model.className }}>; 5 | } 6 | 7 | // Standard immutable constructor. 8 | {{ current_model.packageRelativeClassName }}::{{ current_model.className }}(const Json::Value& storage) 9 | : {{ api.client_namespace }}::JsonCppData(storage) { 10 | } 11 | 12 | // Standard mutable constructor. 13 | {{ current_model.packageRelativeClassName }}::{{ current_model.className }}(Json::Value* storage) 14 | : {{ api.client_namespace }}::JsonCppData(storage) { 15 | } 16 | 17 | // Standard destructor. 18 | {{ current_model.packageRelativeClassName }}::~{{ current_model.className }}() { 19 | } 20 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/dart/0.1/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | {% comment %} 2 | Renders a resource class. 3 | [resource] the resource to render. 4 | {% endcomment %}// Resource {{ resource.contextCodeType }} 5 | class {{ resource.className }} extends core.Object { 6 | final {{ api.className }} _$service; 7 | {% for r in resource.resources %}final {{ r.className }} {{ r.codeName }}; 8 | {% endfor %} 9 | {{ resource.className }}._internal({{ api.className }} $service) : _$service = $service{% for r in resource.resources %}, 10 | {{ r.codeName }} = new {{ r.className }}._internal($service){% endfor %}; 11 | {% for m in resource.methods %}{% indent %} 12 | {% call_template _method method=m %} 13 | {% endindent %}{% endfor %}} 14 | {% for m in resource.methods %}{% for param in m.parameters %}{% if param.enumType %} 15 | {% call_template _enum param=param %} 16 | {% endif %}{% endfor %}{% endfor %} 17 | {% for r in resource.resources %} 18 | {% call_template _resource resource=r %} 19 | {% endfor %} 20 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/discovery_check/report.txt.tmpl: -------------------------------------------------------------------------------- 1 | {% filter noblanklines %} 2 | generated_by: {{ tool.name }} {{ tool.version }} 3 | {% if tool.buildDate %}tool_build_date: {{ tool.buildDate }}{% endif %} 4 | generated_at: {{ tool.runDate }} {{ tool.runTime }} 5 | 6 | api:{{ api.name }} 7 | version:{{ api.version }} 8 | {% if api.revision %}revision: {{ api.revision }}{% endif %} 9 | 10 | Description: {{ api.description }} 11 | 12 | api_documentation: {{ api.documentationLink }} 13 | 14 | servicePath: {{ api.servicePath }} 15 | rootUrl: {{ api.rootUrl }} 16 | title: {{ api.title }} 17 | {% for icon in api.icons %} 18 | icons.{{ icon }}: {{ icon }} To be fixed 19 | {% endfor %} 20 | 21 | {% if api.dataWrapper %}data_wrapper: 1{% endif %} 22 | {% endfilter %} 23 | 24 | {% for s in api.models %} 25 | {% call_template _model model s %}{% endfor %} 26 | {% for r in api.resources %} 27 | {% call_template _resource resource r %}{% endfor %} 28 | {% for m in api.methods %} 29 | {% call_template _method method m %}{% endfor %} 30 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/discovery_check/_method.tmpl: -------------------------------------------------------------------------------- 1 | method {{% indent %} 2 | name: {{ method.wireName }} 3 | id: {{ method.id }} 4 | path: {{ method.path }} 5 | httpMethod: {{ method.httpMethod }} 6 | description: {{ method.description }} 7 | {% filter noblanklines %} 8 | {% if method.requestType %}request_type: {{ method.requestType.id }}{% endif %} 9 | {% if method.responseType %}response_type: {{ method.responseType.id }}{% endif %} 10 | {% endfilter %} 11 | {% for param in method.parameters %} 12 | parameter: {{ param.wireName }} {{% indent %} 13 | {% filter noblanklines %} 14 | description:{{ param.description }} 15 | type: {{ param.code_type }} 16 | required: {{ param.required }} 17 | location: {{ param.location }} 18 | repeated: {{ param.repeated }} 19 | {% if param.default %} default: {{ param.default }}{% endif %} 20 | {% if param.minimum %} minimum: {{ param.minimum }}{% endif %} 21 | {% if param.maximum %} maximum: {{ param.maximum }}{% endif %} 22 | {% endfilter %} 23 | {% endindent %}}{% endfor %} 24 | {% endindent %}} 25 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.0/templates/packages.config.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/any/html/_resource_tree.tmpl: -------------------------------------------------------------------------------- 1 | {% with resource_dir=dir|add:resource.wireName|add:"/" title_path=title_path|add:" "|add:resource.wireName %} 2 | 3 | {# Write the resource page. #} 4 | 5 | {% with filepath=dir|add:resource.wireName|add:".html" %} 6 | {% write filepath %} 7 | {% call_template _resource_page resource=resource title_path=title_path %} 8 | {% endwrite %} 9 | {% endwith %} 10 | 11 | 12 | {# Write the pages for its methods. #} 13 | 14 | {% for method in resource.methods %} 15 | {% with filepath=resource_dir|add:method.wireName|add:".html" %} 16 | {% write filepath %} 17 | {% call_template _method_page resource=resource method=method title_path=title_path %} 18 | {% endwrite %} 19 | {% endwith %} 20 | {% endfor %} 21 | 22 | 23 | {# Call this template for the resource's subresources. #} 24 | 25 | {% with dir=resource_dir %} 26 | {% for subres in resource.resources %} 27 | {% call_template _resource_tree resource=subres dir=dir title_path=title_path %} 28 | {% endfor %} 29 | {% endwith %} 30 | 31 | 32 | {% endwith %} -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.2/templates/___package___/CMakeLists.txt.tmpl: -------------------------------------------------------------------------------- 1 | # This is a CMake file for {{ api.title }} {{api.version }} 2 | # using the Google APIs Client Library for C++. 3 | # 4 | # See http://google.github.io/google-api-cpp-client/latest/start/get_started 5 | # for more information about what to do with this file. 6 | 7 | project ({{ api.module.name }}) 8 | 9 | # These sources assume that the CMakeLists.txt in ../.. added itself to 10 | # the include directories so that include paths are specified explicitly 11 | # with the directory #include "{{ api.module.path }}/..." 12 | add_library({{ api.module.name }} STATIC{% for m in api.models %}{% if not m.parent %} 13 | {{ m.filename}}.cc{% endif %}{% endfor %} 14 | {{ api.filename }}.cc) 15 | target_link_libraries({{ api.module.name }} googleapis_http) 16 | target_link_libraries({{ api.module.name }} googleapis_internal) 17 | target_link_libraries({{ api.module.name }} googleapis_jsoncpp) 18 | target_link_libraries({{ api.module.name }} googleapis_utils) 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.3/templates/___package___/CMakeLists.txt.tmpl: -------------------------------------------------------------------------------- 1 | # This is a CMake file for {{ api.title }} {{api.version }} 2 | # using the Google APIs Client Library for C++. 3 | # 4 | # See http://google.github.io/google-api-cpp-client/latest/start/get_started 5 | # for more information about what to do with this file. 6 | 7 | project ({{ api.module.name }}) 8 | 9 | # These sources assume that the CMakeLists.txt in ../.. added itself to 10 | # the include directories so that include paths are specified explicitly 11 | # with the directory #include "{{ api.module.path }}/..." 12 | add_library({{ api.module.name }} STATIC{% for m in api.models %}{% if not m.parent %} 13 | {{ m.filename}}.cc{% endif %}{% endfor %} 14 | {{ api.filename }}.cc) 15 | target_link_libraries({{ api.module.name }} googleapis_http) 16 | target_link_libraries({{ api.module.name }} googleapis_internal) 17 | target_link_libraries({{ api.module.name }} googleapis_jsoncpp) 18 | target_link_libraries({{ api.module.name }} googleapis_utils) 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/0.1.4/templates/___package___/CMakeLists.txt.tmpl: -------------------------------------------------------------------------------- 1 | # This is a CMake file for {{ api.title }} {{api.version }} 2 | # using the Google APIs Client Library for C++. 3 | # 4 | # See http://google.github.io/google-api-cpp-client/latest/start/get_started 5 | # for more information about what to do with this file. 6 | 7 | project ({{ api.module.name }}) 8 | 9 | # These sources assume that the CMakeLists.txt in ../.. added itself to 10 | # the include directories so that include paths are specified explicitly 11 | # with the directory #include "{{ api.module.path }}/..." 12 | add_library({{ api.module.name }} STATIC{% for m in api.models %}{% if not m.parent %} 13 | {{ m.filename}}.cc{% endif %}{% endfor %} 14 | {{ api.filename }}.cc) 15 | target_link_libraries({{ api.module.name }} googleapis_http) 16 | target_link_libraries({{ api.module.name }} googleapis_internal) 17 | target_link_libraries({{ api.module.name }} googleapis_jsoncpp) 18 | target_link_libraries({{ api.module.name }} googleapis_utils) 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/cpp/default/templates/___package___/CMakeLists.txt.tmpl: -------------------------------------------------------------------------------- 1 | # This is a CMake file for {{ api.title }} {{api.version }} 2 | # using the Google APIs Client Library for C++. 3 | # 4 | # See http://google.github.io/google-api-cpp-client/latest/start/get_started 5 | # for more information about what to do with this file. 6 | 7 | project ({{ api.module.name }}) 8 | 9 | # These sources assume that the CMakeLists.txt in ../.. added itself to 10 | # the include directories so that include paths are specified explicitly 11 | # with the directory #include "{{ api.module.path }}/..." 12 | add_library({{ api.module.name }} STATIC{% for m in api.models %}{% if not m.parent %} 13 | {{ m.filename}}.cc{% endif %}{% endfor %} 14 | {{ api.filename }}.cc) 15 | target_link_libraries({{ api.module.name }} googleapis_http) 16 | target_link_libraries({{ api.module.name }} googleapis_internal) 17 | target_link_libraries({{ api.module.name }} googleapis_jsoncpp) 18 | target_link_libraries({{ api.module.name }} googleapis_utils) 19 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.2/templates/packages.config.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/default/templates/packages.config.tmpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/___package___/___api_className___Constants.h.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}{% copyright_block %} 2 | {% call_template _time_stamp %} 3 | 4 | // 5 | // {{ api.className }}Constants.h 6 | // 7 | 8 | // ---------------------------------------------------------------------------- 9 | // NOTE: This file is generated from Google API Discovery Service. 10 | // Service: 11 | // {{ api.title }} ({{ api.name }}/{{ api.version }}) 12 | // Description: 13 | // {{ api.description }} 14 | {% if api.documentationLink %}// Documentation: 15 | // {{ api.documentationLink }} 16 | {% endif %} 17 | #import 18 | 19 | #if GTL_BUILT_AS_FRAMEWORK 20 | #import "GTL/GTLDefines.h" 21 | #else 22 | #import "GTLDefines.h" 23 | #endif 24 | {% for enum in api.enums %} 25 | // {{enum.className}} - {{ enum.propertyName }} 26 | {% for element in enum.elements %}{% doc_comment_if element.description %} 27 | GTL_EXTERN NSString * const {{ element.constantName }}; // "{{ element.value }}" 28 | {% endfor %}{% endfor %} 29 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.0/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /// The {% literal resource.wireName %} collection of methods. 2 | public class {{ resource.className }}Resource 3 | { 4 | {% indent %}private const string Resource = {% literal resource.codeName %}; 5 | 6 | /// The service which this resource belongs to. 7 | private readonly Google.Apis.Services.IClientService service; 8 | 9 | /// Constructs a new resource. 10 | public {{ resource.className }}Resource(Google.Apis.Services.IClientService service) 11 | { 12 | {% indent %}this.service = service; 13 | {% for subr in resource.resources %}{{ subr.codeName }} = new {{ subr.className }}Resource(service);{% eol %}{% endfor %}{% endindent %} 14 | } 15 | {% for subr in resource.resources %}{% eol %}{% call_template _get_resource resource=subr %}{% eol %} 16 | {% call_template _resource resource=subr %}{% endfor %} 17 | {% for method in resource.methods %}{% eol %}{% call_template _method method=method service='service' %}{% eol %}{% endfor %}{% endindent %}} 18 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/1.9.2/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /// The {% literal resource.wireName %} collection of methods. 2 | public class {{ resource.className }}Resource 3 | { 4 | {% indent %}private const string Resource = {% literal resource.codeName %}; 5 | 6 | /// The service which this resource belongs to. 7 | private readonly Google.Apis.Services.IClientService service; 8 | 9 | /// Constructs a new resource. 10 | public {{ resource.className }}Resource(Google.Apis.Services.IClientService service) 11 | { 12 | {% indent %}this.service = service; 13 | {% for subr in resource.resources %}{{ subr.codeName }} = new {{ subr.className }}Resource(service);{% eol %}{% endfor %}{% endindent %} 14 | } 15 | {% for subr in resource.resources %}{% eol %}{% call_template _get_resource resource=subr %}{% eol %} 16 | {% call_template _resource resource=subr %}{% endfor %} 17 | {% for method in resource.methods %}{% eol %}{% call_template _method method=method service='service' %}{% eol %}{% endfor %}{% endindent %}} 18 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/csharp/default/templates/_resource.tmpl: -------------------------------------------------------------------------------- 1 | /// The {% literal resource.wireName %} collection of methods. 2 | public class {{ resource.className }}Resource 3 | { 4 | {% indent %}private const string Resource = {% literal resource.codeName %}; 5 | 6 | /// The service which this resource belongs to. 7 | private readonly Google.Apis.Services.IClientService service; 8 | 9 | /// Constructs a new resource. 10 | public {{ resource.className }}Resource(Google.Apis.Services.IClientService service) 11 | { 12 | {% indent %}this.service = service; 13 | {% for subr in resource.resources %}{{ subr.codeName }} = new {{ subr.className }}Resource(service);{% eol %}{% endfor %}{% endindent %} 14 | } 15 | {% for subr in resource.resources %}{% eol %}{% call_template _get_resource resource=subr %}{% eol %} 16 | {% call_template _resource resource=subr %}{% endfor %} 17 | {% for method in resource.methods %}{% eol %}{% call_template _method method=method service='service' %}{% eol %}{% endfor %}{% endindent %}} 18 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/objc/default/templates/_service_m_impl.tmpl: -------------------------------------------------------------------------------- 1 | {% language objc %}@implementation {{ api.serviceName }} 2 | 3 | #if DEBUG 4 | // Method compiled in debug builds just to check that all the needed support 5 | // classes are present at link time. 6 | + (NSArray *)checkClasses { 7 | NSArray *classes = @[ 8 | {% if api.query %} [{{api.query}} class], 9 | {% endif %}{% for model in api.models %} [{{ model.className }} class]{% if not forloop.last %},{% endif %} 10 | {% endfor %} ]; 11 | return classes; 12 | } 13 | #endif // DEBUG 14 | 15 | - (instancetype)init { 16 | self = [super init]; 17 | if (self) { 18 | // Version from discovery. 19 | self.apiVersion = {% literal api.version %}; 20 | {% if api.rpcUrl %} 21 | // From discovery. Where to send JSON-RPC. 22 | // Turn off prettyPrint for this service to save bandwidth (especially on 23 | // mobile). The fetcher logging will pretty print. 24 | self.rpcURL = [NSURL URLWithString:{% literal api.rpcUrl %}]; 25 | {% endif %} } 26 | return self; 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /src/googleapis/codegen/languages/gwt/0.4-alpha/features.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "gwt", 3 | "description": "GWT libraries for Google APIs.", 4 | "releaseVersion": "0.4-alpha", 5 | "baseClientLibrary": "2.4.0", 6 | "javadoc_links": [ 7 | "http://google-web-toolkit.googlecode.com/svn/javadoc/2.4/", 8 | "http://docs.oracle.com/javase/7/docs/api" 9 | ], 10 | "requires": [ 11 | { 12 | "name": "Google Web Toolkit", 13 | "environments": ["gwt"], 14 | "version": "2.4.0", 15 | "files": [ 16 | { 17 | "type": "bundle", 18 | "downloadUrl": "https://google-web-toolkit.googlecode.com/files/gwt-2.4.0.zip" 19 | },{ 20 | "type": "binary", 21 | "path": "dependencies/gwt-user.jar" 22 | } 23 | ] 24 | },{ 25 | "name": "GWT Client Library", 26 | "environments": ["gwt"], 27 | "version": "0.4-alpha", 28 | "files": [ 29 | { 30 | "type": "binary", 31 | "path": "dependencies/gwt-client.jar" 32 | } 33 | ] 34 | } 35 | ] 36 | } 37 | --------------------------------------------------------------------------------