# 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::DigitalTwins::Mgmt::V2020_10_31
  module Models
    #
    # Properties related to Digital Twins Endpoint
    #
    class DigitalTwinsEndpointResourceProperties

      include MsRestAzure

      @@discriminatorMap = Hash.new
      @@discriminatorMap["ServiceBus"] = "ServiceBus"
      @@discriminatorMap["EventHub"] = "EventHub"
      @@discriminatorMap["EventGrid"] = "EventGrid"

      def initialize
        @endpointType = "DigitalTwinsEndpointResourceProperties"
      end

      attr_accessor :endpointType

      # @return [EndpointProvisioningState] The provisioning state. Possible
      # values include: 'Provisioning', 'Deleting', 'Succeeded', 'Failed',
      # 'Canceled', 'Deleted', 'Warning', 'Suspending', 'Restoring', 'Moving',
      # 'Disabled'
      attr_accessor :provisioning_state

      # @return [DateTime] Time when the Endpoint was added to
      # DigitalTwinsInstance.
      attr_accessor :created_time

      # @return [String] Dead letter storage secret. Will be obfuscated during
      # read.
      attr_accessor :dead_letter_secret


      #
      # Mapper for DigitalTwinsEndpointResourceProperties class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'DigitalTwinsEndpointResourceProperties',
          type: {
            name: 'Composite',
            polymorphic_discriminator: 'endpointType',
            uber_parent: 'DigitalTwinsEndpointResourceProperties',
            class_name: 'DigitalTwinsEndpointResourceProperties',
            model_properties: {
              provisioning_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'provisioningState',
                type: {
                  name: 'String'
                }
              },
              created_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'createdTime',
                type: {
                  name: 'DateTime'
                }
              },
              dead_letter_secret: {
                client_side_validation: true,
                required: false,
                serialized_name: 'deadLetterSecret',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
