Class: Falcon::ModelsAWSAccountV1
- Inherits:
-
Object
- Object
- Falcon::ModelsAWSAccountV1
- Defined in:
- lib/crimson-falcon/models/models_aws_account_v1.rb
Instance Attribute Summary collapse
-
#_alias ⇒ Object
Alias/Name associated with the account.
-
#access_health ⇒ Object
Returns the value of attribute access_health.
-
#cid ⇒ Object
Returns the value of attribute cid.
-
#cloudformation_stack_id ⇒ Object
Unique identifier for the cloudformation stack id used for provisioning.
-
#cloudformation_url ⇒ Object
URL of the CloudFormation template to execute.
-
#cloudtrail_bucket_owner_id ⇒ Object
The 12 digit AWS account which is hosting the S3 bucket containing cloudtrail logs for this account.
-
#cloudtrail_bucket_region ⇒ Object
Region where the S3 bucket containing cloudtrail logs resides.
-
#created_timestamp ⇒ Object
Timestamp of when the account was first provisioned within CrowdStrike’s system.‘.
-
#external_id ⇒ Object
ID assigned for use with cross account IAM role access.
-
#iam_role_arn ⇒ Object
The full arn of the IAM role created in this account to control access.
-
#id ⇒ Object
12 digit AWS provided unique identifier for the account.
-
#last_modified_timestamp ⇒ Object
Timestamp of when the account was last modified.
-
#last_scanned_timestamp ⇒ Object
Timestamp of when the account was scanned.
-
#policy_version ⇒ Object
Current version of permissions associated with IAM role and granted access.
-
#provisioning_state ⇒ Object
Provisioning state of the account.
-
#rate_limit_reqs ⇒ Object
Rate limiting setting to control the maximum number of requests that can be made within the rate_limit_time duration.
-
#rate_limit_time ⇒ Object
Rate limiting setting to control the number of seconds for which rate_limit_reqs applies.
-
#template_version ⇒ Object
Current version of cloudformation template used to manage access.
Class Method Summary collapse
-
.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.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ModelsAWSAccountV1
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ModelsAWSAccountV1
Initializes the object
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 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 148 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsAWSAccountV1` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::ModelsAWSAccountV1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'access_health') self.access_health = attributes[:'access_health'] end if attributes.key?(:'_alias') self._alias = attributes[:'_alias'] end if attributes.key?(:'cid') self.cid = attributes[:'cid'] end if attributes.key?(:'cloudformation_stack_id') self.cloudformation_stack_id = attributes[:'cloudformation_stack_id'] end if attributes.key?(:'cloudformation_url') self.cloudformation_url = attributes[:'cloudformation_url'] end if attributes.key?(:'cloudtrail_bucket_owner_id') self.cloudtrail_bucket_owner_id = attributes[:'cloudtrail_bucket_owner_id'] end if attributes.key?(:'cloudtrail_bucket_region') self.cloudtrail_bucket_region = attributes[:'cloudtrail_bucket_region'] end if attributes.key?(:'created_timestamp') self. = attributes[:'created_timestamp'] end if attributes.key?(:'external_id') self.external_id = attributes[:'external_id'] end if attributes.key?(:'iam_role_arn') self.iam_role_arn = attributes[:'iam_role_arn'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'last_modified_timestamp') self. = attributes[:'last_modified_timestamp'] end if attributes.key?(:'last_scanned_timestamp') self. = attributes[:'last_scanned_timestamp'] end if attributes.key?(:'policy_version') self.policy_version = attributes[:'policy_version'] end if attributes.key?(:'provisioning_state') self.provisioning_state = attributes[:'provisioning_state'] end if attributes.key?(:'rate_limit_reqs') self.rate_limit_reqs = attributes[:'rate_limit_reqs'] end if attributes.key?(:'rate_limit_time') self.rate_limit_time = attributes[:'rate_limit_time'] end if attributes.key?(:'template_version') self.template_version = attributes[:'template_version'] end end |
Instance Attribute Details
#_alias ⇒ Object
Alias/Name associated with the account. This is only updated once the account is in a registered state.
38 39 40 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 38 def _alias @_alias end |
#access_health ⇒ Object
Returns the value of attribute access_health.
35 36 37 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 35 def access_health @access_health end |
#cid ⇒ Object
Returns the value of attribute cid.
40 41 42 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 40 def cid @cid end |
#cloudformation_stack_id ⇒ Object
Unique identifier for the cloudformation stack id used for provisioning.
43 44 45 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 43 def cloudformation_stack_id @cloudformation_stack_id end |
#cloudformation_url ⇒ Object
URL of the CloudFormation template to execute. This is returned when mode is to set ‘cloudformation’ when provisioning.
46 47 48 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 46 def cloudformation_url @cloudformation_url end |
#cloudtrail_bucket_owner_id ⇒ Object
The 12 digit AWS account which is hosting the S3 bucket containing cloudtrail logs for this account. If this field is set, it takes precedence of the settings level field.
49 50 51 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 49 def cloudtrail_bucket_owner_id @cloudtrail_bucket_owner_id end |
#cloudtrail_bucket_region ⇒ Object
Region where the S3 bucket containing cloudtrail logs resides. This is only set if using cloudformation to provision and create the trail.
52 53 54 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 52 def cloudtrail_bucket_region @cloudtrail_bucket_region end |
#created_timestamp ⇒ Object
Timestamp of when the account was first provisioned within CrowdStrike’s system.‘
55 56 57 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 55 def @created_timestamp end |
#external_id ⇒ Object
ID assigned for use with cross account IAM role access.
58 59 60 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 58 def external_id @external_id end |
#iam_role_arn ⇒ Object
The full arn of the IAM role created in this account to control access.
61 62 63 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 61 def iam_role_arn @iam_role_arn end |
#id ⇒ Object
12 digit AWS provided unique identifier for the account.
64 65 66 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 64 def id @id end |
#last_modified_timestamp ⇒ Object
Timestamp of when the account was last modified.
67 68 69 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 67 def @last_modified_timestamp end |
#last_scanned_timestamp ⇒ Object
Timestamp of when the account was scanned.
70 71 72 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 70 def @last_scanned_timestamp end |
#policy_version ⇒ Object
Current version of permissions associated with IAM role and granted access.
73 74 75 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 73 def policy_version @policy_version end |
#provisioning_state ⇒ Object
Provisioning state of the account. Values can be; initiated, registered, unregistered.
76 77 78 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 76 def provisioning_state @provisioning_state end |
#rate_limit_reqs ⇒ Object
Rate limiting setting to control the maximum number of requests that can be made within the rate_limit_time duration.
79 80 81 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 79 def rate_limit_reqs @rate_limit_reqs end |
#rate_limit_time ⇒ Object
Rate limiting setting to control the number of seconds for which rate_limit_reqs applies.
82 83 84 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 82 def rate_limit_time @rate_limit_time end |
#template_version ⇒ Object
Current version of cloudformation template used to manage access.
85 86 87 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 85 def template_version @template_version end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
112 113 114 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 112 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 88 def self.attribute_map { :'access_health' => :'access_health', :'_alias' => :'alias', :'cid' => :'cid', :'cloudformation_stack_id' => :'cloudformation_stack_id', :'cloudformation_url' => :'cloudformation_url', :'cloudtrail_bucket_owner_id' => :'cloudtrail_bucket_owner_id', :'cloudtrail_bucket_region' => :'cloudtrail_bucket_region', :'created_timestamp' => :'created_timestamp', :'external_id' => :'external_id', :'iam_role_arn' => :'iam_role_arn', :'id' => :'id', :'last_modified_timestamp' => :'last_modified_timestamp', :'last_scanned_timestamp' => :'last_scanned_timestamp', :'policy_version' => :'policy_version', :'provisioning_state' => :'provisioning_state', :'rate_limit_reqs' => :'rate_limit_reqs', :'rate_limit_time' => :'rate_limit_time', :'template_version' => :'template_version' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
287 288 289 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 287 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
141 142 143 144 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 141 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 117 def self.openapi_types { :'access_health' => :'ModelsAwsAccountAccessHealth', :'_alias' => :'String', :'cid' => :'String', :'cloudformation_stack_id' => :'String', :'cloudformation_url' => :'String', :'cloudtrail_bucket_owner_id' => :'String', :'cloudtrail_bucket_region' => :'String', :'created_timestamp' => :'String', :'external_id' => :'String', :'iam_role_arn' => :'String', :'id' => :'String', :'last_modified_timestamp' => :'String', :'last_scanned_timestamp' => :'String', :'policy_version' => :'String', :'provisioning_state' => :'String', :'rate_limit_reqs' => :'Integer', :'rate_limit_time' => :'Integer', :'template_version' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 249 def ==(o) return true if self.equal?(o) self.class == o.class && access_health == o.access_health && _alias == o._alias && cid == o.cid && cloudformation_stack_id == o.cloudformation_stack_id && cloudformation_url == o.cloudformation_url && cloudtrail_bucket_owner_id == o.cloudtrail_bucket_owner_id && cloudtrail_bucket_region == o.cloudtrail_bucket_region && == o. && external_id == o.external_id && iam_role_arn == o.iam_role_arn && id == o.id && == o. && == o. && policy_version == o.policy_version && provisioning_state == o.provisioning_state && rate_limit_reqs == o.rate_limit_reqs && rate_limit_time == o.rate_limit_time && template_version == o.template_version end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 318 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Falcon.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
389 390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 389 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 294 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{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[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
274 275 276 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 274 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
280 281 282 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 280 def hash [access_health, _alias, cid, cloudformation_stack_id, cloudformation_url, cloudtrail_bucket_owner_id, cloudtrail_bucket_region, , external_id, iam_role_arn, id, , , policy_version, provisioning_state, rate_limit_reqs, rate_limit_time, template_version].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
236 237 238 239 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 236 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
365 366 367 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 365 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
371 372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 371 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 |
#to_s ⇒ String
Returns the string representation of the object
359 360 361 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 359 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
243 244 245 |
# File 'lib/crimson-falcon/models/models_aws_account_v1.rb', line 243 def valid? true end |