1
#pragma once
2

            
3
#include <string>
4
#include <vector>
5

            
6
#include "source/common/protobuf/protobuf.h"
7

            
8
namespace Envoy {
9
namespace Config {
10

            
11
/**
12
 * Get resource name from api type.
13
 */
14
78014
template <typename Current> std::string getResourceName() {
15
78014
  return std::string(createReflectableMessage(Current())->GetDescriptor()->full_name());
16
78014
}
17

            
18
/**
19
 * Get type url from api type.
20
 */
21
55106
template <typename Current> std::string getTypeUrl() {
22
55106
  return "type.googleapis.com/" + getResourceName<Current>();
23
55106
}
24

            
25
} // namespace Config
26
} // namespace Envoy