Class: MicrosoftGraph::Models::AppliedConditionalAccessPolicy

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/applied_conditional_access_policy.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new appliedConditionalAccessPolicy and sets the default values.



49
50
51
# File 'lib/models/applied_conditional_access_policy.rb', line 49

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a applied_conditional_access_policy

Raises:

  • (StandardError)


57
58
59
60
# File 'lib/models/applied_conditional_access_policy.rb', line 57

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return AppliedConditionalAccessPolicy.new
end

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



34
35
36
# File 'lib/models/applied_conditional_access_policy.rb', line 34

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



42
43
44
# File 'lib/models/applied_conditional_access_policy.rb', line 42

def additional_data=(value)
    @additional_data = value
end

#display_nameObject

Gets the displayName property value. Refers to the Name of the conditional access policy (example: ‘Require MFA for Salesforce’).

Returns:

  • a string



65
66
67
# File 'lib/models/applied_conditional_access_policy.rb', line 65

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. Refers to the Name of the conditional access policy (example: ‘Require MFA for Salesforce’).

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



73
74
75
# File 'lib/models/applied_conditional_access_policy.rb', line 73

def display_name=(value)
    @display_name = value
end

#enforced_grant_controlsObject

Gets the enforcedGrantControls property value. Refers to the grant controls enforced by the conditional access policy (example: ‘Require multi-factor authentication’).

Returns:

  • a string



80
81
82
# File 'lib/models/applied_conditional_access_policy.rb', line 80

def enforced_grant_controls
    return @enforced_grant_controls
end

#enforced_grant_controls=(value) ⇒ Object

Sets the enforcedGrantControls property value. Refers to the grant controls enforced by the conditional access policy (example: ‘Require multi-factor authentication’).

Parameters:

  • value

    Value to set for the enforcedGrantControls property.

Returns:

  • a void



88
89
90
# File 'lib/models/applied_conditional_access_policy.rb', line 88

def enforced_grant_controls=(value)
    @enforced_grant_controls = value
end

#enforced_session_controlsObject

Gets the enforcedSessionControls property value. Refers to the session controls enforced by the conditional access policy (example: ‘Require app enforced controls’).

Returns:

  • a string



95
96
97
# File 'lib/models/applied_conditional_access_policy.rb', line 95

def enforced_session_controls
    return @enforced_session_controls
end

#enforced_session_controls=(value) ⇒ Object

Sets the enforcedSessionControls property value. Refers to the session controls enforced by the conditional access policy (example: ‘Require app enforced controls’).

Parameters:

  • value

    Value to set for the enforcedSessionControls property.

Returns:

  • a void



103
104
105
# File 'lib/models/applied_conditional_access_policy.rb', line 103

def enforced_session_controls=(value)
    @enforced_session_controls = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



110
111
112
113
114
115
116
117
118
119
# File 'lib/models/applied_conditional_access_policy.rb', line 110

def get_field_deserializers()
    return {
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "enforcedGrantControls" => lambda {|n| @enforced_grant_controls = n.get_collection_of_primitive_values(String) },
        "enforcedSessionControls" => lambda {|n| @enforced_session_controls = n.get_collection_of_primitive_values(String) },
        "id" => lambda {|n| @id = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "result" => lambda {|n| @result = n.get_enum_value(MicrosoftGraph::Models::AppliedConditionalAccessPolicyResult) },
    }
end

#idObject

Gets the id property value. An identifier of the conditional access policy.

Returns:

  • a string



124
125
126
# File 'lib/models/applied_conditional_access_policy.rb', line 124

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. An identifier of the conditional access policy.

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



132
133
134
# File 'lib/models/applied_conditional_access_policy.rb', line 132

def id=(value)
    @id = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



139
140
141
# File 'lib/models/applied_conditional_access_policy.rb', line 139

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



147
148
149
# File 'lib/models/applied_conditional_access_policy.rb', line 147

def odata_type=(value)
    @odata_type = value
end

#resultObject

Gets the result property value. Indicates the result of the CA policy that was triggered. Possible values are: success, failure, notApplied (Policy isn’t applied because policy conditions were not met),notEnabled (This is due to the policy in disabled state), unknown, unknownFutureValue.

Returns:

  • a applied_conditional_access_policy_result



154
155
156
# File 'lib/models/applied_conditional_access_policy.rb', line 154

def result
    return @result
end

#result=(value) ⇒ Object

Sets the result property value. Indicates the result of the CA policy that was triggered. Possible values are: success, failure, notApplied (Policy isn’t applied because policy conditions were not met),notEnabled (This is due to the policy in disabled state), unknown, unknownFutureValue.

Parameters:

  • value

    Value to set for the result property.

Returns:

  • a void



162
163
164
# File 'lib/models/applied_conditional_access_policy.rb', line 162

def result=(value)
    @result = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


170
171
172
173
174
175
176
177
178
179
# File 'lib/models/applied_conditional_access_policy.rb', line 170

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("displayName", @display_name)
    writer.write_collection_of_primitive_values("enforcedGrantControls", @enforced_grant_controls)
    writer.write_collection_of_primitive_values("enforcedSessionControls", @enforced_session_controls)
    writer.write_string_value("id", @id)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_enum_value("result", @result)
    writer.write_additional_data(@additional_data)
end