oraclebmc 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -2
  3. data/lib/oraclebmc/core/blockstorage_client.rb +2 -2
  4. data/lib/oraclebmc/core/compute_client.rb +8 -7
  5. data/lib/oraclebmc/core/core.rb +17 -0
  6. data/lib/oraclebmc/core/models/create_cross_connect_details.rb +203 -0
  7. data/lib/oraclebmc/core/models/create_cross_connect_group_details.rb +132 -0
  8. data/lib/oraclebmc/core/models/create_subnet_details.rb +24 -3
  9. data/lib/oraclebmc/core/models/create_vcn_details.rb +2 -2
  10. data/lib/oraclebmc/core/models/create_virtual_circuit_details.rb +261 -0
  11. data/lib/oraclebmc/core/models/create_vnic_details.rb +202 -0
  12. data/lib/oraclebmc/core/models/cross_connect.rb +234 -0
  13. data/lib/oraclebmc/core/models/cross_connect_group.rb +187 -0
  14. data/lib/oraclebmc/core/models/cross_connect_location.rb +135 -0
  15. data/lib/oraclebmc/core/models/cross_connect_mapping.rb +191 -0
  16. data/lib/oraclebmc/core/models/cross_connect_port_speed_shape.rb +138 -0
  17. data/lib/oraclebmc/core/models/cross_connect_status.rb +201 -0
  18. data/lib/oraclebmc/core/models/dhcp_dns_option.rb +7 -7
  19. data/lib/oraclebmc/core/models/dhcp_option.rb +1 -1
  20. data/lib/oraclebmc/core/models/dhcp_search_domain_option.rb +6 -7
  21. data/lib/oraclebmc/core/models/fast_connect_provider_service.rb +146 -0
  22. data/lib/oraclebmc/core/models/image.rb +1 -1
  23. data/lib/oraclebmc/core/models/instance.rb +6 -7
  24. data/lib/oraclebmc/core/models/launch_instance_details.rb +22 -19
  25. data/lib/oraclebmc/core/models/letter_of_authority.rb +195 -0
  26. data/lib/oraclebmc/core/models/subnet.rb +26 -5
  27. data/lib/oraclebmc/core/models/update_cross_connect_details.rb +137 -0
  28. data/lib/oraclebmc/core/models/update_cross_connect_group_details.rb +121 -0
  29. data/lib/oraclebmc/core/models/update_virtual_circuit_details.rb +240 -0
  30. data/lib/oraclebmc/core/models/vcn.rb +4 -4
  31. data/lib/oraclebmc/core/models/virtual_circuit.rb +395 -0
  32. data/lib/oraclebmc/core/models/virtual_circuit_bandwidth_shape.rb +138 -0
  33. data/lib/oraclebmc/core/models/vnic.rb +4 -4
  34. data/lib/oraclebmc/core/virtual_network_client.rb +962 -85
  35. data/lib/oraclebmc/identity/identity.rb +13 -0
  36. data/lib/oraclebmc/identity/identity_client.rb +533 -8
  37. data/lib/oraclebmc/identity/models/create_identity_provider_details.rb +213 -0
  38. data/lib/oraclebmc/identity/models/create_idp_group_mapping_details.rb +134 -0
  39. data/lib/oraclebmc/identity/models/create_region_subscription_details.rb +128 -0
  40. data/lib/oraclebmc/identity/models/create_saml2_identity_provider_details.rb +155 -0
  41. data/lib/oraclebmc/identity/models/create_user_details.rb +1 -1
  42. data/lib/oraclebmc/identity/models/identity_provider.rb +257 -0
  43. data/lib/oraclebmc/identity/models/idp_group_mapping.rb +221 -0
  44. data/lib/oraclebmc/identity/models/region.rb +142 -0
  45. data/lib/oraclebmc/identity/models/region_subscription.rb +179 -0
  46. data/lib/oraclebmc/identity/models/saml2_identity_provider.rb +181 -0
  47. data/lib/oraclebmc/identity/models/tenancy.rb +159 -0
  48. data/lib/oraclebmc/identity/models/update_identity_provider_details.rb +161 -0
  49. data/lib/oraclebmc/identity/models/update_idp_group_mapping_details.rb +132 -0
  50. data/lib/oraclebmc/identity/models/update_saml2_identity_provider_details.rb +146 -0
  51. data/lib/oraclebmc/regions.rb +1 -1
  52. data/lib/oraclebmc/version.rb +1 -1
  53. metadata +32 -2
@@ -0,0 +1,159 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OracleBMC
6
+ class Identity::Models::Tenancy
7
+ # The OCID of the tenancy.
8
+ # @return [String]
9
+ attr_accessor :id
10
+
11
+ # The name of the tenancy.
12
+ # @return [String]
13
+ attr_accessor :name
14
+
15
+ # The description of the tenancy.
16
+ # @return [String]
17
+ attr_accessor :description
18
+
19
+ # The region key for the tenancy's home region.
20
+ #
21
+ # Allowed values are:
22
+ # - `IAD`
23
+ # - `PHX`
24
+ #
25
+ # @return [String]
26
+ attr_accessor :home_region_key
27
+
28
+
29
+ # Initializes the object
30
+ # @param [Hash] attributes Model attributes in the form of hash
31
+ def initialize(attributes = {})
32
+ return unless attributes.is_a?(Hash)
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
36
+
37
+
38
+ if attributes[:'id']
39
+ self.id = attributes[:'id']
40
+ end
41
+
42
+ if attributes[:'name']
43
+ self.name = attributes[:'name']
44
+ end
45
+
46
+ if attributes[:'description']
47
+ self.description = attributes[:'description']
48
+ end
49
+
50
+ if attributes[:'homeRegionKey']
51
+ self.home_region_key = attributes[:'homeRegionKey']
52
+ end
53
+
54
+ end
55
+
56
+ # Checks equality by comparing each attribute.
57
+ # @param [Object] other_object to be compared
58
+ def ==(other_object)
59
+ return true if self.equal?(other_object)
60
+ self.class == other_object.class &&
61
+ id == other_object.id &&
62
+ name == other_object.name &&
63
+ description == other_object.description &&
64
+ home_region_key == other_object.home_region_key
65
+ end
66
+
67
+ # @see the `==` method
68
+ # @param [Object] other_object to be compared
69
+ def eql?(other_object)
70
+ self == other_object
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Fixnum] Hash code
75
+ def hash
76
+ [id, name, description, home_region_key].hash
77
+ end
78
+
79
+ # Builds the object from hash
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ # @return [Object] Returns the model itself
82
+ def build_from_hash(attributes)
83
+ return nil unless attributes.is_a?(Hash)
84
+ self.class.swagger_types.each_pair do |key, type|
85
+ if type =~ /^Array<(.*)>/i
86
+ # check to ensure the input is an array given that the the attribute
87
+ # is documented as an array but the input is not
88
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
89
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
90
+ end
91
+ elsif !attributes[self.class.attribute_map[key]].nil?
92
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
93
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
94
+ end
95
+
96
+ self
97
+ end
98
+
99
+ # Returns the string representation of the object
100
+ # @return [String] String presentation of the object
101
+ def to_s
102
+ to_hash.to_s
103
+ end
104
+
105
+ # Returns the object in the form of hash
106
+ # @return [Hash] Returns the object in the form of hash
107
+ def to_hash
108
+ hash = {}
109
+ self.class.attribute_map.each_pair do |attr, param|
110
+ value = self.send(attr)
111
+ next if value.nil?
112
+ hash[param] = _to_hash(value)
113
+ end
114
+ hash
115
+ end
116
+
117
+ private
118
+
119
+ # Outputs non-array value in the form of hash
120
+ # For object, use to_hash. Otherwise, just return the value
121
+ # @param [Object] value Any valid value
122
+ # @return [Hash] Returns the value in the form of hash
123
+ def _to_hash(value)
124
+ if value.is_a?(Array)
125
+ value.compact.map{ |v| _to_hash(v) }
126
+ elsif value.is_a?(Hash)
127
+ {}.tap do |hash|
128
+ value.each { |k, v| hash[k] = _to_hash(v) }
129
+ end
130
+ elsif value.respond_to? :to_hash
131
+ value.to_hash
132
+ else
133
+ value
134
+ end
135
+ end
136
+
137
+
138
+
139
+ # Attribute mapping from ruby-style variable name to JSON key.
140
+ def self.attribute_map
141
+ {
142
+ :'id' => :'id',
143
+ :'name' => :'name',
144
+ :'description' => :'description',
145
+ :'home_region_key' => :'homeRegionKey'
146
+ }
147
+ end
148
+
149
+ # Attribute type mapping.
150
+ def self.swagger_types
151
+ {
152
+ :'id' => :'String',
153
+ :'name' => :'String',
154
+ :'description' => :'String',
155
+ :'home_region_key' => :'String'
156
+ }
157
+ end
158
+ end
159
+ end
@@ -0,0 +1,161 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OracleBMC
6
+ class Identity::Models::UpdateIdentityProviderDetails
7
+
8
+ PROTOCOL_ENUM = [PROTOCOL_SAML2 = 'SAML2']
9
+
10
+ # The protocol used for federation.
11
+ #
12
+ # Example: `SAML2`
13
+ #
14
+ # @return [String]
15
+ attr_accessor :protocol
16
+
17
+ # The description you assign to the `IdentityProvider`. Does not have to
18
+ # be unique, and it's changeable.
19
+ #
20
+ # @return [String]
21
+ attr_accessor :description
22
+
23
+
24
+ # Given the hash representation of a subtype of this class,
25
+ # use the info in the hash to return the class of the subtype.
26
+ def self.get_subtype(object_hash)
27
+ type = object_hash[:'protocol']
28
+
29
+ return 'OracleBMC::Identity::Models::UpdateSaml2IdentityProviderDetails' if type == 'SAML2'
30
+
31
+ # TODO: Log a warning when the subtype is not found.
32
+ return 'OracleBMC::Identity::Models::UpdateIdentityProviderDetails'
33
+ end
34
+
35
+ # Initializes the object
36
+ # @param [Hash] attributes Model attributes in the form of hash
37
+ def initialize(attributes = {})
38
+ return unless attributes.is_a?(Hash)
39
+
40
+ # convert string to symbol for hash key
41
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
42
+
43
+
44
+ if attributes[:'protocol']
45
+ self.protocol = attributes[:'protocol']
46
+ end
47
+
48
+ if attributes[:'description']
49
+ self.description = attributes[:'description']
50
+ end
51
+
52
+ end
53
+
54
+ # Custom attribute writer method checking allowed values (enum).
55
+ # @param [Object] protocol Object to be assigned
56
+ def protocol=(protocol)
57
+ if protocol && !PROTOCOL_ENUM.include?(protocol)
58
+ fail "Invalid value for 'protocol': this must be one of the values in PROTOCOL_ENUM."
59
+ else
60
+ @protocol = protocol
61
+ end
62
+ end
63
+
64
+ # Checks equality by comparing each attribute.
65
+ # @param [Object] other_object to be compared
66
+ def ==(other_object)
67
+ return true if self.equal?(other_object)
68
+ self.class == other_object.class &&
69
+ protocol == other_object.protocol &&
70
+ description == other_object.description
71
+ end
72
+
73
+ # @see the `==` method
74
+ # @param [Object] other_object to be compared
75
+ def eql?(other_object)
76
+ self == other_object
77
+ end
78
+
79
+ # Calculates hash code according to all attributes.
80
+ # @return [Fixnum] Hash code
81
+ def hash
82
+ [protocol, description].hash
83
+ end
84
+
85
+ # Builds the object from hash
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ # @return [Object] Returns the model itself
88
+ def build_from_hash(attributes)
89
+ return nil unless attributes.is_a?(Hash)
90
+ self.class.swagger_types.each_pair do |key, type|
91
+ if type =~ /^Array<(.*)>/i
92
+ # check to ensure the input is an array given that the the attribute
93
+ # is documented as an array but the input is not
94
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
95
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
96
+ end
97
+ elsif !attributes[self.class.attribute_map[key]].nil?
98
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
99
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
100
+ end
101
+
102
+ self
103
+ end
104
+
105
+ # Returns the string representation of the object
106
+ # @return [String] String presentation of the object
107
+ def to_s
108
+ to_hash.to_s
109
+ end
110
+
111
+ # Returns the object in the form of hash
112
+ # @return [Hash] Returns the object in the form of hash
113
+ def to_hash
114
+ hash = {}
115
+ self.class.attribute_map.each_pair do |attr, param|
116
+ value = self.send(attr)
117
+ next if value.nil?
118
+ hash[param] = _to_hash(value)
119
+ end
120
+ hash
121
+ end
122
+
123
+ private
124
+
125
+ # Outputs non-array value in the form of hash
126
+ # For object, use to_hash. Otherwise, just return the value
127
+ # @param [Object] value Any valid value
128
+ # @return [Hash] Returns the value in the form of hash
129
+ def _to_hash(value)
130
+ if value.is_a?(Array)
131
+ value.compact.map{ |v| _to_hash(v) }
132
+ elsif value.is_a?(Hash)
133
+ {}.tap do |hash|
134
+ value.each { |k, v| hash[k] = _to_hash(v) }
135
+ end
136
+ elsif value.respond_to? :to_hash
137
+ value.to_hash
138
+ else
139
+ value
140
+ end
141
+ end
142
+
143
+
144
+
145
+ # Attribute mapping from ruby-style variable name to JSON key.
146
+ def self.attribute_map
147
+ {
148
+ :'protocol' => :'protocol',
149
+ :'description' => :'description'
150
+ }
151
+ end
152
+
153
+ # Attribute type mapping.
154
+ def self.swagger_types
155
+ {
156
+ :'protocol' => :'String',
157
+ :'description' => :'String'
158
+ }
159
+ end
160
+ end
161
+ end
@@ -0,0 +1,132 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OracleBMC
6
+ class Identity::Models::UpdateIdpGroupMappingDetails
7
+ # The idp group name.
8
+ # @return [String]
9
+ attr_accessor :idp_group_name
10
+
11
+ # The OCID of the group.
12
+ # @return [String]
13
+ attr_accessor :group_id
14
+
15
+
16
+ # Initializes the object
17
+ # @param [Hash] attributes Model attributes in the form of hash
18
+ def initialize(attributes = {})
19
+ return unless attributes.is_a?(Hash)
20
+
21
+ # convert string to symbol for hash key
22
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
23
+
24
+
25
+ if attributes[:'idpGroupName']
26
+ self.idp_group_name = attributes[:'idpGroupName']
27
+ end
28
+
29
+ if attributes[:'groupId']
30
+ self.group_id = attributes[:'groupId']
31
+ end
32
+
33
+ end
34
+
35
+ # Checks equality by comparing each attribute.
36
+ # @param [Object] other_object to be compared
37
+ def ==(other_object)
38
+ return true if self.equal?(other_object)
39
+ self.class == other_object.class &&
40
+ idp_group_name == other_object.idp_group_name &&
41
+ group_id == other_object.group_id
42
+ end
43
+
44
+ # @see the `==` method
45
+ # @param [Object] other_object to be compared
46
+ def eql?(other_object)
47
+ self == other_object
48
+ end
49
+
50
+ # Calculates hash code according to all attributes.
51
+ # @return [Fixnum] Hash code
52
+ def hash
53
+ [idp_group_name, group_id].hash
54
+ end
55
+
56
+ # Builds the object from hash
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ # @return [Object] Returns the model itself
59
+ def build_from_hash(attributes)
60
+ return nil unless attributes.is_a?(Hash)
61
+ self.class.swagger_types.each_pair do |key, type|
62
+ if type =~ /^Array<(.*)>/i
63
+ # check to ensure the input is an array given that the the attribute
64
+ # is documented as an array but the input is not
65
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
66
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
67
+ end
68
+ elsif !attributes[self.class.attribute_map[key]].nil?
69
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
70
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
71
+ end
72
+
73
+ self
74
+ end
75
+
76
+ # Returns the string representation of the object
77
+ # @return [String] String presentation of the object
78
+ def to_s
79
+ to_hash.to_s
80
+ end
81
+
82
+ # Returns the object in the form of hash
83
+ # @return [Hash] Returns the object in the form of hash
84
+ def to_hash
85
+ hash = {}
86
+ self.class.attribute_map.each_pair do |attr, param|
87
+ value = self.send(attr)
88
+ next if value.nil?
89
+ hash[param] = _to_hash(value)
90
+ end
91
+ hash
92
+ end
93
+
94
+ private
95
+
96
+ # Outputs non-array value in the form of hash
97
+ # For object, use to_hash. Otherwise, just return the value
98
+ # @param [Object] value Any valid value
99
+ # @return [Hash] Returns the value in the form of hash
100
+ def _to_hash(value)
101
+ if value.is_a?(Array)
102
+ value.compact.map{ |v| _to_hash(v) }
103
+ elsif value.is_a?(Hash)
104
+ {}.tap do |hash|
105
+ value.each { |k, v| hash[k] = _to_hash(v) }
106
+ end
107
+ elsif value.respond_to? :to_hash
108
+ value.to_hash
109
+ else
110
+ value
111
+ end
112
+ end
113
+
114
+
115
+
116
+ # Attribute mapping from ruby-style variable name to JSON key.
117
+ def self.attribute_map
118
+ {
119
+ :'idp_group_name' => :'idpGroupName',
120
+ :'group_id' => :'groupId'
121
+ }
122
+ end
123
+
124
+ # Attribute type mapping.
125
+ def self.swagger_types
126
+ {
127
+ :'idp_group_name' => :'String',
128
+ :'group_id' => :'String'
129
+ }
130
+ end
131
+ end
132
+ end