Class: OCI::DataIntegration::Models::ScopeReference
- Inherits:
-
Object
- Object
- OCI::DataIntegration::Models::ScopeReference
- Defined in:
- lib/oci/data_integration/models/scope_reference.rb
Overview
The ScopeReference
class is a base class for any model object that wraps a scope reference to a TypedObject.
Constant Summary collapse
- REFERENCE_TYPE_ENUM =
[ REFERENCE_TYPE_DIRECT_REF = 'DIRECT_REF'.freeze, REFERENCE_TYPE_BOUND_ENTITY_SHAPE = 'BOUND_ENTITY_SHAPE'.freeze, REFERENCE_TYPE_BOUND_ENTITY_SHAPE_FIELD = 'BOUND_ENTITY_SHAPE_FIELD'.freeze, REFERENCE_TYPE_OCI_FUNCTION_INPUT_SHAPE = 'OCI_FUNCTION_INPUT_SHAPE'.freeze, REFERENCE_TYPE_OCI_FUNCTION_OUTPUT_SHAPE = 'OCI_FUNCTION_OUTPUT_SHAPE'.freeze, REFERENCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#ref_object_name ⇒ String
The referenced object name for this reference.
-
#reference_object ⇒ String
[Required] A key or shallow reference to an object.
-
#reference_type ⇒ String
The reference type for this reference.
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 = {}) ⇒ ScopeReference
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.
Constructor Details
#initialize(attributes = {}) ⇒ ScopeReference
Initializes the object
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/data_integration/models/scope_reference.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.reference_object = attributes[:'referenceObject'] if attributes[:'referenceObject'] raise 'You cannot provide both :referenceObject and :reference_object' if attributes.key?(:'referenceObject') && attributes.key?(:'reference_object') self.reference_object = attributes[:'reference_object'] if attributes[:'reference_object'] self.reference_type = attributes[:'referenceType'] if attributes[:'referenceType'] self.reference_type = "DIRECT_REF" if reference_type.nil? && !attributes.key?(:'referenceType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :referenceType and :reference_type' if attributes.key?(:'referenceType') && attributes.key?(:'reference_type') self.reference_type = attributes[:'reference_type'] if attributes[:'reference_type'] self.reference_type = "DIRECT_REF" if reference_type.nil? && !attributes.key?(:'referenceType') && !attributes.key?(:'reference_type') # rubocop:disable Style/StringLiterals self.ref_object_name = attributes[:'refObjectName'] if attributes[:'refObjectName'] raise 'You cannot provide both :refObjectName and :ref_object_name' if attributes.key?(:'refObjectName') && attributes.key?(:'ref_object_name') self.ref_object_name = attributes[:'ref_object_name'] if attributes[:'ref_object_name'] end |
Instance Attribute Details
#ref_object_name ⇒ String
The referenced object name for this reference. Set to the field name if the referenceType is BOUND_ENTITY_SHAPE_FIELD, else set to null.
31 32 33 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 31 def ref_object_name @ref_object_name end |
#reference_object ⇒ String
[Required] A key or shallow reference to an object. For direct reference, it points to the actual scope object. For BOUND_ENTITY_SHAPE or BOUND_ENTITY_SHAPE_FIELD, it points to the source or target operator. For OCI_FUNCTION_INPUT_SHAPE or OCI_FUNCTION_OUTPUT_SHAPE, it points to the OCI Function object.
23 24 25 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 23 def reference_object @reference_object end |
#reference_type ⇒ String
The reference type for this reference. Set to null for a direct reference, for indirect references set to a type of association such as "BOUND_ENTITY_SHAPE". Current known reference type values are "BOUND_ENTITY_SHAPE", "BOUND_ENTITY_SHAPE_FIELD", "OCI_FUNCTION_INPUT_SHAPE", "OCI_FUNCTION_OUTPUT_SHAPE"
27 28 29 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 27 def reference_type @reference_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
34 35 36 37 38 39 40 41 42 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 34 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'reference_object': :'referenceObject', 'reference_type': :'referenceType', 'ref_object_name': :'refObjectName' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
45 46 47 48 49 50 51 52 53 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 45 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'reference_object': :'String', 'reference_type': :'String', 'ref_object_name': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
111 112 113 114 115 116 117 118 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 111 def ==(other) return true if equal?(other) self.class == other.class && reference_object == other.reference_object && reference_type == other.reference_type && ref_object_name == other.ref_object_name end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 143 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
123 124 125 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 123 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
132 133 134 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 132 def hash [reference_object, reference_type, ref_object_name].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
176 177 178 179 180 181 182 183 184 185 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 176 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
170 171 172 |
# File 'lib/oci/data_integration/models/scope_reference.rb', line 170 def to_s to_hash.to_s end |