Class: Cadenya::Types::GoogleProtobufAny

Inherits:
Object
  • Object
show all
Defined in:
lib/cadenya/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type: nil) ⇒ GoogleProtobufAny

Returns a new instance of GoogleProtobufAny.



2289
2290
2291
# File 'lib/cadenya/types.rb', line 2289

def initialize(type: nil)
  @type = type
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



2287
2288
2289
# File 'lib/cadenya/types.rb', line 2287

def type
  @type
end

Class Method Details

.from_json(data) ⇒ Object



2293
2294
2295
2296
2297
# File 'lib/cadenya/types.rb', line 2293

def self.from_json(data)
  new(
    type: data["@type"],
  )
end

Instance Method Details

#to_hObject



2299
2300
2301
2302
2303
# File 'lib/cadenya/types.rb', line 2299

def to_h
  {
    type: Util.plain(@type),
  }.reject { |_k, v| v.nil? }
end