upfluence-thrift 2.4.4 → 2.6.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/benchmark/gen-rb/benchmark_constants.rb +1 -1
- data/benchmark/gen-rb/benchmark_service.rb +90 -44
- data/benchmark/gen-rb/benchmark_types.rb +1 -1
- data/lib/thrift/definition.rb +33 -8
- data/lib/thrift/processor.rb +96 -0
- data/lib/thrift/types/annotation/deprecation/deprecation_constants.rb +17 -0
- data/lib/thrift/types/annotation/deprecation/deprecation_types.rb +44 -0
- data/lib/thrift/types/annotation/naming/naming.rb +23 -0
- data/lib/thrift/types/annotation/naming/naming_constants.rb +17 -0
- data/lib/thrift/types/annotation/naming/naming_types.rb +59 -0
- data/lib/thrift/types/known/{any.rb → any/any.rb} +1 -1
- data/lib/thrift/types/known/{any_constants.rb → any/any_constants.rb} +2 -2
- data/lib/thrift/types/known/{any_types.rb → any/any_types.rb} +21 -3
- data/lib/thrift/types/known/{duration.rb → duration/duration.rb} +1 -1
- data/lib/thrift/types/known/{duration_constants.rb → duration/duration_constants.rb} +2 -2
- data/lib/thrift/types/known/{duration_types.rb → duration/duration_types.rb} +21 -3
- data/lib/thrift/types/known/{timestamp.rb → timestamp/timestamp.rb} +1 -1
- data/lib/thrift/types/known/{timestamp_constants.rb → timestamp/timestamp_constants.rb} +2 -2
- data/lib/thrift/types/known/{timestamp_types.rb → timestamp/timestamp_types.rb} +21 -3
- data/lib/thrift/types/{value.rb → value/value.rb} +1 -1
- data/lib/thrift/types/{value_constants.rb → value/value_constants.rb} +2 -2
- data/lib/thrift/types/{value_types.rb → value/value_types.rb} +135 -15
- data/lib/thrift.rb +5 -0
- data/spec/gen-rb/base/base_service.rb +90 -44
- data/spec/gen-rb/base/base_service_constants.rb +1 -1
- data/spec/gen-rb/base/base_service_types.rb +14 -2
- data/spec/gen-rb/extended/extended_service.rb +74 -40
- data/spec/gen-rb/extended/extended_service_constants.rb +1 -1
- data/spec/gen-rb/extended/extended_service_types.rb +1 -1
- data/spec/gen-rb/flat/namespaced_nonblocking_service.rb +285 -121
- data/spec/gen-rb/flat/referenced_constants.rb +1 -1
- data/spec/gen-rb/flat/referenced_types.rb +1 -1
- data/spec/gen-rb/flat/thrift_namespaced_spec_constants.rb +1 -1
- data/spec/gen-rb/flat/thrift_namespaced_spec_types.rb +14 -2
- data/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb +285 -121
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_constants.rb +1 -1
- data/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb +14 -2
- data/spec/gen-rb/nonblocking_service.rb +285 -121
- data/spec/gen-rb/other_namespace/referenced_constants.rb +1 -1
- data/spec/gen-rb/other_namespace/referenced_types.rb +1 -1
- data/spec/gen-rb/thrift_spec_constants.rb +1 -1
- data/spec/gen-rb/thrift_spec_types.rb +531 -57
- data/test/debug_proto/gen-rb/debug_proto_test_constants.rb +71 -71
- data/test/debug_proto/gen-rb/debug_proto_test_types.rb +1180 -148
- data/test/debug_proto/gen-rb/empty_service.rb +12 -3
- data/test/debug_proto/gen-rb/inherited.rb +90 -44
- data/test/debug_proto/gen-rb/reverse_order_service.rb +102 -44
- data/test/debug_proto/gen-rb/service_for_exception_with_a_map.rb +86 -46
- data/test/debug_proto/gen-rb/srv.rb +339 -150
- metadata +45 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 910b976b447406af13cf97d33ef26b0aa3d28cbbc90b6b8df8e5dfbdb7529026
|
4
|
+
data.tar.gz: a38f2536a472b778aef2083161e93bc973767c2a76ecbe139ecf63eda3d60565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f70ad188a73e4113379a1f862ff7495b22bd1dd3a970e69326cc21d7cfb069834f7f63ce2b689d9bdf71a4b7033be54de90c8f78bf61eac3ed72519e9f675275
|
7
|
+
data.tar.gz: 5c41d9170f392877200e283da4a61b332db3c2669617f8ba3dd09fad50a914e4b0175be8271c5998047abc154f4f49d9035aa5f6d618b1768875c0e77733acf1
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (
|
2
|
+
# Autogenerated by Thrift Compiler ()
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -12,48 +12,11 @@ module ThriftBenchmark
|
|
12
12
|
SERVICE = 'BenchmarkService'.freeze
|
13
13
|
NAMESPACE = ''.freeze
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
@client = ::Thrift.build_client(client)
|
18
|
-
end
|
19
|
-
|
20
|
-
def self.from_provider(provider)
|
21
|
-
Client.new(provider.build(NAMESPACE, SERVICE))
|
22
|
-
end
|
23
|
-
|
24
|
-
def fibonacci(n)
|
25
|
-
result = @client.call_binary(
|
26
|
-
'fibonacci',
|
27
|
-
Fibonacci_args.new(n: n),
|
28
|
-
Fibonacci_result
|
29
|
-
)
|
30
|
-
|
31
|
-
return result.success unless result.success.nil?
|
32
|
-
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fibonacci failed: unknown result')
|
33
|
-
result
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|
15
|
+
LEGACY_ANNOTATIONS = {
|
16
|
+
}.freeze
|
37
17
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
def self.from_provider(handler, provider)
|
42
|
-
provider.build(NAMESPACE, SERVICE, Processor, handler)
|
43
|
-
end
|
44
|
-
|
45
|
-
def process_fibonacci(seqid, iprot, oprot)
|
46
|
-
args = read_args(iprot, Fibonacci_args)
|
47
|
-
result = @middleware.handle_binary('fibonacci', args) do |args|
|
48
|
-
result = Fibonacci_result.new()
|
49
|
-
result.success = @handler.fibonacci(args.n)
|
50
|
-
result
|
51
|
-
end
|
52
|
-
|
53
|
-
write_result(result, oprot, 'fibonacci', seqid)
|
54
|
-
end
|
55
|
-
|
56
|
-
end
|
18
|
+
STRUCTURED_ANNOTATIONS = [
|
19
|
+
].freeze
|
57
20
|
|
58
21
|
# HELPER FUNCTIONS AND STRUCTURES
|
59
22
|
|
@@ -63,10 +26,22 @@ module ThriftBenchmark
|
|
63
26
|
NAME = 'fibonacci_args'.freeze
|
64
27
|
NAMESPACE = ''.freeze
|
65
28
|
|
29
|
+
LEGACY_ANNOTATIONS = {
|
30
|
+
}.freeze
|
31
|
+
|
32
|
+
STRUCTURED_ANNOTATIONS = [
|
33
|
+
].freeze
|
34
|
+
|
66
35
|
THRIFT_FIELD_INDEX_N = 1
|
67
36
|
|
37
|
+
THRIFT_FIELD_N_LEGACY_ANNOTATIONS = {
|
38
|
+
}.freeze
|
39
|
+
|
40
|
+
THRIFT_FIELD_N_STRUCTURED_ANNOTATIONS = [
|
41
|
+
].freeze
|
42
|
+
|
68
43
|
FIELDS = {
|
69
|
-
THRIFT_FIELD_INDEX_N => {type: ::Thrift::Types::BYTE, name: 'n'}
|
44
|
+
THRIFT_FIELD_INDEX_N => {type: ::Thrift::Types::BYTE, name: 'n', legacy_annotations: THRIFT_FIELD_N_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_N_STRUCTURED_ANNOTATIONS}
|
70
45
|
}
|
71
46
|
|
72
47
|
def struct_fields; FIELDS; end
|
@@ -84,10 +59,22 @@ module ThriftBenchmark
|
|
84
59
|
NAME = 'fibonacci_result'.freeze
|
85
60
|
NAMESPACE = ''.freeze
|
86
61
|
|
62
|
+
LEGACY_ANNOTATIONS = {
|
63
|
+
}.freeze
|
64
|
+
|
65
|
+
STRUCTURED_ANNOTATIONS = [
|
66
|
+
].freeze
|
67
|
+
|
87
68
|
THRIFT_FIELD_INDEX_SUCCESS = 0
|
88
69
|
|
70
|
+
THRIFT_FIELD_SUCCESS_LEGACY_ANNOTATIONS = {
|
71
|
+
}.freeze
|
72
|
+
|
73
|
+
THRIFT_FIELD_SUCCESS_STRUCTURED_ANNOTATIONS = [
|
74
|
+
].freeze
|
75
|
+
|
89
76
|
FIELDS = {
|
90
|
-
THRIFT_FIELD_INDEX_SUCCESS => {type: ::Thrift::Types::I32, name: 'success'}
|
77
|
+
THRIFT_FIELD_INDEX_SUCCESS => {type: ::Thrift::Types::I32, name: 'success', legacy_annotations: THRIFT_FIELD_SUCCESS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_SUCCESS_STRUCTURED_ANNOTATIONS}
|
91
78
|
}
|
92
79
|
|
93
80
|
def struct_fields; FIELDS; end
|
@@ -99,6 +86,65 @@ module ThriftBenchmark
|
|
99
86
|
::Thrift.register_struct_type self
|
100
87
|
end
|
101
88
|
|
89
|
+
class Client
|
90
|
+
def initialize(client)
|
91
|
+
@client = ::Thrift.build_client(client)
|
92
|
+
end
|
93
|
+
|
94
|
+
def self.from_provider(provider)
|
95
|
+
Client.new(provider.build(NAMESPACE, SERVICE))
|
96
|
+
end
|
97
|
+
|
98
|
+
def fibonacci(n)
|
99
|
+
result = @client.call_binary(
|
100
|
+
'fibonacci',
|
101
|
+
Fibonacci_args.new(n: n),
|
102
|
+
Fibonacci_result
|
103
|
+
)
|
104
|
+
|
105
|
+
return result.success unless result.success.nil?
|
106
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fibonacci failed: unknown result')
|
107
|
+
result
|
108
|
+
end
|
109
|
+
|
110
|
+
end
|
111
|
+
|
112
|
+
class Processor
|
113
|
+
include ::Thrift::Processor
|
114
|
+
|
115
|
+
def self.from_provider(handler, provider)
|
116
|
+
provider.build(NAMESPACE, SERVICE, Processor, handler)
|
117
|
+
end
|
118
|
+
|
119
|
+
THRIFT_METHOD_FIBONACCI_LEGACY_ANNOTATIONS = {
|
120
|
+
}.freeze
|
121
|
+
|
122
|
+
THRIFT_METHOD_FIBONACCI_STRUCTURED_ANNOTATIONS = [
|
123
|
+
].freeze
|
124
|
+
|
125
|
+
METHODS = {
|
126
|
+
'fibonacci' => { args_klass: Fibonacci_args, oneway: false, legacy_annotations: THRIFT_METHOD_FIBONACCI_STRUCTURED_ANNOTATIONS, structured_annotations: THRIFT_METHOD_FIBONACCI_STRUCTURED_ANNOTATIONS},
|
127
|
+
}.freeze
|
128
|
+
|
129
|
+
def execute_fibonacci(args)
|
130
|
+
result = Fibonacci_result.new()
|
131
|
+
|
132
|
+
result.success = @handler.fibonacci(args.n)
|
133
|
+
|
134
|
+
result
|
135
|
+
end
|
136
|
+
|
137
|
+
def process_fibonacci(seqid, iprot, oprot)
|
138
|
+
args = read_args(iprot, Fibonacci_args)
|
139
|
+
result = @middleware.handle_binary('fibonacci', args) do |args|
|
140
|
+
execute_fibonacci(args)
|
141
|
+
end
|
142
|
+
|
143
|
+
write_result(result, oprot, 'fibonacci', seqid)
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|
147
|
+
|
102
148
|
::Thrift.register_service_type(self)
|
103
149
|
|
104
150
|
end
|
data/lib/thrift/definition.rb
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
module Thrift
|
2
|
+
class DefaultCanonicalNameExtractor
|
3
|
+
class << self
|
4
|
+
def extract(definition)
|
5
|
+
[definition.struct_type]
|
6
|
+
end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
2
10
|
class StructDefinition
|
3
11
|
attr_reader :klass
|
4
12
|
|
@@ -6,6 +14,18 @@ module Thrift
|
|
6
14
|
@klass = klass
|
7
15
|
end
|
8
16
|
|
17
|
+
def structured_annotations
|
18
|
+
return [] unless @klass.const_defined? :STRUCTURED_ANNOTATIONS
|
19
|
+
|
20
|
+
@klass::STRUCTURED_ANNOTATIONS
|
21
|
+
end
|
22
|
+
|
23
|
+
def legacy_annotations
|
24
|
+
return {} unless @klass.const_defined? :LEGACY_ANNOTATIONS
|
25
|
+
|
26
|
+
@klass::LEGACY_ANNOTATIONS
|
27
|
+
end
|
28
|
+
|
9
29
|
def namespace
|
10
30
|
@klass::NAMESPACE
|
11
31
|
end
|
@@ -17,15 +37,15 @@ module Thrift
|
|
17
37
|
def struct_type
|
18
38
|
"#{namespace}.#{name}"
|
19
39
|
end
|
20
|
-
end
|
21
|
-
|
22
|
-
class ServiceDefinition < StructDefinition
|
23
|
-
attr_reader :klass
|
24
40
|
|
25
|
-
def
|
26
|
-
|
41
|
+
def canonical_names
|
42
|
+
CANONICAL_NAME_EXTRACTORS.reduce([]) do |acc, cur|
|
43
|
+
acc + cur.extract(self)
|
44
|
+
end
|
27
45
|
end
|
46
|
+
end
|
28
47
|
|
48
|
+
class ServiceDefinition < StructDefinition
|
29
49
|
def client_class
|
30
50
|
@klass::Client
|
31
51
|
end
|
@@ -34,8 +54,8 @@ module Thrift
|
|
34
54
|
@klass::Processor
|
35
55
|
end
|
36
56
|
|
37
|
-
def
|
38
|
-
|
57
|
+
def name
|
58
|
+
service
|
39
59
|
end
|
40
60
|
|
41
61
|
def service
|
@@ -49,6 +69,7 @@ module Thrift
|
|
49
69
|
|
50
70
|
STRUCT_DEFINITIONS = {}
|
51
71
|
SERVICE_DEFINITIONS = {}
|
72
|
+
CANONICAL_NAME_EXTRACTORS = [DefaultCanonicalNameExtractor]
|
52
73
|
|
53
74
|
class << self
|
54
75
|
def register_struct_type(klass)
|
@@ -60,5 +81,9 @@ module Thrift
|
|
60
81
|
definition = ServiceDefinition.new(klass)
|
61
82
|
SERVICE_DEFINITIONS[definition.service_type] = definition
|
62
83
|
end
|
84
|
+
|
85
|
+
def register_canonical_name_extractor(klass)
|
86
|
+
CANONICAL_NAME_EXTRACTORS << klass
|
87
|
+
end
|
63
88
|
end
|
64
89
|
end
|
data/lib/thrift/processor.rb
CHANGED
@@ -19,13 +19,109 @@
|
|
19
19
|
|
20
20
|
module Thrift
|
21
21
|
module Processor
|
22
|
+
class BaseProcessorFunction
|
23
|
+
def initialize(fname, middleware, args_klass, method)
|
24
|
+
@fname = fname
|
25
|
+
@middleware = middleware
|
26
|
+
@args_klass = args_klass
|
27
|
+
@method = method
|
28
|
+
end
|
29
|
+
|
30
|
+
protected
|
31
|
+
|
32
|
+
def read_args(iprot)
|
33
|
+
args = @args_klass.new
|
34
|
+
|
35
|
+
args.read(iprot)
|
36
|
+
iprot.read_message_end
|
37
|
+
|
38
|
+
args
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
class BinaryProcessorFunction < BaseProcessorFunction
|
43
|
+
def process(seqid, iprot, oprot)
|
44
|
+
execute(seqid, iprot, oprot)
|
45
|
+
|
46
|
+
true
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def execute(seqid, iprot, oprot)
|
52
|
+
args = read_args(iprot)
|
53
|
+
|
54
|
+
result = @middleware.handle_binary(@fname, args) do |args|
|
55
|
+
@method.call(args)
|
56
|
+
end
|
57
|
+
|
58
|
+
write_result(result, oprot, seqid)
|
59
|
+
rescue => e
|
60
|
+
write_exception(e, oprot, seqid)
|
61
|
+
end
|
62
|
+
|
63
|
+
def write_exception(exception, oprot, seqid)
|
64
|
+
oprot.write_message_begin(@fname, MessageTypes::EXCEPTION, seqid)
|
65
|
+
|
66
|
+
unless exception.is_a? ApplicationException
|
67
|
+
exception = ApplicationException.new(
|
68
|
+
ApplicationException::INTERNAL_ERROR,
|
69
|
+
"Internal error processing #{@fname}: #{exception.class}: #{exception}"
|
70
|
+
)
|
71
|
+
end
|
72
|
+
|
73
|
+
exception.write(oprot)
|
74
|
+
oprot.write_message_end
|
75
|
+
oprot.trans.flush
|
76
|
+
end
|
77
|
+
|
78
|
+
def write_result(result, oprot, seqid)
|
79
|
+
oprot.write_message_begin(@fname, MessageTypes::REPLY, seqid)
|
80
|
+
result.write(oprot)
|
81
|
+
oprot.write_message_end
|
82
|
+
oprot.trans.flush
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
class UnaryProcessorFunction < BaseProcessorFunction
|
87
|
+
def process(_seqid, iprot, _oprot)
|
88
|
+
args = read_args(iprot)
|
89
|
+
|
90
|
+
@middleware.handle_unary(@fname, args) do |args|
|
91
|
+
@method.call(args)
|
92
|
+
end
|
93
|
+
|
94
|
+
true
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
22
98
|
def initialize(handler, middlewares = [])
|
23
99
|
@handler = handler
|
24
100
|
@middleware = Middleware.wrap(middlewares)
|
101
|
+
|
102
|
+
@functions = if self.class.const_defined?(:METHODS)
|
103
|
+
self.class::METHODS.reduce({}) do |acc, (key, args)|
|
104
|
+
klass = args[:oneway] ? UnaryProcessorFunction : BinaryProcessorFunction
|
105
|
+
|
106
|
+
acc.merge key => klass.new(
|
107
|
+
key,
|
108
|
+
@middleware,
|
109
|
+
args[:args_klass],
|
110
|
+
method("execute_#{key}")
|
111
|
+
)
|
112
|
+
end
|
113
|
+
end || {}
|
25
114
|
end
|
26
115
|
|
27
116
|
def process(iprot, oprot)
|
28
117
|
name, _type, seqid = iprot.read_message_begin
|
118
|
+
|
119
|
+
func = @functions[name]
|
120
|
+
|
121
|
+
return func.process(seqid, iprot, oprot) if func
|
122
|
+
|
123
|
+
# TODO: once all the stubs will be generated w thrift >=2.5 the next lines
|
124
|
+
# can be deleted
|
29
125
|
if respond_to?("process_#{name}")
|
30
126
|
begin
|
31
127
|
send("process_#{name}", seqid, iprot, oprot)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'thrift/types/annotation/deprecation/deprecation_types'
|
9
|
+
|
10
|
+
module Thrift
|
11
|
+
module Types
|
12
|
+
module Annotation
|
13
|
+
module Deprecation
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
|
9
|
+
module Thrift
|
10
|
+
module Types
|
11
|
+
module Annotation
|
12
|
+
module Deprecation
|
13
|
+
class Deprecated; end
|
14
|
+
|
15
|
+
class Deprecated
|
16
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
17
|
+
|
18
|
+
NAME = 'Deprecated'.freeze
|
19
|
+
NAMESPACE = 'types.annotation.deprecation'.freeze
|
20
|
+
|
21
|
+
LEGACY_ANNOTATIONS = {
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
STRUCTURED_ANNOTATIONS = [
|
25
|
+
].freeze
|
26
|
+
|
27
|
+
|
28
|
+
FIELDS = {
|
29
|
+
|
30
|
+
}
|
31
|
+
|
32
|
+
def struct_fields; FIELDS; end
|
33
|
+
|
34
|
+
def validate
|
35
|
+
end
|
36
|
+
|
37
|
+
::Thrift::Struct.generate_accessors self
|
38
|
+
::Thrift.register_struct_type self
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'thrift/types/annotation/naming/naming_types'
|
2
|
+
|
3
|
+
module Thrift
|
4
|
+
module Types
|
5
|
+
module Annotation
|
6
|
+
module Naming
|
7
|
+
class CanonicalNameExtractor
|
8
|
+
class << self
|
9
|
+
def extract(definition)
|
10
|
+
definition.structured_annotations.select do |sa|
|
11
|
+
sa.is_a? PreviouslyKnownAs
|
12
|
+
end.map do |pka|
|
13
|
+
"#{pka.namespace_ || definition.namespace}.#{pka.name || definition.name}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
::Thrift.register_canonical_name_extractor self
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'thrift/types/annotation/naming/naming_types'
|
9
|
+
|
10
|
+
module Thrift
|
11
|
+
module Types
|
12
|
+
module Annotation
|
13
|
+
module Naming
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
|
9
|
+
module Thrift
|
10
|
+
module Types
|
11
|
+
module Annotation
|
12
|
+
module Naming
|
13
|
+
class PreviouslyKnownAs; end
|
14
|
+
|
15
|
+
class PreviouslyKnownAs
|
16
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
17
|
+
|
18
|
+
NAME = 'PreviouslyKnownAs'.freeze
|
19
|
+
NAMESPACE = 'types.annotation.naming'.freeze
|
20
|
+
|
21
|
+
LEGACY_ANNOTATIONS = {
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
STRUCTURED_ANNOTATIONS = [
|
25
|
+
].freeze
|
26
|
+
|
27
|
+
THRIFT_FIELD_INDEX_NAMESPACE_ = 1
|
28
|
+
THRIFT_FIELD_INDEX_NAME = 2
|
29
|
+
|
30
|
+
THRIFT_FIELD_NAMESPACE__LEGACY_ANNOTATIONS = {
|
31
|
+
}.freeze
|
32
|
+
|
33
|
+
THRIFT_FIELD_NAMESPACE__STRUCTURED_ANNOTATIONS = [
|
34
|
+
].freeze
|
35
|
+
|
36
|
+
THRIFT_FIELD_NAME_LEGACY_ANNOTATIONS = {
|
37
|
+
}.freeze
|
38
|
+
|
39
|
+
THRIFT_FIELD_NAME_STRUCTURED_ANNOTATIONS = [
|
40
|
+
].freeze
|
41
|
+
|
42
|
+
FIELDS = {
|
43
|
+
THRIFT_FIELD_INDEX_NAMESPACE_ => {type: ::Thrift::Types::STRING, name: 'namespace_', optional: true, legacy_annotations: THRIFT_FIELD_NAMESPACE__LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_NAMESPACE__STRUCTURED_ANNOTATIONS},
|
44
|
+
THRIFT_FIELD_INDEX_NAME => {type: ::Thrift::Types::STRING, name: 'name', optional: true, legacy_annotations: THRIFT_FIELD_NAME_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_NAME_STRUCTURED_ANNOTATIONS}
|
45
|
+
}
|
46
|
+
|
47
|
+
def struct_fields; FIELDS; end
|
48
|
+
|
49
|
+
def validate
|
50
|
+
end
|
51
|
+
|
52
|
+
::Thrift::Struct.generate_accessors self
|
53
|
+
::Thrift.register_struct_type self
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
|
-
require 'any_types'
|
8
|
+
require 'thrift/types/known/any/any_types'
|
9
9
|
|
10
10
|
module Thrift
|
11
11
|
module Types
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -18,12 +18,30 @@ module Thrift
|
|
18
18
|
NAME = 'Any'.freeze
|
19
19
|
NAMESPACE = 'types.known.any'.freeze
|
20
20
|
|
21
|
+
LEGACY_ANNOTATIONS = {
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
STRUCTURED_ANNOTATIONS = [
|
25
|
+
].freeze
|
26
|
+
|
21
27
|
THRIFT_FIELD_INDEX_TYPE = 1
|
22
28
|
THRIFT_FIELD_INDEX_VALUE = 2
|
23
29
|
|
30
|
+
THRIFT_FIELD_TYPE_LEGACY_ANNOTATIONS = {
|
31
|
+
}.freeze
|
32
|
+
|
33
|
+
THRIFT_FIELD_TYPE_STRUCTURED_ANNOTATIONS = [
|
34
|
+
].freeze
|
35
|
+
|
36
|
+
THRIFT_FIELD_VALUE_LEGACY_ANNOTATIONS = {
|
37
|
+
}.freeze
|
38
|
+
|
39
|
+
THRIFT_FIELD_VALUE_STRUCTURED_ANNOTATIONS = [
|
40
|
+
].freeze
|
41
|
+
|
24
42
|
FIELDS = {
|
25
|
-
THRIFT_FIELD_INDEX_TYPE => {type: ::Thrift::Types::STRING, name: 'type'},
|
26
|
-
THRIFT_FIELD_INDEX_VALUE => {type: ::Thrift::Types::STRING, name: 'value', binary: true}
|
43
|
+
THRIFT_FIELD_INDEX_TYPE => {type: ::Thrift::Types::STRING, name: 'type', legacy_annotations: THRIFT_FIELD_TYPE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_TYPE_STRUCTURED_ANNOTATIONS},
|
44
|
+
THRIFT_FIELD_INDEX_VALUE => {type: ::Thrift::Types::STRING, name: 'value', binary: true, legacy_annotations: THRIFT_FIELD_VALUE_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_VALUE_STRUCTURED_ANNOTATIONS}
|
27
45
|
}
|
28
46
|
|
29
47
|
def struct_fields; FIELDS; end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'thrift'
|
8
|
-
require 'duration_types'
|
8
|
+
require 'thrift/types/known/duration/duration_types'
|
9
9
|
|
10
10
|
module Thrift
|
11
11
|
module Types
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Autogenerated by Thrift Compiler (2.
|
2
|
+
# Autogenerated by Thrift Compiler (2.5.4-upfluence)
|
3
3
|
#
|
4
4
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
5
|
#
|
@@ -18,12 +18,30 @@ module Thrift
|
|
18
18
|
NAME = 'Duration'.freeze
|
19
19
|
NAMESPACE = 'types.known.duration'.freeze
|
20
20
|
|
21
|
+
LEGACY_ANNOTATIONS = {
|
22
|
+
}.freeze
|
23
|
+
|
24
|
+
STRUCTURED_ANNOTATIONS = [
|
25
|
+
].freeze
|
26
|
+
|
21
27
|
THRIFT_FIELD_INDEX_SECONDS = 1
|
22
28
|
THRIFT_FIELD_INDEX_NANOS = 2
|
23
29
|
|
30
|
+
THRIFT_FIELD_SECONDS_LEGACY_ANNOTATIONS = {
|
31
|
+
}.freeze
|
32
|
+
|
33
|
+
THRIFT_FIELD_SECONDS_STRUCTURED_ANNOTATIONS = [
|
34
|
+
].freeze
|
35
|
+
|
36
|
+
THRIFT_FIELD_NANOS_LEGACY_ANNOTATIONS = {
|
37
|
+
}.freeze
|
38
|
+
|
39
|
+
THRIFT_FIELD_NANOS_STRUCTURED_ANNOTATIONS = [
|
40
|
+
].freeze
|
41
|
+
|
24
42
|
FIELDS = {
|
25
|
-
THRIFT_FIELD_INDEX_SECONDS => {type: ::Thrift::Types::I64, name: 'seconds'},
|
26
|
-
THRIFT_FIELD_INDEX_NANOS => {type: ::Thrift::Types::I32, name: 'nanos'}
|
43
|
+
THRIFT_FIELD_INDEX_SECONDS => {type: ::Thrift::Types::I64, name: 'seconds', legacy_annotations: THRIFT_FIELD_SECONDS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_SECONDS_STRUCTURED_ANNOTATIONS},
|
44
|
+
THRIFT_FIELD_INDEX_NANOS => {type: ::Thrift::Types::I32, name: 'nanos', legacy_annotations: THRIFT_FIELD_NANOS_LEGACY_ANNOTATIONS, structured_annotations: THRIFT_FIELD_NANOS_STRUCTURED_ANNOTATIONS}
|
27
45
|
}
|
28
46
|
|
29
47
|
def struct_fields; FIELDS; end
|