Class: MicrosoftGraph::Models::ChatMessagePolicyViolation

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new chatMessagePolicyViolation and sets the default values.



49
50
51
# File 'lib/models/chat_message_policy_violation.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 chat_message_policy_violation

Raises:

  • (StandardError)


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

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return ChatMessagePolicyViolation.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/chat_message_policy_violation.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/chat_message_policy_violation.rb', line 42

def additional_data=(value)
    @additional_data = value
end

#dlp_actionObject

Gets the dlpAction property value. The action taken by the DLP provider on the message with sensitive content. Supported values are: NoneNotifySender – Inform the sender of the violation but allow readers to read the message.BlockAccess – Block readers from reading the message.BlockAccessExternal – Block users outside the organization from reading the message, while allowing users within the organization to read the message.

Returns:

  • a chat_message_policy_violation_dlp_action_types



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

def dlp_action
    return @dlp_action
end

#dlp_action=(value) ⇒ Object

Sets the dlpAction property value. The action taken by the DLP provider on the message with sensitive content. Supported values are: NoneNotifySender – Inform the sender of the violation but allow readers to read the message.BlockAccess – Block readers from reading the message.BlockAccessExternal – Block users outside the organization from reading the message, while allowing users within the organization to read the message.

Parameters:

  • value

    Value to set for the dlpAction property.

Returns:

  • a void



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

def dlp_action=(value)
    @dlp_action = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



80
81
82
83
84
85
86
87
88
89
# File 'lib/models/chat_message_policy_violation.rb', line 80

def get_field_deserializers()
    return {
        "dlpAction" => lambda {|n| @dlp_action = n.get_enum_value(MicrosoftGraph::Models::ChatMessagePolicyViolationDlpActionTypes) },
        "justificationText" => lambda {|n| @justification_text = n.get_string_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "policyTip" => lambda {|n| @policy_tip = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::ChatMessagePolicyViolationPolicyTip.create_from_discriminator_value(pn) }) },
        "userAction" => lambda {|n| @user_action = n.get_enum_value(MicrosoftGraph::Models::ChatMessagePolicyViolationUserActionTypes) },
        "verdictDetails" => lambda {|n| @verdict_details = n.get_enum_value(MicrosoftGraph::Models::ChatMessagePolicyViolationVerdictDetailsTypes) },
    }
end

#justification_textObject

Gets the justificationText property value. Justification text provided by the sender of the message when overriding a policy violation.

Returns:

  • a string



94
95
96
# File 'lib/models/chat_message_policy_violation.rb', line 94

def justification_text
    return @justification_text
end

#justification_text=(value) ⇒ Object

Sets the justificationText property value. Justification text provided by the sender of the message when overriding a policy violation.

Parameters:

  • value

    Value to set for the justificationText property.

Returns:

  • a void



102
103
104
# File 'lib/models/chat_message_policy_violation.rb', line 102

def justification_text=(value)
    @justification_text = value
end

#odata_typeObject

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

Returns:

  • a string



109
110
111
# File 'lib/models/chat_message_policy_violation.rb', line 109

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



117
118
119
# File 'lib/models/chat_message_policy_violation.rb', line 117

def odata_type=(value)
    @odata_type = value
end

#policy_tipObject

Gets the policyTip property value. Information to display to the message sender about why the message was flagged as a violation.

Returns:

  • a chat_message_policy_violation_policy_tip



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

def policy_tip
    return @policy_tip
end

#policy_tip=(value) ⇒ Object

Sets the policyTip property value. Information to display to the message sender about why the message was flagged as a violation.

Parameters:

  • value

    Value to set for the policyTip property.

Returns:

  • a void



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

def policy_tip=(value)
    @policy_tip = 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)


140
141
142
143
144
145
146
147
148
149
# File 'lib/models/chat_message_policy_violation.rb', line 140

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_enum_value("dlpAction", @dlp_action)
    writer.write_string_value("justificationText", @justification_text)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_object_value("policyTip", @policy_tip)
    writer.write_enum_value("userAction", @user_action)
    writer.write_enum_value("verdictDetails", @verdict_details)
    writer.write_additional_data(@additional_data)
end

#user_actionObject

Gets the userAction property value. Indicates the action taken by the user on a message blocked by the DLP provider. Supported values are: NoneOverrideReportFalsePositiveWhen the DLP provider is updating the message for blocking sensitive content, userAction is not required.

Returns:

  • a chat_message_policy_violation_user_action_types



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

def user_action
    return @user_action
end

#user_action=(value) ⇒ Object

Sets the userAction property value. Indicates the action taken by the user on a message blocked by the DLP provider. Supported values are: NoneOverrideReportFalsePositiveWhen the DLP provider is updating the message for blocking sensitive content, userAction is not required.

Parameters:

  • value

    Value to set for the userAction property.

Returns:

  • a void



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

def user_action=(value)
    @user_action = value
end

#verdict_detailsObject

Gets the verdictDetails property value. Indicates what actions the sender may take in response to the policy violation. Supported values are: NoneAllowFalsePositiveOverride – Allows the sender to declare the policyViolation to be an error in the DLP app and its rules, and allow readers to see the message again if the dlpAction had hidden it.AllowOverrideWithoutJustification – Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, without needing to provide an explanation for doing so. AllowOverrideWithJustification – Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, after providing an explanation for doing so.AllowOverrideWithoutJustification and AllowOverrideWithJustification are mutually exclusive.

Returns:

  • a chat_message_policy_violation_verdict_details_types



169
170
171
# File 'lib/models/chat_message_policy_violation.rb', line 169

def verdict_details
    return @verdict_details
end

#verdict_details=(value) ⇒ Object

Sets the verdictDetails property value. Indicates what actions the sender may take in response to the policy violation. Supported values are: NoneAllowFalsePositiveOverride – Allows the sender to declare the policyViolation to be an error in the DLP app and its rules, and allow readers to see the message again if the dlpAction had hidden it.AllowOverrideWithoutJustification – Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, without needing to provide an explanation for doing so. AllowOverrideWithJustification – Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, after providing an explanation for doing so.AllowOverrideWithoutJustification and AllowOverrideWithJustification are mutually exclusive.

Parameters:

  • value

    Value to set for the verdictDetails property.

Returns:

  • a void



177
178
179
# File 'lib/models/chat_message_policy_violation.rb', line 177

def verdict_details=(value)
    @verdict_details = value
end