Class: MistApi::AccountPrismaConfig
- Defined in:
- lib/mist_api/models/account_prisma_config.rb
Overview
OAuth linked CrowdStrike apps account details
Instance Attribute Summary collapse
-
#auto_probe_subnet ⇒ String
Required If ‘enable_probe`==`true`.
-
#client_id ⇒ String
Customer account api client ID.
-
#client_secret ⇒ String
Customer account api client Secret.
-
#enable_probe ⇒ TrueClass | FalseClass
To enable/disable tunnel probe.
-
#tsg_id ⇒ String
Prisma Tenant Service Group id.
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, tsg_id = nil, auto_probe_subnet = SKIP, enable_probe = false, additional_properties = nil) ⇒ AccountPrismaConfig
constructor
A new instance of AccountPrismaConfig.
-
#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, tsg_id = nil, auto_probe_subnet = SKIP, enable_probe = false, additional_properties = nil) ⇒ AccountPrismaConfig
Returns a new instance of AccountPrismaConfig.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 59 def initialize(client_id = nil, client_secret = nil, tsg_id = nil, auto_probe_subnet = SKIP, enable_probe = false, additional_properties = nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @auto_probe_subnet = auto_probe_subnet unless auto_probe_subnet == SKIP @client_id = client_id @client_secret = client_secret @enable_probe = enable_probe unless enable_probe == SKIP @tsg_id = tsg_id @additional_properties = additional_properties end |
Instance Attribute Details
#auto_probe_subnet ⇒ String
Required If ‘enable_probe`==`true`. This field will accept an IPv4 cidr and an IP address will be picked from this range to be used as tunnel probe source ip address and as well as BGP neighbour IP address. The subnet should be big enough for num_devices * num_tunnel * 2
17 18 19 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 17 def auto_probe_subnet @auto_probe_subnet end |
#client_id ⇒ String
Customer account api client ID
21 22 23 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 21 def client_id @client_id end |
#client_secret ⇒ String
Customer account api client Secret
25 26 27 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 25 def client_secret @client_secret end |
#enable_probe ⇒ TrueClass | FalseClass
To enable/disable tunnel probe
29 30 31 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 29 def enable_probe @enable_probe end |
#tsg_id ⇒ String
Prisma Tenant Service Group id
33 34 35 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 33 def tsg_id @tsg_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 74 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 tsg_id = hash.key?('tsg_id') ? hash['tsg_id'] : nil auto_probe_subnet = hash.key?('auto_probe_subnet') ? hash['auto_probe_subnet'] : SKIP enable_probe = hash['enable_probe'] ||= false # 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. AccountPrismaConfig.new(client_id, client_secret, tsg_id, auto_probe_subnet, enable_probe, additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 44 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['auto_probe_subnet'] = 'auto_probe_subnet' @_hash['client_id'] = 'client_id' @_hash['client_secret'] = 'client_secret' @_hash['enable_probe'] = 'enable_probe' @_hash['tsg_id'] = 'tsg_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 50 51 52 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 47 def self.optionals %w[ auto_probe_subnet enable_probe ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
110 111 112 113 114 115 116 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 110 def inspect class_name = self.class.name.split('::').last "<#{class_name} auto_probe_subnet: #{@auto_probe_subnet.inspect}, client_id:"\ " #{@client_id.inspect}, client_secret: #{@client_secret.inspect}, enable_probe:"\ " #{@enable_probe.inspect}, tsg_id: #{@tsg_id.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 107 |
# File 'lib/mist_api/models/account_prisma_config.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} auto_probe_subnet: #{@auto_probe_subnet}, client_id: #{@client_id},"\ " client_secret: #{@client_secret}, enable_probe: #{@enable_probe}, tsg_id: #{@tsg_id},"\ " additional_properties: #{@additional_properties}>" end |