Class: OCI::DataScience::Models::CreateIdcsCustomServiceAuthConfigurationDetails
- Inherits:
-
CreateAuthConfigurationDetails
- Object
- CreateAuthConfigurationDetails
- OCI::DataScience::Models::CreateIdcsCustomServiceAuthConfigurationDetails
- Defined in:
- lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb
Overview
Create configuration for existing Oracle Cloud Service
Instance Attribute Summary collapse
-
#access_token ⇒ String
[Required] Bearer token serving as Proof-of-Ownership for referenced IDCS stripe/application.
-
#application_name ⇒ String
[Required] Name of the IDCS application.
-
#audience ⇒ String
[Required] Audience of the IDCS application.
-
#role_name ⇒ String
Name of the IDCS application role.
-
#scope ⇒ String
[Required] Scope of the IDCS application.
Attributes inherited from CreateAuthConfigurationDetails
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CreateIdcsCustomServiceAuthConfigurationDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from CreateAuthConfigurationDetails
Constructor Details
#initialize(attributes = {}) ⇒ CreateIdcsCustomServiceAuthConfigurationDetails
Initializes the object
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 71 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'IDCS_CUSTOM_SERVICE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.audience = attributes[:'audience'] if attributes[:'audience'] self.scope = attributes[:'scope'] if attributes[:'scope'] self.application_name = attributes[:'applicationName'] if attributes[:'applicationName'] raise 'You cannot provide both :applicationName and :application_name' if attributes.key?(:'applicationName') && attributes.key?(:'application_name') self.application_name = attributes[:'application_name'] if attributes[:'application_name'] self.role_name = attributes[:'roleName'] if attributes[:'roleName'] self.role_name = "DATA SCIENCE APPLICATION INSTANCE PREDICT" if role_name.nil? && !attributes.key?(:'roleName') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :roleName and :role_name' if attributes.key?(:'roleName') && attributes.key?(:'role_name') self.role_name = attributes[:'role_name'] if attributes[:'role_name'] self.role_name = "DATA SCIENCE APPLICATION INSTANCE PREDICT" if role_name.nil? && !attributes.key?(:'roleName') && !attributes.key?(:'role_name') # rubocop:disable Style/StringLiterals self.access_token = attributes[:'accessToken'] if attributes[:'accessToken'] raise 'You cannot provide both :accessToken and :access_token' if attributes.key?(:'accessToken') && attributes.key?(:'access_token') self.access_token = attributes[:'access_token'] if attributes[:'access_token'] end |
Instance Attribute Details
#access_token ⇒ String
[Required] Bearer token serving as Proof-of-Ownership for referenced IDCS stripe/application
30 31 32 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 30 def access_token @access_token end |
#application_name ⇒ String
[Required] Name of the IDCS application
22 23 24 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 22 def application_name @application_name end |
#audience ⇒ String
[Required] Audience of the IDCS application
14 15 16 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 14 def audience @audience end |
#role_name ⇒ String
Name of the IDCS application role
26 27 28 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 26 def role_name @role_name end |
#scope ⇒ String
[Required] Scope of the IDCS application
18 19 20 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 18 def scope @scope end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 33 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'audience': :'audience', 'scope': :'scope', 'application_name': :'applicationName', 'role_name': :'roleName', 'access_token': :'accessToken' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 47 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'audience': :'String', 'scope': :'String', 'application_name': :'String', 'role_name': :'String', 'access_token': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 113 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && audience == other.audience && scope == other.scope && application_name == other.application_name && role_name == other.role_name && access_token == other.access_token end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 148 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
128 129 130 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 128 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
137 138 139 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 137 def hash [type, audience, scope, application_name, role_name, access_token].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
181 182 183 184 185 186 187 188 189 190 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 181 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
175 176 177 |
# File 'lib/oci/data_science/models/create_idcs_custom_service_auth_configuration_details.rb', line 175 def to_s to_hash.to_s end |