Method: OCI::Bds::Models::CreateBdsApiKeyDetails#initialize

Defined in:
lib/oci/bds/models/create_bds_api_key_details.rb

#initialize(attributes = {}) ⇒ CreateBdsApiKeyDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :user_id (String)

    The value to assign to the #user_id property

  • :passphrase (String)

    The value to assign to the #passphrase property

  • :default_region (String)

    The value to assign to the #default_region property

  • :key_alias (String)

    The value to assign to the #key_alias property



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/oci/bds/models/create_bds_api_key_details.rb', line 64

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.user_id = attributes[:'userId'] if attributes[:'userId']

  raise 'You cannot provide both :userId and :user_id' if attributes.key?(:'userId') && attributes.key?(:'user_id')

  self.user_id = attributes[:'user_id'] if attributes[:'user_id']

  self.passphrase = attributes[:'passphrase'] if attributes[:'passphrase']

  self.default_region = attributes[:'defaultRegion'] if attributes[:'defaultRegion']

  raise 'You cannot provide both :defaultRegion and :default_region' if attributes.key?(:'defaultRegion') && attributes.key?(:'default_region')

  self.default_region = attributes[:'default_region'] if attributes[:'default_region']

  self.key_alias = attributes[:'keyAlias'] if attributes[:'keyAlias']

  raise 'You cannot provide both :keyAlias and :key_alias' if attributes.key?(:'keyAlias') && attributes.key?(:'key_alias')

  self.key_alias = attributes[:'key_alias'] if attributes[:'key_alias']
end