# 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::StorageCache::Mgmt::V2020_10_01
  module Models
    #
    # A set of rules describing access policies applied to NFSv3 clients of the
    # cache.
    #
    class NfsAccessPolicy

      include MsRestAzure

      # @return [String] Name identifying this policy. Access Policy names are
      # not case sensitive.
      attr_accessor :name

      # @return [Array<NfsAccessRule>] The set of rules describing client
      # accesses allowed under this policy.
      attr_accessor :access_rules


      #
      # Mapper for NfsAccessPolicy class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'NfsAccessPolicy',
          type: {
            name: 'Composite',
            class_name: 'NfsAccessPolicy',
            model_properties: {
              name: {
                client_side_validation: true,
                required: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              access_rules: {
                client_side_validation: true,
                required: true,
                serialized_name: 'accessRules',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'NfsAccessRuleElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'NfsAccessRule'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
