# 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::ResourceGraph::Mgmt::V2019_04_01
  module Models
    #
    # A facet whose execution resulted in an error.
    #
    class FacetError < Facet

      include MsRestAzure


      def initialize
        @resultType = "FacetError"
      end

      attr_accessor :resultType

      # @return [Array<ErrorDetails>] An array containing detected facet errors
      # with details.
      attr_accessor :errors


      #
      # Mapper for FacetError class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'FacetError',
          type: {
            name: 'Composite',
            class_name: 'FacetError',
            model_properties: {
              expression: {
                client_side_validation: true,
                required: true,
                serialized_name: 'expression',
                type: {
                  name: 'String'
                }
              },
              resultType: {
                client_side_validation: true,
                required: true,
                serialized_name: 'resultType',
                type: {
                  name: 'String'
                }
              },
              errors: {
                client_side_validation: true,
                required: true,
                serialized_name: 'errors',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ErrorDetailsElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ErrorDetails'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
