Class: MicrosoftGraph::Models::PolicyBase
- Inherits:
-
DirectoryObject
- Object
- Entity
- DirectoryObject
- MicrosoftGraph::Models::PolicyBase
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/policy_base.rb
Direct Known Subclasses
AppManagementPolicy, AuthorizationPolicy, CrossTenantAccessPolicy, IdentitySecurityDefaultsEnforcementPolicy, PermissionGrantPolicy, StsPolicy, TenantAppManagementPolicy
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
-
#description ⇒ Object
Gets the description property value.
-
#description=(value) ⇒ Object
Sets the description property value.
-
#display_name ⇒ Object
Gets the displayName property value.
-
#display_name=(value) ⇒ Object
Sets the displayName property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new policyBase and sets the default values.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from DirectoryObject
#deleted_date_time, #deleted_date_time=
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new policyBase and sets the default values.
19 20 21 22 |
# File 'lib/models/policy_base.rb', line 19 def initialize() super @odata_type = "#microsoft.graph.policyBase" end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/models/policy_base.rb', line 28 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? mapping_value_node = parse_node.get_child_node("@odata.type") unless mapping_value_node.nil? then mapping_value = mapping_value_node.get_string_value case mapping_value when "#microsoft.graph.activityBasedTimeoutPolicy" return ActivityBasedTimeoutPolicy.new when "#microsoft.graph.appManagementPolicy" return AppManagementPolicy.new when "#microsoft.graph.authorizationPolicy" return AuthorizationPolicy.new when "#microsoft.graph.claimsMappingPolicy" return ClaimsMappingPolicy.new when "#microsoft.graph.crossTenantAccessPolicy" return CrossTenantAccessPolicy.new when "#microsoft.graph.homeRealmDiscoveryPolicy" return HomeRealmDiscoveryPolicy.new when "#microsoft.graph.identitySecurityDefaultsEnforcementPolicy" return IdentitySecurityDefaultsEnforcementPolicy.new when "#microsoft.graph.permissionGrantPolicy" return PermissionGrantPolicy.new when "#microsoft.graph.stsPolicy" return StsPolicy.new when "#microsoft.graph.tenantAppManagementPolicy" return TenantAppManagementPolicy.new when "#microsoft.graph.tokenIssuancePolicy" return TokenIssuancePolicy.new when "#microsoft.graph.tokenLifetimePolicy" return TokenLifetimePolicy.new end end return PolicyBase.new end |
Instance Method Details
#description ⇒ Object
Gets the description property value. Description for this policy. Required.
66 67 68 |
# File 'lib/models/policy_base.rb', line 66 def description return @description end |
#description=(value) ⇒ Object
Sets the description property value. Description for this policy. Required.
74 75 76 |
# File 'lib/models/policy_base.rb', line 74 def description=(value) @description = value end |
#display_name ⇒ Object
Gets the displayName property value. Display name for this policy. Required.
81 82 83 |
# File 'lib/models/policy_base.rb', line 81 def display_name return @display_name end |
#display_name=(value) ⇒ Object
Sets the displayName property value. Display name for this policy. Required.
89 90 91 |
# File 'lib/models/policy_base.rb', line 89 def display_name=(value) @display_name = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
96 97 98 99 100 101 |
# File 'lib/models/policy_base.rb', line 96 def get_field_deserializers() return super.merge({ "description" => lambda {|n| @description = n.get_string_value() }, "displayName" => lambda {|n| @display_name = n.get_string_value() }, }) end |
#serialize(writer) ⇒ Object
Serializes information the current object
107 108 109 110 111 112 |
# File 'lib/models/policy_base.rb', line 107 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_string_value("description", @description) writer.write_string_value("displayName", @display_name) end |