# 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::Support::Mgmt::V2020_04_01
  module Models
    #
    # Object that represents a Communication resource.
    #
    class CommunicationDetails

      include MsRestAzure

      # @return [String] Id of the resource.
      attr_accessor :id

      # @return [String] Name of the resource.
      attr_accessor :name

      # @return [String] Type of the resource
      # 'Microsoft.Support/communications'.
      attr_accessor :type

      # @return [CommunicationType] Communication type. Possible values
      # include: 'web', 'phone'
      attr_accessor :communication_type

      # @return [CommunicationDirection] Direction of communication. Possible
      # values include: 'inbound', 'outbound'
      attr_accessor :communication_direction

      # @return [String] Email address of the sender. This property is required
      # if called by a service principal.
      attr_accessor :sender

      # @return [String] Subject of the communication.
      attr_accessor :subject

      # @return [String] Body of the communication.
      attr_accessor :body

      # @return [DateTime] Time in UTC (ISO 8601 format) when the communication
      # was created.
      attr_accessor :created_date


      #
      # Mapper for CommunicationDetails class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CommunicationDetails',
          type: {
            name: 'Composite',
            class_name: 'CommunicationDetails',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              communication_type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.communicationType',
                type: {
                  name: 'String'
                }
              },
              communication_direction: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.communicationDirection',
                type: {
                  name: 'String'
                }
              },
              sender: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.sender',
                type: {
                  name: 'String'
                }
              },
              subject: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.subject',
                type: {
                  name: 'String'
                }
              },
              body: {
                client_side_validation: true,
                required: true,
                serialized_name: 'properties.body',
                type: {
                  name: 'String'
                }
              },
              created_date: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.createdDate',
                type: {
                  name: 'DateTime'
                }
              }
            }
          }
        }
      end
    end
  end
end
