1 /* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 #ifndef TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_SIGNATURE_DEF_PARAM_H_
17 #define TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_SIGNATURE_DEF_PARAM_H_
18 
19 #include "tensorflow/c/c_api_macros.h"
20 #include "tensorflow/c/experimental/saved_model/public/tensor_spec.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif  // __cplusplus
25 
26 // An opaque type that containing metadata of an input/output of a
27 // TF_SignatureDefFunction loaded from a SavedModel.
28 typedef struct TF_SignatureDefParam TF_SignatureDefParam;
29 
30 // Returns the name of the given parameter. The caller is not responsible for
31 // freeing the returned char*.
32 TF_CAPI_EXPORT extern const char* TF_SignatureDefParamName(
33     const TF_SignatureDefParam* param);
34 
35 // Returns the TensorSpec associated with the given parameter. The caller is
36 // not reponsible for freeing the returned TF_TensorSpec*.
37 TF_CAPI_EXPORT extern const TF_TensorSpec* TF_SignatureDefParamTensorSpec(
38     const TF_SignatureDefParam* param);
39 
40 #ifdef __cplusplus
41 }  // end extern "C"
42 #endif  // __cplusplus
43 
44 #endif  // TENSORFLOW_C_EXPERIMENTAL_SAVED_MODEL_PUBLIC_SIGNATURE_DEF_PARAM_H_
45