azure_mgmt_redis 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 634c0647724e1550a36a5dfd8fd172e4882cc91e
4
+ data.tar.gz: 1086fc8d447f6d48a8ad802a1f57d27914e4e76f
5
+ SHA512:
6
+ metadata.gz: 9c1c7a45dffe3e5317f7a8e2c0c2641c557779edaf9129e14b3db3428ea57f293ffb7123eabb4aaa898bfcfab9018d002ae243d66ce9beb8a5f7e3cac781bd44
7
+ data.tar.gz: 1906823fcc4ac530f67fa31267fcebfd4ab17eeb0c3756befc3fad6f55be033b6bee787c072fbbf0135166cb2ad10bfdcb2b4fdb736fdac69929217b633e993a
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --require spec_helper
2
+ --color
3
+ --format documentation
data/LICENSE.txt ADDED
@@ -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.
data/Rakefile ADDED
@@ -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_redis/module_definition'
9
+ require 'azure_mgmt_redis/version'
10
+
11
+ Gem::Specification.new do |spec|
12
+ spec.name = 'azure_mgmt_redis'
13
+ spec.version = Azure::ARM::Redis::VERSION
14
+ spec.authors = 'Microsoft Corporation'
15
+ spec.email = 'azrubyteam@microsoft.com'
16
+ spec.description = 'Microsoft Azure Redis Management Client Library for Ruby'
17
+ spec.summary = 'Official Ruby client library to consume Microsoft Azure Redis 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,41 @@
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::Redis
22
+ autoload :Redis, 'azure_mgmt_redis/redis.rb'
23
+ autoload :RedisManagementClient, 'azure_mgmt_redis/redis_management_client.rb'
24
+
25
+ module Models
26
+ autoload :Sku, 'azure_mgmt_redis/models/sku.rb'
27
+ autoload :RedisProperties, 'azure_mgmt_redis/models/redis_properties.rb'
28
+ autoload :RedisAccessKeys, 'azure_mgmt_redis/models/redis_access_keys.rb'
29
+ autoload :RedisReadablePropertiesWithAccessKey, 'azure_mgmt_redis/models/redis_readable_properties_with_access_key.rb'
30
+ autoload :RedisReadableProperties, 'azure_mgmt_redis/models/redis_readable_properties.rb'
31
+ autoload :RedisListResult, 'azure_mgmt_redis/models/redis_list_result.rb'
32
+ autoload :RedisListKeysResult, 'azure_mgmt_redis/models/redis_list_keys_result.rb'
33
+ autoload :RedisRegenerateKeyParameters, 'azure_mgmt_redis/models/redis_regenerate_key_parameters.rb'
34
+ autoload :RedisCreateOrUpdateParameters, 'azure_mgmt_redis/models/redis_create_or_update_parameters.rb'
35
+ autoload :RedisResourceWithAccessKey, 'azure_mgmt_redis/models/redis_resource_with_access_key.rb'
36
+ autoload :RedisResource, 'azure_mgmt_redis/models/redis_resource.rb'
37
+ autoload :SkuName, 'azure_mgmt_redis/models/sku_name.rb'
38
+ autoload :SkuFamily, 'azure_mgmt_redis/models/sku_family.rb'
39
+ autoload :RedisKeyType, 'azure_mgmt_redis/models/redis_key_type.rb'
40
+ end
41
+ end
@@ -0,0 +1,67 @@
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::Redis
7
+ module Models
8
+ #
9
+ # Redis cache access keys.
10
+ #
11
+ class RedisAccessKeys
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The current primary key that clients can use to
16
+ # authenticate with redis cache.
17
+ attr_accessor :primary_key
18
+
19
+ # @return [String] The current secondary key that clients can use to
20
+ # authenticate with redis cache.
21
+ attr_accessor :secondary_key
22
+
23
+ #
24
+ # Validate the object. Throws ValidationError if validation fails.
25
+ #
26
+ def validate
27
+ # Nothing to validate
28
+ end
29
+
30
+ #
31
+ # Serializes given Model object into Ruby Hash.
32
+ # @param object Model object to serialize.
33
+ # @return [Hash] Serialized object in form of Ruby Hash.
34
+ #
35
+ def self.serialize_object(object)
36
+ object.validate
37
+ output_object = {}
38
+
39
+ serialized_property = object.primary_key
40
+ output_object['primaryKey'] = serialized_property unless serialized_property.nil?
41
+
42
+ serialized_property = object.secondary_key
43
+ output_object['secondaryKey'] = serialized_property unless serialized_property.nil?
44
+
45
+ output_object
46
+ end
47
+
48
+ #
49
+ # Deserializes given Ruby Hash into Model object.
50
+ # @param object [Hash] Ruby Hash object to deserialize.
51
+ # @return [RedisAccessKeys] Deserialized object.
52
+ #
53
+ def self.deserialize_object(object)
54
+ return if object.nil?
55
+ output_object = RedisAccessKeys.new
56
+
57
+ deserialized_property = object['primaryKey']
58
+ output_object.primary_key = deserialized_property
59
+
60
+ deserialized_property = object['secondaryKey']
61
+ output_object.secondary_key = deserialized_property
62
+
63
+ output_object
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,93 @@
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::Redis
7
+ module Models
8
+ #
9
+ # Parameters supplied to the CreateOrUpdate Redis operation.
10
+ #
11
+ class RedisCreateOrUpdateParameters < MsRestAzure::Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [RedisProperties] Redis cache properties.
16
+ attr_accessor :properties
17
+
18
+ #
19
+ # Validate the object. Throws ValidationError if validation fails.
20
+ #
21
+ def validate
22
+ fail MsRest::ValidationError, 'property properties is nil' if @properties.nil?
23
+ @properties.validate unless @properties.nil?
24
+ end
25
+
26
+ #
27
+ # Serializes given Model object into Ruby Hash.
28
+ # @param object Model object to serialize.
29
+ # @return [Hash] Serialized object in form of Ruby Hash.
30
+ #
31
+ def self.serialize_object(object)
32
+ object.validate
33
+ output_object = {}
34
+
35
+ serialized_property = object.location
36
+ output_object['location'] = serialized_property unless serialized_property.nil?
37
+
38
+ serialized_property = object.properties
39
+ unless serialized_property.nil?
40
+ serialized_property = RedisProperties.serialize_object(serialized_property)
41
+ end
42
+ output_object['properties'] = serialized_property unless serialized_property.nil?
43
+
44
+ serialized_property = object.id
45
+ output_object['id'] = serialized_property unless serialized_property.nil?
46
+
47
+ serialized_property = object.name
48
+ output_object['name'] = serialized_property unless serialized_property.nil?
49
+
50
+ serialized_property = object.type
51
+ output_object['type'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.tags
54
+ output_object['tags'] = serialized_property unless serialized_property.nil?
55
+
56
+ output_object
57
+ end
58
+
59
+ #
60
+ # Deserializes given Ruby Hash into Model object.
61
+ # @param object [Hash] Ruby Hash object to deserialize.
62
+ # @return [RedisCreateOrUpdateParameters] Deserialized object.
63
+ #
64
+ def self.deserialize_object(object)
65
+ return if object.nil?
66
+ output_object = RedisCreateOrUpdateParameters.new
67
+
68
+ deserialized_property = object['location']
69
+ output_object.location = deserialized_property
70
+
71
+ deserialized_property = object['properties']
72
+ unless deserialized_property.nil?
73
+ deserialized_property = RedisProperties.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['name']
81
+ output_object.name = deserialized_property
82
+
83
+ deserialized_property = object['type']
84
+ output_object.type = deserialized_property
85
+
86
+ deserialized_property = object['tags']
87
+ output_object.tags = deserialized_property
88
+
89
+ output_object
90
+ end
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,16 @@
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::Redis
7
+ module Models
8
+ #
9
+ # Defines values for RedisKeyType
10
+ #
11
+ module RedisKeyType
12
+ Primary = "Primary"
13
+ Secondary = "Secondary"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,67 @@
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::Redis
7
+ module Models
8
+ #
9
+ # The response of redis list keys operation.
10
+ #
11
+ class RedisListKeysResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The current primary key that clients can use to
16
+ # authenticate with redis cache.
17
+ attr_accessor :primary_key
18
+
19
+ # @return [String] The current secondary key that clients can use to
20
+ # authenticate with redis cache.
21
+ attr_accessor :secondary_key
22
+
23
+ #
24
+ # Validate the object. Throws ValidationError if validation fails.
25
+ #
26
+ def validate
27
+ # Nothing to validate
28
+ end
29
+
30
+ #
31
+ # Serializes given Model object into Ruby Hash.
32
+ # @param object Model object to serialize.
33
+ # @return [Hash] Serialized object in form of Ruby Hash.
34
+ #
35
+ def self.serialize_object(object)
36
+ object.validate
37
+ output_object = {}
38
+
39
+ serialized_property = object.primary_key
40
+ output_object['primaryKey'] = serialized_property unless serialized_property.nil?
41
+
42
+ serialized_property = object.secondary_key
43
+ output_object['secondaryKey'] = serialized_property unless serialized_property.nil?
44
+
45
+ output_object
46
+ end
47
+
48
+ #
49
+ # Deserializes given Ruby Hash into Model object.
50
+ # @param object [Hash] Ruby Hash object to deserialize.
51
+ # @return [RedisListKeysResult] Deserialized object.
52
+ #
53
+ def self.deserialize_object(object)
54
+ return if object.nil?
55
+ output_object = RedisListKeysResult.new
56
+
57
+ deserialized_property = object['primaryKey']
58
+ output_object.primary_key = deserialized_property
59
+
60
+ deserialized_property = object['secondaryKey']
61
+ output_object.secondary_key = deserialized_property
62
+
63
+ output_object
64
+ end
65
+ end
66
+ end
67
+ 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::Redis
7
+ module Models
8
+ #
9
+ # The response of list redis operation.
10
+ #
11
+ class RedisListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<RedisResource>] Results of the list operation
16
+ attr_accessor :value
17
+
18
+ # @return [String] Link for next set of locations.
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 = RedisResource.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 [RedisListResult] Deserialized object.
60
+ #
61
+ def self.deserialize_object(object)
62
+ return if object.nil?
63
+ output_object = RedisListResult.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 = RedisResource.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