Class: IbmCloudIam::AccountSettingsEffectiveSection
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- IbmCloudIam::AccountSettingsEffectiveSection
- Defined in:
- lib/ibm_cloud_iam/models/account_settings_effective_section.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#allowed_ip_addresses ⇒ Object
Defines the IP addresses and subnets from which IAM tokens can be created for the account.
-
#max_sessions_per_identity ⇒ Object
Defines the max allowed sessions per identity required by the account.
-
#mfa ⇒ Object
Returns the value of attribute mfa.
-
#restrict_create_platform_apikey ⇒ Object
Returns the value of attribute restrict_create_platform_apikey.
-
#restrict_create_service_id ⇒ Object
Returns the value of attribute restrict_create_service_id.
-
#restrict_user_list_visibility ⇒ Object
Returns the value of attribute restrict_user_list_visibility.
-
#session_expiration_in_seconds ⇒ Object
Defines the session expiration in seconds for the account.
-
#session_invalidation_in_seconds ⇒ Object
Defines the period of time in seconds in which a session will be invalidated due to inactivity.
-
#system_access_token_expiration_in_seconds ⇒ Object
Defines the access token expiration in seconds.
-
#system_refresh_token_expiration_in_seconds ⇒ Object
Defines the refresh token expiration in seconds.
-
#user_mfa ⇒ Object
List of users that are exempted from the MFA requirement of the account.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ AccountSettingsEffectiveSection
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ AccountSettingsEffectiveSection
Initializes the object
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 121 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IbmCloudIam::AccountSettingsEffectiveSection` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `IbmCloudIam::AccountSettingsEffectiveSection`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'restrict_create_service_id') self.restrict_create_service_id = attributes[:'restrict_create_service_id'] else self.restrict_create_service_id = 'NOT_SET' end if attributes.key?(:'restrict_create_platform_apikey') self.restrict_create_platform_apikey = attributes[:'restrict_create_platform_apikey'] else self.restrict_create_platform_apikey = 'NOT_SET' end if attributes.key?(:'restrict_user_list_visibility') self.restrict_user_list_visibility = attributes[:'restrict_user_list_visibility'] else self.restrict_user_list_visibility = 'NOT_RESTRICTED' end if attributes.key?(:'allowed_ip_addresses') self.allowed_ip_addresses = attributes[:'allowed_ip_addresses'] end if attributes.key?(:'mfa') self.mfa = attributes[:'mfa'] end if attributes.key?(:'user_mfa') if (value = attributes[:'user_mfa']).is_a?(Array) self.user_mfa = value end end if attributes.key?(:'session_expiration_in_seconds') self.session_expiration_in_seconds = attributes[:'session_expiration_in_seconds'] else self.session_expiration_in_seconds = '86400' end if attributes.key?(:'session_invalidation_in_seconds') self.session_invalidation_in_seconds = attributes[:'session_invalidation_in_seconds'] else self.session_invalidation_in_seconds = '7200' end if attributes.key?(:'max_sessions_per_identity') self.max_sessions_per_identity = attributes[:'max_sessions_per_identity'] end if attributes.key?(:'system_access_token_expiration_in_seconds') self.system_access_token_expiration_in_seconds = attributes[:'system_access_token_expiration_in_seconds'] else self.system_access_token_expiration_in_seconds = '3600' end if attributes.key?(:'system_refresh_token_expiration_in_seconds') self.system_refresh_token_expiration_in_seconds = attributes[:'system_refresh_token_expiration_in_seconds'] else self.system_refresh_token_expiration_in_seconds = '259200' end end |
Instance Attribute Details
#allowed_ip_addresses ⇒ Object
Defines the IP addresses and subnets from which IAM tokens can be created for the account.
25 26 27 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 25 def allowed_ip_addresses @allowed_ip_addresses end |
#max_sessions_per_identity ⇒ Object
Defines the max allowed sessions per identity required by the account. Valid values: * Any whole number greater than 0 * NOT_SET - To unset account setting and use service default
39 40 41 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 39 def max_sessions_per_identity @max_sessions_per_identity end |
#mfa ⇒ Object
Returns the value of attribute mfa.
27 28 29 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 27 def mfa @mfa end |
#restrict_create_platform_apikey ⇒ Object
Returns the value of attribute restrict_create_platform_apikey.
20 21 22 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 20 def restrict_create_platform_apikey @restrict_create_platform_apikey end |
#restrict_create_service_id ⇒ Object
Returns the value of attribute restrict_create_service_id.
18 19 20 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 18 def restrict_create_service_id @restrict_create_service_id end |
#restrict_user_list_visibility ⇒ Object
Returns the value of attribute restrict_user_list_visibility.
22 23 24 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 22 def restrict_user_list_visibility @restrict_user_list_visibility end |
#session_expiration_in_seconds ⇒ Object
Defines the session expiration in seconds for the account. Valid values: * Any whole number between between '900' and '86400' * NOT_SET - To unset account setting and use service default
33 34 35 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 33 def session_expiration_in_seconds @session_expiration_in_seconds end |
#session_invalidation_in_seconds ⇒ Object
Defines the period of time in seconds in which a session will be invalidated due to inactivity. Valid values: * Any whole number between '900' and '7200' * NOT_SET - To unset account setting and use service default
36 37 38 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 36 def session_invalidation_in_seconds @session_invalidation_in_seconds end |
#system_access_token_expiration_in_seconds ⇒ Object
Defines the access token expiration in seconds. Valid values: * Any whole number between '900' and '3600' * NOT_SET - To unset account setting and use service default
42 43 44 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 42 def system_access_token_expiration_in_seconds @system_access_token_expiration_in_seconds end |
#system_refresh_token_expiration_in_seconds ⇒ Object
Defines the refresh token expiration in seconds. Valid values: * Any whole number between '900' and '259200' * NOT_SET - To unset account setting and use service default
45 46 47 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 45 def system_refresh_token_expiration_in_seconds @system_refresh_token_expiration_in_seconds end |
#user_mfa ⇒ Object
List of users that are exempted from the MFA requirement of the account.
30 31 32 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 30 def user_mfa @user_mfa end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
87 88 89 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 87 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
92 93 94 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 92 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 70 def self.attribute_map { :'restrict_create_service_id' => :'restrict_create_service_id', :'restrict_create_platform_apikey' => :'restrict_create_platform_apikey', :'restrict_user_list_visibility' => :'restrict_user_list_visibility', :'allowed_ip_addresses' => :'allowed_ip_addresses', :'mfa' => :'mfa', :'user_mfa' => :'user_mfa', :'session_expiration_in_seconds' => :'session_expiration_in_seconds', :'session_invalidation_in_seconds' => :'session_invalidation_in_seconds', :'max_sessions_per_identity' => :'max_sessions_per_identity', :'system_access_token_expiration_in_seconds' => :'system_access_token_expiration_in_seconds', :'system_refresh_token_expiration_in_seconds' => :'system_refresh_token_expiration_in_seconds' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 244 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
114 115 116 117 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 114 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 97 def self.openapi_types { :'restrict_create_service_id' => :'RetrictActions', :'restrict_create_platform_apikey' => :'RetrictActions', :'restrict_user_list_visibility' => :'UserVisbilityRetrictActions', :'allowed_ip_addresses' => :'String', :'mfa' => :'MfaOptions', :'user_mfa' => :'Array<AccountSettingsUserMFAResponse>', :'session_expiration_in_seconds' => :'String', :'session_invalidation_in_seconds' => :'String', :'max_sessions_per_identity' => :'String', :'system_access_token_expiration_in_seconds' => :'String', :'system_refresh_token_expiration_in_seconds' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 213 def ==(o) return true if self.equal?(o) self.class == o.class && restrict_create_service_id == o.restrict_create_service_id && restrict_create_platform_apikey == o.restrict_create_platform_apikey && restrict_user_list_visibility == o.restrict_user_list_visibility && allowed_ip_addresses == o.allowed_ip_addresses && mfa == o.mfa && user_mfa == o.user_mfa && session_expiration_in_seconds == o.session_expiration_in_seconds && session_invalidation_in_seconds == o.session_invalidation_in_seconds && max_sessions_per_identity == o.max_sessions_per_identity && system_access_token_expiration_in_seconds == o.system_access_token_expiration_in_seconds && system_refresh_token_expiration_in_seconds == o.system_refresh_token_expiration_in_seconds end |
#eql?(o) ⇒ Boolean
231 232 233 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 231 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
237 238 239 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 237 def hash [restrict_create_service_id, restrict_create_platform_apikey, restrict_user_list_visibility, allowed_ip_addresses, mfa, user_mfa, session_expiration_in_seconds, session_invalidation_in_seconds, max_sessions_per_identity, system_access_token_expiration_in_seconds, system_refresh_token_expiration_in_seconds].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
198 199 200 201 202 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 198 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
266 267 268 269 270 271 272 273 274 275 276 277 278 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 266 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
206 207 208 209 |
# File 'lib/ibm_cloud_iam/models/account_settings_effective_section.rb', line 206 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |