Class: MicrosoftGraph::Models::TermStoreRelation
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/term_store_relation.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#from_term ⇒ Object
Gets the fromTerm property value.
-
#from_term=(value) ⇒ Object
Sets the fromTerm property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new termStoreRelation and sets the default values.
-
#relationship ⇒ Object
Gets the relationship property value.
-
#relationship=(value) ⇒ Object
Sets the relationship property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#set ⇒ Object
Gets the set property value.
-
#set=(value) ⇒ Object
Sets the set property value.
-
#to_term ⇒ Object
Gets the toTerm property value.
-
#to_term=(value) ⇒ Object
Sets the toTerm property value.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new termStoreRelation and sets the default values.
25 26 27 |
# File 'lib/models/term_store_relation.rb', line 25 def initialize() super end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
33 34 35 36 |
# File 'lib/models/term_store_relation.rb', line 33 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return TermStoreRelation.new end |
Instance Method Details
#from_term ⇒ Object
Gets the fromTerm property value. The from [term] of the relation. The term from which the relationship is defined. A null value would indicate the relation is directly with the [set].
41 42 43 |
# File 'lib/models/term_store_relation.rb', line 41 def from_term return @from_term end |
#from_term=(value) ⇒ Object
Sets the fromTerm property value. The from [term] of the relation. The term from which the relationship is defined. A null value would indicate the relation is directly with the [set].
49 50 51 |
# File 'lib/models/term_store_relation.rb', line 49 def from_term=(value) @from_term = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
56 57 58 59 60 61 62 63 |
# File 'lib/models/term_store_relation.rb', line 56 def get_field_deserializers() return super.merge({ "fromTerm" => lambda {|n| @from_term = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TermStoreTerm.create_from_discriminator_value(pn) }) }, "relationship" => lambda {|n| @relationship = n.get_enum_value(MicrosoftGraph::Models::TermStoreRelationType) }, "set" => lambda {|n| @set = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TermStoreSet.create_from_discriminator_value(pn) }) }, "toTerm" => lambda {|n| @to_term = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::TermStoreTerm.create_from_discriminator_value(pn) }) }, }) end |
#relationship ⇒ Object
Gets the relationship property value. The type of relation. Possible values are: pin, reuse.
68 69 70 |
# File 'lib/models/term_store_relation.rb', line 68 def relationship return @relationship end |
#relationship=(value) ⇒ Object
Sets the relationship property value. The type of relation. Possible values are: pin, reuse.
76 77 78 |
# File 'lib/models/term_store_relation.rb', line 76 def relationship=(value) @relationship = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
84 85 86 87 88 89 90 91 |
# File 'lib/models/term_store_relation.rb', line 84 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("fromTerm", @from_term) writer.write_enum_value("relationship", @relationship) writer.write_object_value("set", @set) writer.write_object_value("toTerm", @to_term) end |
#set ⇒ Object
Gets the set property value. The [set] in which the relation is relevant.
96 97 98 |
# File 'lib/models/term_store_relation.rb', line 96 def set return @set end |
#set=(value) ⇒ Object
Sets the set property value. The [set] in which the relation is relevant.
104 105 106 |
# File 'lib/models/term_store_relation.rb', line 104 def set=(value) @set = value end |
#to_term ⇒ Object
Gets the toTerm property value. The to [term] of the relation. The term to which the relationship is defined.
111 112 113 |
# File 'lib/models/term_store_relation.rb', line 111 def to_term return @to_term end |
#to_term=(value) ⇒ Object
Sets the toTerm property value. The to [term] of the relation. The term to which the relationship is defined.
119 120 121 |
# File 'lib/models/term_store_relation.rb', line 119 def to_term=(value) @to_term = value end |