azure_mgmt_subscriptions 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7aa033e3e6f5d98c58b0d88c54ab5809f5064cc6
4
+ data.tar.gz: 28f7a39885a43745ea8cc31c75d206050ece4a5f
5
+ SHA512:
6
+ metadata.gz: 7f07d3510376a55d7107f896fc53de16c5a6bb53cecb7778f373aa42ab3aff1b1b97347ef0ef9c9f98ef1ccac163eee64f9b3c9f20e9ae5492717325802bf4b3
7
+ data.tar.gz: 30d366e5429174753c5517aaf409a1097f44267b9c7a560e632dbc2a099a8f7aac278001c8403207ecb691dedb422d4e9f31b1ed5135dd7ea487da5b6e11f7b9
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --require spec_helper
2
+ --color
3
+ --format documentation
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Microsoft Corporation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,5 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require "bundler/gem_tasks"
@@ -0,0 +1,35 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ lib = File.expand_path('../lib', __FILE__)
6
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
+
8
+ require 'azure_mgmt_subscriptions/module_definition'
9
+ require 'azure_mgmt_subscriptions/version'
10
+
11
+ Gem::Specification.new do |spec|
12
+ spec.name = 'azure_mgmt_subscriptions'
13
+ spec.version = Azure::ARM::Subscriptions::VERSION
14
+ spec.authors = 'Microsoft Corporation'
15
+ spec.email = 'azrubyteam@microsoft.com'
16
+ spec.description = 'Microsoft Azure Subscription Management Client Library for Ruby'
17
+ spec.summary = 'Official ruby client library to consume Microsoft Azure Subscription Management services.'
18
+ spec.homepage = 'http://github.com/azure/azure-sdk-for-ruby'
19
+ spec.license = 'MIT'
20
+
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
+ spec.bindir = 'bin'
23
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.require_paths = ['lib']
25
+
26
+ spec.required_ruby_version = '>= 1.9.3'
27
+
28
+ spec.add_development_dependency 'bundler', '~> 1.9'
29
+ spec.add_development_dependency 'rake', '~> 10'
30
+ spec.add_development_dependency 'rspec', '~> 3'
31
+ spec.add_development_dependency 'dotenv', '~> 2'
32
+ spec.add_development_dependency 'azure_mgmt_resources', '~> 0.2'
33
+
34
+ spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.0'
35
+ end
@@ -0,0 +1,35 @@
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
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require 'ms_rest_azure'
20
+
21
+ module Azure::ARM::Subscriptions
22
+ autoload :Subscriptions, 'azure_mgmt_subscriptions/subscriptions.rb'
23
+ autoload :Tenants, 'azure_mgmt_subscriptions/tenants.rb'
24
+ autoload :SubscriptionClient, 'azure_mgmt_subscriptions/subscription_client.rb'
25
+
26
+ module Models
27
+ autoload :Location, 'azure_mgmt_subscriptions/models/location.rb'
28
+ autoload :LocationListResult, 'azure_mgmt_subscriptions/models/location_list_result.rb'
29
+ autoload :Subscription, 'azure_mgmt_subscriptions/models/subscription.rb'
30
+ autoload :SubscriptionPolicies, 'azure_mgmt_subscriptions/models/subscription_policies.rb'
31
+ autoload :SubscriptionListResult, 'azure_mgmt_subscriptions/models/subscription_list_result.rb'
32
+ autoload :TenantIdDescription, 'azure_mgmt_subscriptions/models/tenant_id_description.rb'
33
+ autoload :TenantListResult, 'azure_mgmt_subscriptions/models/tenant_list_result.rb'
34
+ end
35
+ end
@@ -0,0 +1,102 @@
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::Subscriptions
7
+ module Models
8
+ #
9
+ # Location information.
10
+ #
11
+ class Location
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the ID of the resource
16
+ # (/subscriptions/SubscriptionId).
17
+ attr_accessor :id
18
+
19
+ # @return [String] Gets or sets the subscription Id.
20
+ attr_accessor :subscription_id
21
+
22
+ # @return [String] Gets or sets the location name
23
+ attr_accessor :name
24
+
25
+ # @return [String] Gets or sets the display name of the location
26
+ attr_accessor :display_name
27
+
28
+ # @return [String] Gets or sets the latitude of the location
29
+ attr_accessor :latitude
30
+
31
+ # @return [String] Gets or sets the longitude of the location
32
+ attr_accessor :longitude
33
+
34
+ #
35
+ # Validate the object. Throws ValidationError if validation fails.
36
+ #
37
+ def validate
38
+ # Nothing to validate
39
+ end
40
+
41
+ #
42
+ # Serializes given Model object into Ruby Hash.
43
+ # @param object Model object to serialize.
44
+ # @return [Hash] Serialized object in form of Ruby Hash.
45
+ #
46
+ def self.serialize_object(object)
47
+ object.validate
48
+ output_object = {}
49
+
50
+ serialized_property = object.id
51
+ output_object['id'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.subscription_id
54
+ output_object['subscriptionId'] = serialized_property unless serialized_property.nil?
55
+
56
+ serialized_property = object.name
57
+ output_object['name'] = serialized_property unless serialized_property.nil?
58
+
59
+ serialized_property = object.display_name
60
+ output_object['displayName'] = serialized_property unless serialized_property.nil?
61
+
62
+ serialized_property = object.latitude
63
+ output_object['latitude'] = serialized_property unless serialized_property.nil?
64
+
65
+ serialized_property = object.longitude
66
+ output_object['longitude'] = serialized_property unless serialized_property.nil?
67
+
68
+ output_object
69
+ end
70
+
71
+ #
72
+ # Deserializes given Ruby Hash into Model object.
73
+ # @param object [Hash] Ruby Hash object to deserialize.
74
+ # @return [Location] Deserialized object.
75
+ #
76
+ def self.deserialize_object(object)
77
+ return if object.nil?
78
+ output_object = Location.new
79
+
80
+ deserialized_property = object['id']
81
+ output_object.id = deserialized_property
82
+
83
+ deserialized_property = object['subscriptionId']
84
+ output_object.subscription_id = deserialized_property
85
+
86
+ deserialized_property = object['name']
87
+ output_object.name = deserialized_property
88
+
89
+ deserialized_property = object['displayName']
90
+ output_object.display_name = deserialized_property
91
+
92
+ deserialized_property = object['latitude']
93
+ output_object.latitude = deserialized_property
94
+
95
+ deserialized_property = object['longitude']
96
+ output_object.longitude = deserialized_property
97
+
98
+ output_object
99
+ end
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,76 @@
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::Subscriptions
7
+ module Models
8
+ #
9
+ # Location list operation response.
10
+ #
11
+ class LocationListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Location>] Gets the locations.
16
+ attr_accessor :value
17
+
18
+ #
19
+ # Validate the object. Throws ValidationError if validation fails.
20
+ #
21
+ def validate
22
+ @value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
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.value
35
+ unless serialized_property.nil?
36
+ serializedArray = []
37
+ serialized_property.each do |element|
38
+ unless element.nil?
39
+ element = Location.serialize_object(element)
40
+ end
41
+ serializedArray.push(element)
42
+ end
43
+ serialized_property = serializedArray
44
+ end
45
+ output_object['value'] = serialized_property unless serialized_property.nil?
46
+
47
+ output_object
48
+ end
49
+
50
+ #
51
+ # Deserializes given Ruby Hash into Model object.
52
+ # @param object [Hash] Ruby Hash object to deserialize.
53
+ # @return [LocationListResult] Deserialized object.
54
+ #
55
+ def self.deserialize_object(object)
56
+ return if object.nil?
57
+ output_object = LocationListResult.new
58
+
59
+ deserialized_property = object['value']
60
+ unless deserialized_property.nil?
61
+ deserialized_array = []
62
+ deserialized_property.each do |element1|
63
+ unless element1.nil?
64
+ element1 = Location.deserialize_object(element1)
65
+ end
66
+ deserialized_array.push(element1)
67
+ end
68
+ deserialized_property = deserialized_array
69
+ end
70
+ output_object.value = deserialized_property
71
+
72
+ output_object
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,99 @@
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::Subscriptions
7
+ module Models
8
+ #
9
+ # Subscription information.
10
+ #
11
+ class Subscription
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the ID of the resource
16
+ # (/subscriptions/SubscriptionId).
17
+ attr_accessor :id
18
+
19
+ # @return [String] Gets or sets the subscription Id.
20
+ attr_accessor :subscription_id
21
+
22
+ # @return [String] Gets or sets the subscription display name
23
+ attr_accessor :display_name
24
+
25
+ # @return [String] Gets or sets the subscription state
26
+ attr_accessor :state
27
+
28
+ # @return [SubscriptionPolicies] Gets or sets the subscription policies.
29
+ attr_accessor :subscription_policies
30
+
31
+ #
32
+ # Validate the object. Throws ValidationError if validation fails.
33
+ #
34
+ def validate
35
+ @subscription_policies.validate unless @subscription_policies.nil?
36
+ end
37
+
38
+ #
39
+ # Serializes given Model object into Ruby Hash.
40
+ # @param object Model object to serialize.
41
+ # @return [Hash] Serialized object in form of Ruby Hash.
42
+ #
43
+ def self.serialize_object(object)
44
+ object.validate
45
+ output_object = {}
46
+
47
+ serialized_property = object.id
48
+ output_object['id'] = serialized_property unless serialized_property.nil?
49
+
50
+ serialized_property = object.subscription_id
51
+ output_object['subscriptionId'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.display_name
54
+ output_object['displayName'] = serialized_property unless serialized_property.nil?
55
+
56
+ serialized_property = object.state
57
+ output_object['state'] = serialized_property unless serialized_property.nil?
58
+
59
+ serialized_property = object.subscription_policies
60
+ unless serialized_property.nil?
61
+ serialized_property = SubscriptionPolicies.serialize_object(serialized_property)
62
+ end
63
+ output_object['subscriptionPolicies'] = serialized_property unless serialized_property.nil?
64
+
65
+ output_object
66
+ end
67
+
68
+ #
69
+ # Deserializes given Ruby Hash into Model object.
70
+ # @param object [Hash] Ruby Hash object to deserialize.
71
+ # @return [Subscription] Deserialized object.
72
+ #
73
+ def self.deserialize_object(object)
74
+ return if object.nil?
75
+ output_object = Subscription.new
76
+
77
+ deserialized_property = object['id']
78
+ output_object.id = deserialized_property
79
+
80
+ deserialized_property = object['subscriptionId']
81
+ output_object.subscription_id = deserialized_property
82
+
83
+ deserialized_property = object['displayName']
84
+ output_object.display_name = deserialized_property
85
+
86
+ deserialized_property = object['state']
87
+ output_object.state = deserialized_property
88
+
89
+ deserialized_property = object['subscriptionPolicies']
90
+ unless deserialized_property.nil?
91
+ deserialized_property = SubscriptionPolicies.deserialize_object(deserialized_property)
92
+ end
93
+ output_object.subscription_policies = deserialized_property
94
+
95
+ output_object
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,86 @@
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::Subscriptions
7
+ module Models
8
+ #
9
+ # Subscription list operation response.
10
+ #
11
+ class SubscriptionListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Subscription>] Gets or sets subscriptions.
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
+ fail MsRest::ValidationError, 'property next_link is nil' if @next_link.nil?
26
+ @value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
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.next_link
39
+ output_object['nextLink'] = serialized_property unless serialized_property.nil?
40
+
41
+ serialized_property = object.value
42
+ unless serialized_property.nil?
43
+ serializedArray = []
44
+ serialized_property.each do |element|
45
+ unless element.nil?
46
+ element = Subscription.serialize_object(element)
47
+ end
48
+ serializedArray.push(element)
49
+ end
50
+ serialized_property = serializedArray
51
+ end
52
+ output_object['value'] = serialized_property unless serialized_property.nil?
53
+
54
+ output_object
55
+ end
56
+
57
+ #
58
+ # Deserializes given Ruby Hash into Model object.
59
+ # @param object [Hash] Ruby Hash object to deserialize.
60
+ # @return [SubscriptionListResult] Deserialized object.
61
+ #
62
+ def self.deserialize_object(object)
63
+ return if object.nil?
64
+ output_object = SubscriptionListResult.new
65
+
66
+ deserialized_property = object['nextLink']
67
+ output_object.next_link = deserialized_property
68
+
69
+ deserialized_property = object['value']
70
+ unless deserialized_property.nil?
71
+ deserialized_array = []
72
+ deserialized_property.each do |element1|
73
+ unless element1.nil?
74
+ element1 = Subscription.deserialize_object(element1)
75
+ end
76
+ deserialized_array.push(element1)
77
+ end
78
+ deserialized_property = deserialized_array
79
+ end
80
+ output_object.value = deserialized_property
81
+
82
+ output_object
83
+ end
84
+ end
85
+ end
86
+ end