def _get_param(): request_message = _get_request_message(GetParam()) response_message = GetParam.Response() parameter = _get_store().get_param(request_message.run_uuid, request_message.param_name) response_message.parameter.MergeFrom(parameter.to_proto()) response = Response(mimetype='application/json') response.set_data(_message_to_json(response_message)) return response
def _get_param(): request_message = _get_request_message(GetParam(), from_get=True) response_message = GetParam.Response() parameter = _get_store().get_param(request_message.run_uuid, request_message.param_name) response_message.parameter.MergeFrom(parameter.to_proto()) response = Response(mimetype='application/json') response.set_data( MessageToJson(response_message, preserving_proto_field_name=True)) return response