Class: Verizon::CreateIoTApplicationRequest

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

Overview

The request body must include the UUID of the subscription that you want to update plus any properties that you want to change.

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, billing_account_id = SKIP, client_id = SKIP, client_secret = SKIP, email_i_ds = SKIP, resourcegroup = SKIP, sample_io_tc_app = SKIP, subscription_id = SKIP, tenant_id = SKIP) ⇒ CreateIoTApplicationRequest

Returns a new instance of CreateIoTApplicationRequest.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/verizon/models/create_io_t_application_request.rb', line 85

def initialize(app_name = SKIP,  = SKIP, client_id = SKIP,
               client_secret = SKIP, email_i_ds = SKIP,
               resourcegroup = SKIP, sample_io_tc_app = SKIP,
               subscription_id = SKIP, tenant_id = SKIP)
  @app_name = app_name unless app_name == SKIP
  @billing_account_id =  unless  == SKIP
  @client_id = client_id unless client_id == SKIP
  @client_secret = client_secret unless client_secret == SKIP
  @email_i_ds = email_i_ds unless email_i_ds == SKIP
  @resourcegroup = resourcegroup unless resourcegroup == SKIP
  @sample_io_tc_app = sample_io_tc_app unless sample_io_tc_app == SKIP
  @subscription_id = subscription_id unless subscription_id == SKIP
  @tenant_id = tenant_id unless tenant_id == SKIP
end

Instance Attribute Details

#app_nameString

A user defined name for the application being deployed in Azure IoT Central.

Returns:

  • (String)


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

def app_name
  @app_name
end

#billing_account_idString

The ThingSpace ID of the authenticating billing account

Returns:

  • (String)


20
21
22
# File 'lib/verizon/models/create_io_t_application_request.rb', line 20

def 
  @billing_account_id
end

#client_idString

The Azure ClientID of the associated Azure target account

Returns:

  • (String)


24
25
26
# File 'lib/verizon/models/create_io_t_application_request.rb', line 24

def client_id
  @client_id
end

#client_secretString

The Azure Client Secret of the associated Azure target account

Returns:

  • (String)


28
29
30
# File 'lib/verizon/models/create_io_t_application_request.rb', line 28

def client_secret
  @client_secret
end

#email_i_dsString

The “email IDs” to be added to/sent to with this API.

Returns:

  • (String)


32
33
34
# File 'lib/verizon/models/create_io_t_application_request.rb', line 32

def email_i_ds
  @email_i_ds
end

#resourcegroupString

The Azure Resource group of the associated Azure target account

Returns:

  • (String)


36
37
38
# File 'lib/verizon/models/create_io_t_application_request.rb', line 36

def resourcegroup
  @resourcegroup
end

#sample_io_tc_appString

This is the reference Azure IoT Central application developed by Verizon.

Returns:

  • (String)


40
41
42
# File 'lib/verizon/models/create_io_t_application_request.rb', line 40

def sample_io_tc_app
  @sample_io_tc_app
end

#subscription_idString

The Azure Subscription ID of the associated Azure target account

Returns:

  • (String)


44
45
46
# File 'lib/verizon/models/create_io_t_application_request.rb', line 44

def subscription_id
  @subscription_id
end

#tenant_idString

The Azure Tenant ID of the associated Azure target account

Returns:

  • (String)


48
49
50
# File 'lib/verizon/models/create_io_t_application_request.rb', line 48

def tenant_id
  @tenant_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/verizon/models/create_io_t_application_request.rb', line 101

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  app_name = hash.key?('appName') ? hash['appName'] : SKIP
   =
    hash.key?('billingAccountID') ? hash['billingAccountID'] : SKIP
  client_id = hash.key?('clientID') ? hash['clientID'] : SKIP
  client_secret = hash.key?('clientSecret') ? hash['clientSecret'] : SKIP
  email_i_ds = hash.key?('emailIDs') ? hash['emailIDs'] : SKIP
  resourcegroup = hash.key?('resourcegroup') ? hash['resourcegroup'] : SKIP
  sample_io_tc_app =
    hash.key?('sampleIOTcApp') ? hash['sampleIOTcApp'] : SKIP
  subscription_id =
    hash.key?('subscriptionID') ? hash['subscriptionID'] : SKIP
  tenant_id = hash.key?('tenantID') ? hash['tenantID'] : SKIP

  # Create object from extracted values.
  CreateIoTApplicationRequest.new(app_name,
                                  ,
                                  client_id,
                                  client_secret,
                                  email_i_ds,
                                  resourcegroup,
                                  sample_io_tc_app,
                                  subscription_id,
                                  tenant_id)
end

.namesObject

A mapping from model property names to API property names.



51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/verizon/models/create_io_t_application_request.rb', line 51

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['app_name'] = 'appName'
  @_hash['billing_account_id'] = 'billingAccountID'
  @_hash['client_id'] = 'clientID'
  @_hash['client_secret'] = 'clientSecret'
  @_hash['email_i_ds'] = 'emailIDs'
  @_hash['resourcegroup'] = 'resourcegroup'
  @_hash['sample_io_tc_app'] = 'sampleIOTcApp'
  @_hash['subscription_id'] = 'subscriptionID'
  @_hash['tenant_id'] = 'tenantID'
  @_hash
end

.nullablesObject

An array for nullable fields



81
82
83
# File 'lib/verizon/models/create_io_t_application_request.rb', line 81

def self.nullables
  []
end

.optionalsObject

An array for optional fields



66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/verizon/models/create_io_t_application_request.rb', line 66

def self.optionals
  %w[
    app_name
    billing_account_id
    client_id
    client_secret
    email_i_ds
    resourcegroup
    sample_io_tc_app
    subscription_id
    tenant_id
  ]
end