Class: MistApi::OrgSettingApiPolicy

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/org_setting_api_policy.rb

Overview

OrgSettingApiPolicy Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(no_reveal = false) ⇒ OrgSettingApiPolicy

Returns a new instance of OrgSettingApiPolicy.



38
39
40
# File 'lib/mist_api/models/org_setting_api_policy.rb', line 38

def initialize(no_reveal = false)
  @no_reveal = no_reveal unless no_reveal == SKIP
end

Instance Attribute Details

#no_revealTrueClass | FalseClass

By default, API hides password/secrets when the user doesn’t have write access

* `true`: API will hide passwords/secrets for all users
* `false`: API will hide passwords/secrets for read-only users

Returns:

  • (TrueClass | FalseClass)


17
18
19
# File 'lib/mist_api/models/org_setting_api_policy.rb', line 17

def no_reveal
  @no_reveal
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



43
44
45
46
47
48
49
50
51
# File 'lib/mist_api/models/org_setting_api_policy.rb', line 43

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  no_reveal = hash['no_reveal'] ||= false

  # Create object from extracted values.
  OrgSettingApiPolicy.new(no_reveal)
end

.namesObject

A mapping from model property names to API property names.



20
21
22
23
24
# File 'lib/mist_api/models/org_setting_api_policy.rb', line 20

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['no_reveal'] = 'no_reveal'
  @_hash
end

.nullablesObject

An array for nullable fields



34
35
36
# File 'lib/mist_api/models/org_setting_api_policy.rb', line 34

def self.nullables
  []
end

.optionalsObject

An array for optional fields



27
28
29
30
31
# File 'lib/mist_api/models/org_setting_api_policy.rb', line 27

def self.optionals
  %w[
    no_reveal
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



60
61
62
63
# File 'lib/mist_api/models/org_setting_api_policy.rb', line 60

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} no_reveal: #{@no_reveal.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



54
55
56
57
# File 'lib/mist_api/models/org_setting_api_policy.rb', line 54

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} no_reveal: #{@no_reveal}>"
end