Class: Verizon::CreateIoTApplicationResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/verizon/models/create_io_t_application_response.rb

Overview

A success response includes an array of all matching events. Each event includes the full event resource definition.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(app_name = SKIP, shared_secret = SKIP, url = SKIP) ⇒ CreateIoTApplicationResponse

Returns a new instance of CreateIoTApplicationResponse.



51
52
53
54
55
# File 'lib/verizon/models/create_io_t_application_response.rb', line 51

def initialize(app_name = SKIP, shared_secret = SKIP, url = SKIP)
  @app_name = app_name unless app_name == SKIP
  @shared_secret = shared_secret unless shared_secret == SKIP
  @url = url unless url == SKIP
end

Instance Attribute Details

#app_nameString

An application will be created under the user’s Azure subscription with this name and of type IOT central.

Returns:

  • (String)


16
17
18
# File 'lib/verizon/models/create_io_t_application_response.rb', line 16

def app_name
  @app_name
end

#shared_secretString

Part of the user credentials (from Azure) the user needs to use for calling further TS Core APIs for setting up Azure cloud connector.

Returns:

  • (String)


21
22
23
# File 'lib/verizon/models/create_io_t_application_response.rb', line 21

def shared_secret
  @shared_secret
end

#urlString

An IOT central endpoint the user can use to see the data that is being streamed.

Returns:

  • (String)


26
27
28
# File 'lib/verizon/models/create_io_t_application_response.rb', line 26

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/verizon/models/create_io_t_application_response.rb', line 58

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  app_name = hash.key?('appName') ? hash['appName'] : SKIP
  shared_secret = hash.key?('sharedSecret') ? hash['sharedSecret'] : SKIP
  url = hash.key?('url') ? hash['url'] : SKIP

  # Create object from extracted values.
  CreateIoTApplicationResponse.new(app_name,
                                   shared_secret,
                                   url)
end

.namesObject

A mapping from model property names to API property names.



29
30
31
32
33
34
35
# File 'lib/verizon/models/create_io_t_application_response.rb', line 29

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['app_name'] = 'appName'
  @_hash['shared_secret'] = 'sharedSecret'
  @_hash['url'] = 'url'
  @_hash
end

.nullablesObject

An array for nullable fields



47
48
49
# File 'lib/verizon/models/create_io_t_application_response.rb', line 47

def self.nullables
  []
end

.optionalsObject

An array for optional fields



38
39
40
41
42
43
44
# File 'lib/verizon/models/create_io_t_application_response.rb', line 38

def self.optionals
  %w[
    app_name
    shared_secret
    url
  ]
end