Class: IbmCloudIam::TrustedProfileTemplateResponse
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- IbmCloudIam::TrustedProfileTemplateResponse
- Defined in:
- lib/ibm_cloud_iam/models/trusted_profile_template_response.rb
Overview
Response body format for Trusted Profile Template REST requests
Instance Attribute Summary collapse
-
#account_id ⇒ Object
ID of the account where the template resides.
-
#action_controls ⇒ Object
Returns the value of attribute action_controls.
-
#committed ⇒ Object
Committed flag determines if the template is ready for assignment.
-
#created_at ⇒ Object
Timestamp of when the template was created.
-
#created_by_id ⇒ Object
IAMid of the creator.
-
#crn ⇒ Object
Cloud resource name.
-
#description ⇒ Object
The description of the trusted profile template.
-
#entity_tag ⇒ Object
Entity tag for this templateId-version combination.
-
#history ⇒ Object
History of the trusted profile template.
-
#id ⇒ Object
ID of the the template.
-
#last_modified_at ⇒ Object
Timestamp of when the template was last modified.
-
#last_modified_by_id ⇒ Object
IAMid of the identity that made the latest modification.
-
#name ⇒ Object
The name of the trusted profile template.
-
#policy_template_references ⇒ Object
Existing policy templates that you can reference to assign access in the trusted profile component.
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#version ⇒ Object
Version of the the template.
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 = {}) ⇒ TrustedProfileTemplateResponse
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 = {}) ⇒ TrustedProfileTemplateResponse
Initializes the object
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 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 127 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IbmCloudIam::TrustedProfileTemplateResponse` 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::TrustedProfileTemplateResponse`. 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?(:'id') self.id = attributes[:'id'] else self.id = nil end if attributes.key?(:'version') self.version = attributes[:'version'] else self.version = nil end if attributes.key?(:'account_id') self.account_id = attributes[:'account_id'] else self.account_id = nil end if attributes.key?(:'name') self.name = attributes[:'name'] else self.name = nil end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'committed') self.committed = attributes[:'committed'] end if attributes.key?(:'profile') self.profile = attributes[:'profile'] end if attributes.key?(:'policy_template_references') if (value = attributes[:'policy_template_references']).is_a?(Array) self.policy_template_references = value end end if attributes.key?(:'action_controls') self.action_controls = attributes[:'action_controls'] end if attributes.key?(:'history') if (value = attributes[:'history']).is_a?(Array) self.history = value end end if attributes.key?(:'entity_tag') self.entity_tag = attributes[:'entity_tag'] end if attributes.key?(:'crn') self.crn = attributes[:'crn'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'created_by_id') self.created_by_id = attributes[:'created_by_id'] end if attributes.key?(:'last_modified_at') self.last_modified_at = attributes[:'last_modified_at'] end if attributes.key?(:'last_modified_by_id') self.last_modified_by_id = attributes[:'last_modified_by_id'] end end |
Instance Attribute Details
#account_id ⇒ Object
ID of the account where the template resides.
26 27 28 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 26 def account_id @account_id end |
#action_controls ⇒ Object
Returns the value of attribute action_controls.
42 43 44 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 42 def action_controls @action_controls end |
#committed ⇒ Object
Committed flag determines if the template is ready for assignment
35 36 37 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 35 def committed @committed end |
#created_at ⇒ Object
Timestamp of when the template was created
54 55 56 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 54 def created_at @created_at end |
#created_by_id ⇒ Object
IAMid of the creator
57 58 59 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 57 def created_by_id @created_by_id end |
#crn ⇒ Object
Cloud resource name
51 52 53 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 51 def crn @crn end |
#description ⇒ Object
The description of the trusted profile template. Describe the template for enterprise account users.
32 33 34 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 32 def description @description end |
#entity_tag ⇒ Object
Entity tag for this templateId-version combination
48 49 50 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 48 def entity_tag @entity_tag end |
#history ⇒ Object
History of the trusted profile template.
45 46 47 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 45 def history @history end |
#id ⇒ Object
ID of the the template
20 21 22 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 20 def id @id end |
#last_modified_at ⇒ Object
Timestamp of when the template was last modified
60 61 62 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 60 def last_modified_at @last_modified_at end |
#last_modified_by_id ⇒ Object
IAMid of the identity that made the latest modification
63 64 65 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 63 def last_modified_by_id @last_modified_by_id end |
#name ⇒ Object
The name of the trusted profile template. This is visible only in the enterprise account.
29 30 31 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 29 def name @name end |
#policy_template_references ⇒ Object
Existing policy templates that you can reference to assign access in the trusted profile component.
40 41 42 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 40 def policy_template_references @policy_template_references end |
#profile ⇒ Object
Returns the value of attribute profile.
37 38 39 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 37 def profile @profile end |
#version ⇒ Object
Version of the the template
23 24 25 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 23 def version @version end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
88 89 90 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 88 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
93 94 95 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 93 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 66 def self.attribute_map { :'id' => :'id', :'version' => :'version', :'account_id' => :'account_id', :'name' => :'name', :'description' => :'description', :'committed' => :'committed', :'profile' => :'profile', :'policy_template_references' => :'policy_template_references', :'action_controls' => :'action_controls', :'history' => :'history', :'entity_tag' => :'entity_tag', :'crn' => :'crn', :'created_at' => :'created_at', :'created_by_id' => :'created_by_id', :'last_modified_at' => :'last_modified_at', :'last_modified_by_id' => :'last_modified_by_id' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 331 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
120 121 122 123 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 120 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 98 def self.openapi_types { :'id' => :'String', :'version' => :'Integer', :'account_id' => :'String', :'name' => :'String', :'description' => :'String', :'committed' => :'Boolean', :'profile' => :'TemplateProfileComponentResponse', :'policy_template_references' => :'Array<PolicyTemplateReference>', :'action_controls' => :'ActionControls', :'history' => :'Array<EnityHistoryRecord>', :'entity_tag' => :'String', :'crn' => :'String', :'created_at' => :'String', :'created_by_id' => :'String', :'last_modified_at' => :'String', :'last_modified_by_id' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 295 def ==(o) return true if self.equal?(o) self.class == o.class && id == o.id && version == o.version && account_id == o.account_id && name == o.name && description == o.description && committed == o.committed && profile == o.profile && policy_template_references == o.policy_template_references && action_controls == o.action_controls && history == o.history && entity_tag == o.entity_tag && crn == o.crn && created_at == o.created_at && created_by_id == o.created_by_id && last_modified_at == o.last_modified_at && last_modified_by_id == o.last_modified_by_id end |
#eql?(o) ⇒ Boolean
318 319 320 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 318 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
324 325 326 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 324 def hash [id, version, account_id, name, description, committed, profile, policy_template_references, action_controls, history, entity_tag, crn, created_at, created_by_id, last_modified_at, last_modified_by_id].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 220 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @version.nil? invalid_properties.push('invalid value for "version", version cannot be nil.') end if @account_id.nil? invalid_properties.push('invalid value for "account_id", account_id cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 353 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
244 245 246 247 248 249 250 251 |
# File 'lib/ibm_cloud_iam/models/trusted_profile_template_response.rb', line 244 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @id.nil? return false if @version.nil? return false if @account_id.nil? return false if @name.nil? true end |