Class: Azure::Storage::Mgmt::V2019_04_01::Models::ManagementPolicyRule

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2019-04-01/generated/azure_mgmt_storage/models/management_policy_rule.rb

Overview

An object that wraps the Lifecycle rule. Each rule is uniquely defined by name.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#definitionManagementPolicyDefinition

Lifecycle rule.

Returns:



30
31
32
# File 'lib/2019-04-01/generated/azure_mgmt_storage/models/management_policy_rule.rb', line 30

def definition
  @definition
end

#enabledBoolean

Returns Rule is enabled if set to true.

Returns:

  • (Boolean)

    Rule is enabled if set to true.



17
18
19
# File 'lib/2019-04-01/generated/azure_mgmt_storage/models/management_policy_rule.rb', line 17

def enabled
  @enabled
end

#nameString

numeric characters. Rule name is case-sensitive. It must be unique within a policy.

Returns:

  • (String)

    A rule name can contain any combination of alpha



22
23
24
# File 'lib/2019-04-01/generated/azure_mgmt_storage/models/management_policy_rule.rb', line 22

def name
  @name
end

#typeString

‘Lifecycle’ .

Returns:

  • (String)

    The valid value is Lifecycle. Default value:



26
27
28
# File 'lib/2019-04-01/generated/azure_mgmt_storage/models/management_policy_rule.rb', line 26

def type
  @type
end

Class Method Details

.mapperObject

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



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/2019-04-01/generated/azure_mgmt_storage/models/management_policy_rule.rb', line 37

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'ManagementPolicyRule',
    type: {
      name: 'Composite',
      class_name: 'ManagementPolicyRule',
      model_properties: {
        enabled: {
          client_side_validation: true,
          required: false,
          serialized_name: 'enabled',
          type: {
            name: 'Boolean'
          }
        },
        name: {
          client_side_validation: true,
          required: true,
          serialized_name: 'name',
          type: {
            name: 'String'
          }
        },
        type: {
          client_side_validation: true,
          required: true,
          is_constant: true,
          serialized_name: 'type',
          default_value: 'Lifecycle',
          type: {
            name: 'String'
          }
        },
        definition: {
          client_side_validation: true,
          required: true,
          serialized_name: 'definition',
          type: {
            name: 'Composite',
            class_name: 'ManagementPolicyDefinition'
          }
        }
      }
    }
  }
end