# 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::ContainerRegistry::Mgmt::V2019_05_01
  module Models
    #
    # The retention policy for a container registry.
    #
    class RetentionPolicy

      include MsRestAzure

      # @return [Integer] The number of days to retain an untagged manifest
      # after which it gets purged. Default value: 7 .
      attr_accessor :days

      # @return [DateTime] The timestamp when the policy was last updated.
      attr_accessor :last_updated_time

      # @return [PolicyStatus] The value that indicates whether the policy is
      # enabled or not. Possible values include: 'enabled', 'disabled'. Default
      # value: 'disabled' .
      attr_accessor :status


      #
      # Mapper for RetentionPolicy class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'RetentionPolicy',
          type: {
            name: 'Composite',
            class_name: 'RetentionPolicy',
            model_properties: {
              days: {
                client_side_validation: true,
                required: false,
                serialized_name: 'days',
                default_value: 7,
                type: {
                  name: 'Number'
                }
              },
              last_updated_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'lastUpdatedTime',
                type: {
                  name: 'DateTime'
                }
              },
              status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'status',
                default_value: 'disabled',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
