Class: Verizon::CreateIoTApplicationResponse
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Verizon::CreateIoTApplicationResponse
- 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
-
#app_name ⇒ String
An application will be created under the user’s Azure subscription with this name and of type IOT central.
-
#shared_secret ⇒ String
Part of the user credentials (from Azure) the user needs to use for calling further TS Core APIs for setting up Azure cloud connector.
-
#url ⇒ String
An IOT central endpoint the user can use to see the data that is being streamed.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(app_name: SKIP, shared_secret: SKIP, url: SKIP, additional_properties: nil) ⇒ CreateIoTApplicationResponse
constructor
A new instance of CreateIoTApplicationResponse.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(app_name: SKIP, shared_secret: SKIP, url: SKIP, additional_properties: nil) ⇒ CreateIoTApplicationResponse
Returns a new instance of CreateIoTApplicationResponse.
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/verizon/models/create_io_t_application_response.rb', line 51 def initialize(app_name: SKIP, shared_secret: SKIP, url: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @app_name = app_name unless app_name == SKIP @shared_secret = shared_secret unless shared_secret == SKIP @url = url unless url == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#app_name ⇒ String
An application will be created under the user’s Azure subscription with this name and of type IOT central.
16 17 18 |
# File 'lib/verizon/models/create_io_t_application_response.rb', line 16 def app_name @app_name end |
#shared_secret ⇒ String
Part of the user credentials (from Azure) the user needs to use for calling further TS Core APIs for setting up Azure cloud connector.
21 22 23 |
# File 'lib/verizon/models/create_io_t_application_response.rb', line 21 def shared_secret @shared_secret end |
#url ⇒ String
An IOT central endpoint the user can use to see the data that is being streamed.
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.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/verizon/models/create_io_t_application_response.rb', line 63 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 a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. CreateIoTApplicationResponse.new(app_name: app_name, shared_secret: shared_secret, url: url, additional_properties: additional_properties) end |
.names ⇒ Object
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 |
.nullables ⇒ Object
An array for nullable fields
47 48 49 |
# File 'lib/verizon/models/create_io_t_application_response.rb', line 47 def self.nullables [] end |
.optionals ⇒ Object
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 |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
93 94 95 96 97 |
# File 'lib/verizon/models/create_io_t_application_response.rb', line 93 def inspect class_name = self.class.name.split('::').last "<#{class_name} app_name: #{@app_name.inspect}, shared_secret: #{@shared_secret.inspect},"\ " url: #{@url.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
86 87 88 89 90 |
# File 'lib/verizon/models/create_io_t_application_response.rb', line 86 def to_s class_name = self.class.name.split('::').last "<#{class_name} app_name: #{@app_name}, shared_secret: #{@shared_secret}, url: #{@url},"\ " additional_properties: #{@additional_properties}>" end |