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,213 @@
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::CreateIdentityProviderDetails
7
+
8
+ PRODUCT_TYPE_ENUM = [PRODUCT_TYPE_IDCS = 'IDCS']
9
+
10
+
11
+ PROTOCOL_ENUM = [PROTOCOL_SAML2 = 'SAML2']
12
+
13
+ # The OCID of your tenancy.
14
+ # @return [String]
15
+ attr_accessor :compartment_id
16
+
17
+ # The name you assign to the `IdentityProvider` during creation.
18
+ # The name must be unique across all `IdentityProvider` objects in the
19
+ # tenancy and cannot be changed.
20
+ #
21
+ # @return [String]
22
+ attr_accessor :name
23
+
24
+ # The description you assign to the `IdentityProvider` during creation.
25
+ # Does not have to be unique, and it's changeable.
26
+ #
27
+ # @return [String]
28
+ attr_accessor :description
29
+
30
+ # The identity provider service or product (e.g., Oracle Identity Cloud Service).
31
+ #
32
+ # Example: `IDCS`
33
+ #
34
+ # @return [String]
35
+ attr_accessor :product_type
36
+
37
+ # The protocol used for federation.
38
+ #
39
+ # Example: `SAML2`
40
+ #
41
+ # @return [String]
42
+ attr_accessor :protocol
43
+
44
+
45
+ # Given the hash representation of a subtype of this class,
46
+ # use the info in the hash to return the class of the subtype.
47
+ def self.get_subtype(object_hash)
48
+ type = object_hash[:'protocol']
49
+
50
+ return 'OracleBMC::Identity::Models::CreateSaml2IdentityProviderDetails' if type == 'SAML2'
51
+
52
+ # TODO: Log a warning when the subtype is not found.
53
+ return 'OracleBMC::Identity::Models::CreateIdentityProviderDetails'
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ return unless attributes.is_a?(Hash)
60
+
61
+ # convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
63
+
64
+
65
+ if attributes[:'compartmentId']
66
+ self.compartment_id = attributes[:'compartmentId']
67
+ end
68
+
69
+ if attributes[:'name']
70
+ self.name = attributes[:'name']
71
+ end
72
+
73
+ if attributes[:'description']
74
+ self.description = attributes[:'description']
75
+ end
76
+
77
+ if attributes[:'productType']
78
+ self.product_type = attributes[:'productType']
79
+ end
80
+
81
+ if attributes[:'protocol']
82
+ self.protocol = attributes[:'protocol']
83
+ end
84
+
85
+ end
86
+
87
+ # Custom attribute writer method checking allowed values (enum).
88
+ # @param [Object] product_type Object to be assigned
89
+ def product_type=(product_type)
90
+ if product_type && !PRODUCT_TYPE_ENUM.include?(product_type)
91
+ fail "Invalid value for 'product_type': this must be one of the values in PRODUCT_TYPE_ENUM."
92
+ else
93
+ @product_type = product_type
94
+ end
95
+ end
96
+
97
+ # Custom attribute writer method checking allowed values (enum).
98
+ # @param [Object] protocol Object to be assigned
99
+ def protocol=(protocol)
100
+ if protocol && !PROTOCOL_ENUM.include?(protocol)
101
+ fail "Invalid value for 'protocol': this must be one of the values in PROTOCOL_ENUM."
102
+ else
103
+ @protocol = protocol
104
+ end
105
+ end
106
+
107
+ # Checks equality by comparing each attribute.
108
+ # @param [Object] other_object to be compared
109
+ def ==(other_object)
110
+ return true if self.equal?(other_object)
111
+ self.class == other_object.class &&
112
+ compartment_id == other_object.compartment_id &&
113
+ name == other_object.name &&
114
+ description == other_object.description &&
115
+ product_type == other_object.product_type &&
116
+ protocol == other_object.protocol
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] other_object to be compared
121
+ def eql?(other_object)
122
+ self == other_object
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Fixnum] Hash code
127
+ def hash
128
+ [compartment_id, name, description, product_type, protocol].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ self.class.swagger_types.each_pair do |key, type|
137
+ if type =~ /^Array<(.*)>/i
138
+ # check to ensure the input is an array given that the the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
142
+ end
143
+ elsif !attributes[self.class.attribute_map[key]].nil?
144
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
145
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
146
+ end
147
+
148
+ self
149
+ end
150
+
151
+ # Returns the string representation of the object
152
+ # @return [String] String presentation of the object
153
+ def to_s
154
+ to_hash.to_s
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ next if value.nil?
164
+ hash[param] = _to_hash(value)
165
+ end
166
+ hash
167
+ end
168
+
169
+ private
170
+
171
+ # Outputs non-array value in the form of hash
172
+ # For object, use to_hash. Otherwise, just return the value
173
+ # @param [Object] value Any valid value
174
+ # @return [Hash] Returns the value in the form of hash
175
+ def _to_hash(value)
176
+ if value.is_a?(Array)
177
+ value.compact.map{ |v| _to_hash(v) }
178
+ elsif value.is_a?(Hash)
179
+ {}.tap do |hash|
180
+ value.each { |k, v| hash[k] = _to_hash(v) }
181
+ end
182
+ elsif value.respond_to? :to_hash
183
+ value.to_hash
184
+ else
185
+ value
186
+ end
187
+ end
188
+
189
+
190
+
191
+ # Attribute mapping from ruby-style variable name to JSON key.
192
+ def self.attribute_map
193
+ {
194
+ :'compartment_id' => :'compartmentId',
195
+ :'name' => :'name',
196
+ :'description' => :'description',
197
+ :'product_type' => :'productType',
198
+ :'protocol' => :'protocol'
199
+ }
200
+ end
201
+
202
+ # Attribute type mapping.
203
+ def self.swagger_types
204
+ {
205
+ :'compartment_id' => :'String',
206
+ :'name' => :'String',
207
+ :'description' => :'String',
208
+ :'product_type' => :'String',
209
+ :'protocol' => :'String'
210
+ }
211
+ end
212
+ end
213
+ end
@@ -0,0 +1,134 @@
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::CreateIdpGroupMappingDetails
7
+ # The name of the IdP group you want to map.
8
+ # @return [String]
9
+ attr_accessor :idp_group_name
10
+
11
+ # The OCID of the IAM Service {Group}
12
+ # you want to map to the IdP group.
13
+ #
14
+ # @return [String]
15
+ attr_accessor :group_id
16
+
17
+
18
+ # Initializes the object
19
+ # @param [Hash] attributes Model attributes in the form of hash
20
+ def initialize(attributes = {})
21
+ return unless attributes.is_a?(Hash)
22
+
23
+ # convert string to symbol for hash key
24
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
25
+
26
+
27
+ if attributes[:'idpGroupName']
28
+ self.idp_group_name = attributes[:'idpGroupName']
29
+ end
30
+
31
+ if attributes[:'groupId']
32
+ self.group_id = attributes[:'groupId']
33
+ end
34
+
35
+ end
36
+
37
+ # Checks equality by comparing each attribute.
38
+ # @param [Object] other_object to be compared
39
+ def ==(other_object)
40
+ return true if self.equal?(other_object)
41
+ self.class == other_object.class &&
42
+ idp_group_name == other_object.idp_group_name &&
43
+ group_id == other_object.group_id
44
+ end
45
+
46
+ # @see the `==` method
47
+ # @param [Object] other_object to be compared
48
+ def eql?(other_object)
49
+ self == other_object
50
+ end
51
+
52
+ # Calculates hash code according to all attributes.
53
+ # @return [Fixnum] Hash code
54
+ def hash
55
+ [idp_group_name, group_id].hash
56
+ end
57
+
58
+ # Builds the object from hash
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ # @return [Object] Returns the model itself
61
+ def build_from_hash(attributes)
62
+ return nil unless attributes.is_a?(Hash)
63
+ self.class.swagger_types.each_pair do |key, type|
64
+ if type =~ /^Array<(.*)>/i
65
+ # check to ensure the input is an array given that the the attribute
66
+ # is documented as an array but the input is not
67
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
68
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
69
+ end
70
+ elsif !attributes[self.class.attribute_map[key]].nil?
71
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
72
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
73
+ end
74
+
75
+ self
76
+ end
77
+
78
+ # Returns the string representation of the object
79
+ # @return [String] String presentation of the object
80
+ def to_s
81
+ to_hash.to_s
82
+ end
83
+
84
+ # Returns the object in the form of hash
85
+ # @return [Hash] Returns the object in the form of hash
86
+ def to_hash
87
+ hash = {}
88
+ self.class.attribute_map.each_pair do |attr, param|
89
+ value = self.send(attr)
90
+ next if value.nil?
91
+ hash[param] = _to_hash(value)
92
+ end
93
+ hash
94
+ end
95
+
96
+ private
97
+
98
+ # Outputs non-array value in the form of hash
99
+ # For object, use to_hash. Otherwise, just return the value
100
+ # @param [Object] value Any valid value
101
+ # @return [Hash] Returns the value in the form of hash
102
+ def _to_hash(value)
103
+ if value.is_a?(Array)
104
+ value.compact.map{ |v| _to_hash(v) }
105
+ elsif value.is_a?(Hash)
106
+ {}.tap do |hash|
107
+ value.each { |k, v| hash[k] = _to_hash(v) }
108
+ end
109
+ elsif value.respond_to? :to_hash
110
+ value.to_hash
111
+ else
112
+ value
113
+ end
114
+ end
115
+
116
+
117
+
118
+ # Attribute mapping from ruby-style variable name to JSON key.
119
+ def self.attribute_map
120
+ {
121
+ :'idp_group_name' => :'idpGroupName',
122
+ :'group_id' => :'groupId'
123
+ }
124
+ end
125
+
126
+ # Attribute type mapping.
127
+ def self.swagger_types
128
+ {
129
+ :'idp_group_name' => :'String',
130
+ :'group_id' => :'String'
131
+ }
132
+ end
133
+ end
134
+ end
@@ -0,0 +1,128 @@
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::CreateRegionSubscriptionDetails
7
+ # The regions's key.
8
+ #
9
+ # Allowed values are:
10
+ # - `PHX`
11
+ # - `IAD`
12
+ #
13
+ # Example: `PHX`
14
+ #
15
+ # @return [String]
16
+ attr_accessor :region_key
17
+
18
+
19
+ # Initializes the object
20
+ # @param [Hash] attributes Model attributes in the form of hash
21
+ def initialize(attributes = {})
22
+ return unless attributes.is_a?(Hash)
23
+
24
+ # convert string to symbol for hash key
25
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
26
+
27
+
28
+ if attributes[:'regionKey']
29
+ self.region_key = attributes[:'regionKey']
30
+ end
31
+
32
+ end
33
+
34
+ # Checks equality by comparing each attribute.
35
+ # @param [Object] other_object to be compared
36
+ def ==(other_object)
37
+ return true if self.equal?(other_object)
38
+ self.class == other_object.class &&
39
+ region_key == other_object.region_key
40
+ end
41
+
42
+ # @see the `==` method
43
+ # @param [Object] other_object to be compared
44
+ def eql?(other_object)
45
+ self == other_object
46
+ end
47
+
48
+ # Calculates hash code according to all attributes.
49
+ # @return [Fixnum] Hash code
50
+ def hash
51
+ [region_key].hash
52
+ end
53
+
54
+ # Builds the object from hash
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ # @return [Object] Returns the model itself
57
+ def build_from_hash(attributes)
58
+ return nil unless attributes.is_a?(Hash)
59
+ self.class.swagger_types.each_pair do |key, type|
60
+ if type =~ /^Array<(.*)>/i
61
+ # check to ensure the input is an array given that the the attribute
62
+ # is documented as an array but the input is not
63
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
64
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OracleBMC::Internal::Util.convert_to_type($1, v) } )
65
+ end
66
+ elsif !attributes[self.class.attribute_map[key]].nil?
67
+ self.send("#{key}=", OracleBMC::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
68
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
69
+ end
70
+
71
+ self
72
+ end
73
+
74
+ # Returns the string representation of the object
75
+ # @return [String] String presentation of the object
76
+ def to_s
77
+ to_hash.to_s
78
+ end
79
+
80
+ # Returns the object in the form of hash
81
+ # @return [Hash] Returns the object in the form of hash
82
+ def to_hash
83
+ hash = {}
84
+ self.class.attribute_map.each_pair do |attr, param|
85
+ value = self.send(attr)
86
+ next if value.nil?
87
+ hash[param] = _to_hash(value)
88
+ end
89
+ hash
90
+ end
91
+
92
+ private
93
+
94
+ # Outputs non-array value in the form of hash
95
+ # For object, use to_hash. Otherwise, just return the value
96
+ # @param [Object] value Any valid value
97
+ # @return [Hash] Returns the value in the form of hash
98
+ def _to_hash(value)
99
+ if value.is_a?(Array)
100
+ value.compact.map{ |v| _to_hash(v) }
101
+ elsif value.is_a?(Hash)
102
+ {}.tap do |hash|
103
+ value.each { |k, v| hash[k] = _to_hash(v) }
104
+ end
105
+ elsif value.respond_to? :to_hash
106
+ value.to_hash
107
+ else
108
+ value
109
+ end
110
+ end
111
+
112
+
113
+
114
+ # Attribute mapping from ruby-style variable name to JSON key.
115
+ def self.attribute_map
116
+ {
117
+ :'region_key' => :'regionKey'
118
+ }
119
+ end
120
+
121
+ # Attribute type mapping.
122
+ def self.swagger_types
123
+ {
124
+ :'region_key' => :'String'
125
+ }
126
+ end
127
+ end
128
+ end