class Azure::Monitor::Mgmt::V2016_03_01::Models::RetentionPolicy

Specifies the retention policy for the log.

Attributes

days[RW]

@return [Integer] the number of days for the retention in days. A value of 0 will retain the events indefinitely.

enabled[RW]

@return [Boolean] a value indicating whether the retention policy is enabled.

Public Class Methods

mapper() click to toggle source

Mapper for RetentionPolicy class as Ruby Hash. This will be used for serialization/deserialization.

# File lib/2016-03-01/generated/azure_mgmt_monitor/models/retention_policy.rb, line 28
def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'RetentionPolicy',
    type: {
      name: 'Composite',
      class_name: 'RetentionPolicy',
      model_properties: {
        enabled: {
          client_side_validation: true,
          required: true,
          serialized_name: 'enabled',
          type: {
            name: 'Boolean'
          }
        },
        days: {
          client_side_validation: true,
          required: true,
          serialized_name: 'days',
          constraints: {
            InclusiveMinimum: 0
          },
          type: {
            name: 'Number'
          }
        }
      }
    }
  }
end