azure_mgmt_locks 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,56 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Locks
7
+ module Models
8
+ #
9
+ # Deployment filter.
10
+ #
11
+ class DeploymentExtendedFilter
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the provisioning state.
16
+ attr_accessor :provisioning_state
17
+
18
+ #
19
+ # Validate the object. Throws ValidationError if validation fails.
20
+ #
21
+ def validate
22
+ # Nothing to validate
23
+ end
24
+
25
+ #
26
+ # Serializes given Model object into Ruby Hash.
27
+ # @param object Model object to serialize.
28
+ # @return [Hash] Serialized object in form of Ruby Hash.
29
+ #
30
+ def self.serialize_object(object)
31
+ object.validate
32
+ output_object = {}
33
+
34
+ serialized_property = object.provisioning_state
35
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
36
+
37
+ output_object
38
+ end
39
+
40
+ #
41
+ # Deserializes given Ruby Hash into Model object.
42
+ # @param object [Hash] Ruby Hash object to deserialize.
43
+ # @return [DeploymentExtendedFilter] Deserialized object.
44
+ #
45
+ def self.deserialize_object(object)
46
+ return if object.nil?
47
+ output_object = DeploymentExtendedFilter.new
48
+
49
+ deserialized_property = object['provisioningState']
50
+ output_object.provisioning_state = deserialized_property
51
+
52
+ output_object
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,74 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Locks
7
+ module Models
8
+ #
9
+ # Resource filter.
10
+ #
11
+ class GenericResourceFilter
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the resource type.
16
+ attr_accessor :resource_type
17
+
18
+ # @return [String] Gets or sets the tag name.
19
+ attr_accessor :tagname
20
+
21
+ # @return [String] Gets or sets the tag value.
22
+ attr_accessor :tagvalue
23
+
24
+ #
25
+ # Validate the object. Throws ValidationError if validation fails.
26
+ #
27
+ def validate
28
+ # Nothing to validate
29
+ end
30
+
31
+ #
32
+ # Serializes given Model object into Ruby Hash.
33
+ # @param object Model object to serialize.
34
+ # @return [Hash] Serialized object in form of Ruby Hash.
35
+ #
36
+ def self.serialize_object(object)
37
+ object.validate
38
+ output_object = {}
39
+
40
+ serialized_property = object.resource_type
41
+ output_object['resourceType'] = serialized_property unless serialized_property.nil?
42
+
43
+ serialized_property = object.tagname
44
+ output_object['tagname'] = serialized_property unless serialized_property.nil?
45
+
46
+ serialized_property = object.tagvalue
47
+ output_object['tagvalue'] = serialized_property unless serialized_property.nil?
48
+
49
+ output_object
50
+ end
51
+
52
+ #
53
+ # Deserializes given Ruby Hash into Model object.
54
+ # @param object [Hash] Ruby Hash object to deserialize.
55
+ # @return [GenericResourceFilter] Deserialized object.
56
+ #
57
+ def self.deserialize_object(object)
58
+ return if object.nil?
59
+ output_object = GenericResourceFilter.new
60
+
61
+ deserialized_property = object['resourceType']
62
+ output_object.resource_type = deserialized_property
63
+
64
+ deserialized_property = object['tagname']
65
+ output_object.tagname = deserialized_property
66
+
67
+ deserialized_property = object['tagvalue']
68
+ output_object.tagvalue = deserialized_property
69
+
70
+ output_object
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,17 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Locks
7
+ module Models
8
+ #
9
+ # Defines values for LockLevel
10
+ #
11
+ module LockLevel
12
+ NotSpecified = "NotSpecified"
13
+ CanNotDelete = "CanNotDelete"
14
+ ReadOnly = "ReadOnly"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,85 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Locks
7
+ module Models
8
+ #
9
+ # List of management locks.
10
+ #
11
+ class ManagementLockListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<ManagementLockObject>] Gets or sets the list of locks.
16
+ attr_accessor :value
17
+
18
+ # @return [String] Gets or sets the URL to get the next set of results.
19
+ attr_accessor :next_link
20
+
21
+ #
22
+ # Validate the object. Throws ValidationError if validation fails.
23
+ #
24
+ def validate
25
+ @value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
26
+ end
27
+
28
+ #
29
+ # Serializes given Model object into Ruby Hash.
30
+ # @param object Model object to serialize.
31
+ # @return [Hash] Serialized object in form of Ruby Hash.
32
+ #
33
+ def self.serialize_object(object)
34
+ object.validate
35
+ output_object = {}
36
+
37
+ serialized_property = object.value
38
+ unless serialized_property.nil?
39
+ serializedArray = []
40
+ serialized_property.each do |element|
41
+ unless element.nil?
42
+ element = ManagementLockObject.serialize_object(element)
43
+ end
44
+ serializedArray.push(element)
45
+ end
46
+ serialized_property = serializedArray
47
+ end
48
+ output_object['value'] = serialized_property unless serialized_property.nil?
49
+
50
+ serialized_property = object.next_link
51
+ output_object['nextLink'] = serialized_property unless serialized_property.nil?
52
+
53
+ output_object
54
+ end
55
+
56
+ #
57
+ # Deserializes given Ruby Hash into Model object.
58
+ # @param object [Hash] Ruby Hash object to deserialize.
59
+ # @return [ManagementLockListResult] Deserialized object.
60
+ #
61
+ def self.deserialize_object(object)
62
+ return if object.nil?
63
+ output_object = ManagementLockListResult.new
64
+
65
+ deserialized_property = object['value']
66
+ unless deserialized_property.nil?
67
+ deserialized_array = []
68
+ deserialized_property.each do |element1|
69
+ unless element1.nil?
70
+ element1 = ManagementLockObject.deserialize_object(element1)
71
+ end
72
+ deserialized_array.push(element1)
73
+ end
74
+ deserialized_property = deserialized_array
75
+ end
76
+ output_object.value = deserialized_property
77
+
78
+ deserialized_property = object['nextLink']
79
+ output_object.next_link = deserialized_property
80
+
81
+ output_object
82
+ end
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,90 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Locks
7
+ module Models
8
+ #
9
+ # Management lock information.
10
+ #
11
+ class ManagementLockObject
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [ManagementLockProperties] Gets or sets the properties of the
16
+ # lock.
17
+ attr_accessor :properties
18
+
19
+ # @return [String] Gets or sets the Id of the lock.
20
+ attr_accessor :id
21
+
22
+ # @return [String] Gets or sets the type of the lock.
23
+ attr_accessor :type
24
+
25
+ # @return [String] Gets or sets the name of the lock.
26
+ attr_accessor :name
27
+
28
+ #
29
+ # Validate the object. Throws ValidationError if validation fails.
30
+ #
31
+ def validate
32
+ @properties.validate unless @properties.nil?
33
+ end
34
+
35
+ #
36
+ # Serializes given Model object into Ruby Hash.
37
+ # @param object Model object to serialize.
38
+ # @return [Hash] Serialized object in form of Ruby Hash.
39
+ #
40
+ def self.serialize_object(object)
41
+ object.validate
42
+ output_object = {}
43
+
44
+ serialized_property = object.properties
45
+ unless serialized_property.nil?
46
+ serialized_property = ManagementLockProperties.serialize_object(serialized_property)
47
+ end
48
+ output_object['properties'] = serialized_property unless serialized_property.nil?
49
+
50
+ serialized_property = object.id
51
+ output_object['id'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.type
54
+ output_object['type'] = serialized_property unless serialized_property.nil?
55
+
56
+ serialized_property = object.name
57
+ output_object['name'] = serialized_property unless serialized_property.nil?
58
+
59
+ output_object
60
+ end
61
+
62
+ #
63
+ # Deserializes given Ruby Hash into Model object.
64
+ # @param object [Hash] Ruby Hash object to deserialize.
65
+ # @return [ManagementLockObject] Deserialized object.
66
+ #
67
+ def self.deserialize_object(object)
68
+ return if object.nil?
69
+ output_object = ManagementLockObject.new
70
+
71
+ deserialized_property = object['properties']
72
+ unless deserialized_property.nil?
73
+ deserialized_property = ManagementLockProperties.deserialize_object(deserialized_property)
74
+ end
75
+ output_object.properties = deserialized_property
76
+
77
+ deserialized_property = object['id']
78
+ output_object.id = deserialized_property
79
+
80
+ deserialized_property = object['type']
81
+ output_object.type = deserialized_property
82
+
83
+ deserialized_property = object['name']
84
+ output_object.name = deserialized_property
85
+
86
+ output_object
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,70 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Locks
7
+ module Models
8
+ #
9
+ # The management lock properties.
10
+ #
11
+ class ManagementLockProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [LockLevel] Gets or sets the lock level of the management
16
+ # lock. Possible values include: 'NotSpecified', 'CanNotDelete',
17
+ # 'ReadOnly'
18
+ attr_accessor :level
19
+
20
+ # @return [String] Gets or sets the notes of the management lock.
21
+ attr_accessor :notes
22
+
23
+ #
24
+ # Validate the object. Throws ValidationError if validation fails.
25
+ #
26
+ def validate
27
+ end
28
+
29
+ #
30
+ # Serializes given Model object into Ruby Hash.
31
+ # @param object Model object to serialize.
32
+ # @return [Hash] Serialized object in form of Ruby Hash.
33
+ #
34
+ def self.serialize_object(object)
35
+ object.validate
36
+ output_object = {}
37
+
38
+ serialized_property = object.level
39
+ output_object['level'] = serialized_property unless serialized_property.nil?
40
+
41
+ serialized_property = object.notes
42
+ output_object['notes'] = serialized_property unless serialized_property.nil?
43
+
44
+ output_object
45
+ end
46
+
47
+ #
48
+ # Deserializes given Ruby Hash into Model object.
49
+ # @param object [Hash] Ruby Hash object to deserialize.
50
+ # @return [ManagementLockProperties] Deserialized object.
51
+ #
52
+ def self.deserialize_object(object)
53
+ return if object.nil?
54
+ output_object = ManagementLockProperties.new
55
+
56
+ deserialized_property = object['level']
57
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
58
+ enum_is_valid = LockLevel.constants.any? { |e| LockLevel.const_get(e).to_s.downcase == deserialized_property.downcase }
59
+ warn 'Enum LockLevel does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
60
+ end
61
+ output_object.level = deserialized_property
62
+
63
+ deserialized_property = object['notes']
64
+ output_object.notes = deserialized_property
65
+
66
+ output_object
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,65 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Locks
7
+ module Models
8
+ #
9
+ # Resource group filter.
10
+ #
11
+ class ResourceGroupFilter
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the tag name.
16
+ attr_accessor :tag_name
17
+
18
+ # @return [String] Gets or sets the tag value.
19
+ attr_accessor :tag_value
20
+
21
+ #
22
+ # Validate the object. Throws ValidationError if validation fails.
23
+ #
24
+ def validate
25
+ # Nothing to validate
26
+ end
27
+
28
+ #
29
+ # Serializes given Model object into Ruby Hash.
30
+ # @param object Model object to serialize.
31
+ # @return [Hash] Serialized object in form of Ruby Hash.
32
+ #
33
+ def self.serialize_object(object)
34
+ object.validate
35
+ output_object = {}
36
+
37
+ serialized_property = object.tag_name
38
+ output_object['tagName'] = serialized_property unless serialized_property.nil?
39
+
40
+ serialized_property = object.tag_value
41
+ output_object['tagValue'] = serialized_property unless serialized_property.nil?
42
+
43
+ output_object
44
+ end
45
+
46
+ #
47
+ # Deserializes given Ruby Hash into Model object.
48
+ # @param object [Hash] Ruby Hash object to deserialize.
49
+ # @return [ResourceGroupFilter] Deserialized object.
50
+ #
51
+ def self.deserialize_object(object)
52
+ return if object.nil?
53
+ output_object = ResourceGroupFilter.new
54
+
55
+ deserialized_property = object['tagName']
56
+ output_object.tag_name = deserialized_property
57
+
58
+ deserialized_property = object['tagValue']
59
+ output_object.tag_value = deserialized_property
60
+
61
+ output_object
62
+ end
63
+ end
64
+ end
65
+ end