# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::EventGrid::Mgmt::V2020_10_15_preview
  module Models
    #
    # Information about the deadletter destination with resource identity.
    #
    class DeadLetterWithResourceIdentity

      include MsRestAzure

      # @return [EventSubscriptionIdentity] The identity to use when
      # dead-lettering events.
      attr_accessor :identity

      # @return [DeadLetterDestination] Information about the destination where
      # events have to be delivered for the event subscription.
      # Uses the managed identity setup on the parent resource (namely, topic
      # or domain) to acquire the authentication tokens being used during
      # delivery / dead-lettering.
      attr_accessor :dead_letter_destination


      #
      # Mapper for DeadLetterWithResourceIdentity class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DeadLetterWithResourceIdentity',
          type: {
            name: 'Composite',
            class_name: 'DeadLetterWithResourceIdentity',
            model_properties: {
              identity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'identity',
                type: {
                  name: 'Composite',
                  class_name: 'EventSubscriptionIdentity'
                }
              },
              dead_letter_destination: {
                client_side_validation: true,
                required: false,
                serialized_name: 'deadLetterDestination',
                type: {
                  name: 'Composite',
                  polymorphic_discriminator: 'endpointType',
                  uber_parent: 'DeadLetterDestination',
                  class_name: 'DeadLetterDestination'
                }
              }
            }
          }
        }
      end
    end
  end
end
