Class: MistApi::AccountVmwareConfig
- Defined in:
- lib/mist_api/models/account_vmware_config.rb
Overview
AccountVmwareConfig Model.
Instance Attribute Summary collapse
-
#client_id ⇒ String
Customer account Client ID.
-
#client_secret ⇒ String
Customer account Client Secret.
-
#instance_url ⇒ String
Customer account VMware instance URL.
-
#webhook_enabled ⇒ TrueClass | FalseClass
Enables or disables the webhook integration.
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(client_id = nil, client_secret = nil, instance_url = nil, webhook_enabled = nil, additional_properties = nil) ⇒ AccountVmwareConfig
constructor
A new instance of AccountVmwareConfig.
-
#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(client_id = nil, client_secret = nil, instance_url = nil, webhook_enabled = nil, additional_properties = nil) ⇒ AccountVmwareConfig
Returns a new instance of AccountVmwareConfig.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 48 def initialize(client_id = nil, client_secret = nil, instance_url = nil, webhook_enabled = nil, additional_properties = nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_id = client_id @client_secret = client_secret @instance_url = instance_url @webhook_enabled = webhook_enabled @additional_properties = additional_properties end |
Instance Attribute Details
#client_id ⇒ String
Customer account Client ID
14 15 16 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 14 def client_id @client_id end |
#client_secret ⇒ String
Customer account Client Secret
18 19 20 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 18 def client_secret @client_secret end |
#instance_url ⇒ String
Customer account VMware instance URL
22 23 24 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 22 def instance_url @instance_url end |
#webhook_enabled ⇒ TrueClass | FalseClass
Enables or disables the webhook integration
26 27 28 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 26 def webhook_enabled @webhook_enabled end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 61 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. client_id = hash.key?('client_id') ? hash['client_id'] : nil client_secret = hash.key?('client_secret') ? hash['client_secret'] : nil instance_url = hash.key?('instance_url') ? hash['instance_url'] : nil webhook_enabled = hash.key?('webhook_enabled') ? hash['webhook_enabled'] : nil # 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. AccountVmwareConfig.new(client_id, client_secret, instance_url, webhook_enabled, additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['client_secret'] = 'client_secret' @_hash['instance_url'] = 'instance_url' @_hash['webhook_enabled'] = 'webhook_enabled' @_hash end |
.nullables ⇒ Object
An array for nullable fields
44 45 46 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 44 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 39 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
95 96 97 98 99 100 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 95 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, client_secret: #{@client_secret.inspect},"\ " instance_url: #{@instance_url.inspect}, webhook_enabled: #{@webhook_enabled.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
87 88 89 90 91 92 |
# File 'lib/mist_api/models/account_vmware_config.rb', line 87 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, client_secret: #{@client_secret}, instance_url:"\ " #{@instance_url}, webhook_enabled: #{@webhook_enabled}, additional_properties:"\ " #{@additional_properties}>" end |