Class: Sidemash::Sdk::CreateStreamSquareForm

Inherits:
Object
  • Object
show all
Defined in:
lib/sidemash/sdk/create_stream_square_form.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(is_elastic, size, hook, description = nil, foreign_data = nil, play_domain_name = nil, publish_domain_name = nil) ⇒ CreateStreamSquareForm

Returns a new instance of CreateStreamSquareForm.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 30

def initialize(is_elastic,
               size,
               hook,
               description = nil,
               foreign_data = nil,
               play_domain_name = nil,
               publish_domain_name = nil)
  @_type = 'CreateStreamSquareForm'
  @is_elastic = is_elastic
  @size = size
  @hook = hook
  @description = description
  @foreign_data = foreign_data
  @play_domain_name = play_domain_name
  @publish_domain_name = publish_domain_name
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



25
26
27
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 25

def description
  @description
end

#foreign_dataObject (readonly)

Returns the value of attribute foreign_data.



26
27
28
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 26

def foreign_data
  @foreign_data
end

#hookObject (readonly)

Returns the value of attribute hook.



24
25
26
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 24

def hook
  @hook
end

#is_elasticObject (readonly)

Returns the value of attribute is_elastic.



22
23
24
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 22

def is_elastic
  @is_elastic
end

#play_domain_nameObject (readonly)

Returns the value of attribute play_domain_name.



27
28
29
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 27

def play_domain_name
  @play_domain_name
end

#publish_domain_nameObject (readonly)

Returns the value of attribute publish_domain_name.



28
29
30
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 28

def publish_domain_name
  @publish_domain_name
end

#sizeObject (readonly)

Returns the value of attribute size.



23
24
25
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 23

def size
  @size
end

Class Method Details

._typeObject



47
48
49
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 47

def self._type
  'CreateStreamSquareForm'
end

.from_hash(h) ⇒ Object



90
91
92
93
94
95
96
97
98
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 90

def self.from_hash(h)
  CreateStreamSquareForm.new(h['is_elastic'],
                             StreamSquareSize.from_s(h['size']),
                             Hook.from_hash(h['hook']),
                             h['description'].nil? ? h['description'] : nil,
                             h['foreign_data'].nil? ? h['foreign_data'] : nil,
                             h['play_domain_name'].nil? ? h['play_domain_name'] : nil,
                             h['publish_domain_name'].nil? ? h['publish_domain_name'] : nil)
end

.from_json(js) ⇒ Object



51
52
53
54
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 51

def self.from_json(js)
  h = JSON.parse(js)
  CreateStreamSquareForm.from_hash(h)
end

.from_remote(h) ⇒ Object



80
81
82
83
84
85
86
87
88
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 80

def self.from_remote(h)
  CreateStreamSquareForm.new(h['isElastic'],
                             StreamSquareSize.from_s(h['size']),
                             Hook.from_remote(h['hook']),
                             h['description'].nil? ? h['description'] : nil,
                             h['foreignData'].nil? ? h['foreignData'] : nil,
                             h['playDomainName'].nil? ? h['playDomainName'] : nil,
                             h['publishDomainName'].nil? ? h['publishDomainName'] : nil)
end

Instance Method Details

#to_hashObject



68
69
70
71
72
73
74
75
76
77
78
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 68

def to_hash
  result = {}
  result[:is_elastic] = @is_elastic
  result[:size] = @size.to_s
  result[:hook] = @hook.to_hash
  result[:description] = @description unless @description.nil?
  result[:foreign_data] = @foreign_data unless @foreign_data.nil?
  result[:play_domain_name] = @play_domain_name unless @play_domain_name.nil?
  result[:publish_domain_name] = @publish_domain_name unless @publish_domain_name.nil?
  result
end

#to_json(*a) ⇒ Object



100
101
102
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 100

def to_json(*a)
  to_hash.to_json(*a)
end

#to_remoteObject



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 56

def to_remote
  result = {}
  result[:isElastic] = @is_elastic
  result[:size] = @size.to_s
  result[:hook] = @hook.to_remote
  result[:description] = @description unless @description.nil?
  result[:foreignData] = @foreign_data unless @foreign_data.nil?
  result[:playDomainName] = @play_domain_name unless @play_domain_name.nil?
  result[:publishDomainName] = @publish_domain_name unless @publish_domain_name.nil?
  result
end

#to_sObject



104
105
106
107
108
109
110
111
112
# File 'lib/sidemash/sdk/create_stream_square_form.rb', line 104

def to_s
  ('CreateStreamSquareForm(is_elastic=' + @is_elastic +
                          ', size=' + @size.to_s +
                          ', hook=' + @hook.to_s +
                          ', description=' + @description +
                          ', foreign_data=' + @foreign_data +
                          ', play_domain_name=' + @play_domain_name +
                          ', publish_domain_name=' + @publish_domain_name + ')')
end