Class: MockServer::GrpcStreamMessage
- Inherits:
-
Object
- Object
- MockServer::GrpcStreamMessage
- Defined in:
- lib/mockserver/models.rb
Instance Attribute Summary collapse
-
#delay ⇒ Object
template_type marks the message
jsonas a response template rendered by the named engine (VELOCITY / JAVASCRIPT / MUSTACHE), mirroring the server GrpcStreamResponseDTO / GrpcBidiResponseDTO messagetemplateType. -
#json ⇒ Object
template_type marks the message
jsonas a response template rendered by the named engine (VELOCITY / JAVASCRIPT / MUSTACHE), mirroring the server GrpcStreamResponseDTO / GrpcBidiResponseDTO messagetemplateType. -
#template_type ⇒ Object
template_type marks the message
jsonas a response template rendered by the named engine (VELOCITY / JAVASCRIPT / MUSTACHE), mirroring the server GrpcStreamResponseDTO / GrpcBidiResponseDTO messagetemplateType.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json: nil, template_type: nil, delay: nil) ⇒ GrpcStreamMessage
constructor
A new instance of GrpcStreamMessage.
- #to_h ⇒ Object
Constructor Details
#initialize(json: nil, template_type: nil, delay: nil) ⇒ GrpcStreamMessage
Returns a new instance of GrpcStreamMessage.
1530 1531 1532 1533 1534 |
# File 'lib/mockserver/models.rb', line 1530 def initialize(json: nil, template_type: nil, delay: nil) @json = json @template_type = template_type @delay = delay end |
Instance Attribute Details
#delay ⇒ Object
template_type marks the message json as a response template rendered by the
named engine (VELOCITY / JAVASCRIPT / MUSTACHE), mirroring the server
GrpcStreamResponseDTO / GrpcBidiResponseDTO message templateType.
1528 1529 1530 |
# File 'lib/mockserver/models.rb', line 1528 def delay @delay end |
#json ⇒ Object
template_type marks the message json as a response template rendered by the
named engine (VELOCITY / JAVASCRIPT / MUSTACHE), mirroring the server
GrpcStreamResponseDTO / GrpcBidiResponseDTO message templateType.
1528 1529 1530 |
# File 'lib/mockserver/models.rb', line 1528 def json @json end |
#template_type ⇒ Object
template_type marks the message json as a response template rendered by the
named engine (VELOCITY / JAVASCRIPT / MUSTACHE), mirroring the server
GrpcStreamResponseDTO / GrpcBidiResponseDTO message templateType.
1528 1529 1530 |
# File 'lib/mockserver/models.rb', line 1528 def template_type @template_type end |
Class Method Details
Instance Method Details
#to_h ⇒ Object
1536 1537 1538 1539 1540 1541 1542 |
# File 'lib/mockserver/models.rb', line 1536 def to_h result = {} result['json'] = @json unless @json.nil? result['templateType'] = @template_type unless @template_type.nil? result['delay'] = @delay.to_h if @delay result end |