oci 2.4.7 → 2.5.0

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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -1
  3. data/lib/oci.rb +1 -0
  4. data/lib/oci/announcements_service/announcement_client.rb +47 -36
  5. data/lib/oci/announcements_service/announcements_service.rb +0 -1
  6. data/lib/oci/announcements_service/models/affected_resource.rb +4 -4
  7. data/lib/oci/announcements_service/models/announcement.rb +10 -14
  8. data/lib/oci/announcements_service/models/announcement_summary.rb +1 -1
  9. data/lib/oci/announcements_service/models/announcement_user_status_details.rb +5 -5
  10. data/lib/oci/announcements_service/models/announcements_collection.rb +3 -3
  11. data/lib/oci/announcements_service/models/base_announcement.rb +28 -18
  12. data/lib/oci/audit/audit_client.rb +17 -10
  13. data/lib/oci/container_engine/container_engine_client.rb +17 -10
  14. data/lib/oci/core/blockstorage_client.rb +17 -10
  15. data/lib/oci/core/compute_client.rb +17 -10
  16. data/lib/oci/core/compute_management_client.rb +17 -10
  17. data/lib/oci/core/models/create_subnet_details.rb +1 -1
  18. data/lib/oci/core/models/subnet.rb +1 -1
  19. data/lib/oci/core/virtual_network_client.rb +17 -10
  20. data/lib/oci/database/database_client.rb +17 -10
  21. data/lib/oci/dns/dns_client.rb +17 -10
  22. data/lib/oci/email/email_client.rb +17 -10
  23. data/lib/oci/file_storage/file_storage_client.rb +17 -10
  24. data/lib/oci/healthchecks/health_checks_client.rb +17 -10
  25. data/lib/oci/identity/identity_client.rb +17 -10
  26. data/lib/oci/key_management/kms_crypto_client.rb +4 -5
  27. data/lib/oci/key_management/kms_management_client.rb +7 -8
  28. data/lib/oci/key_management/kms_vault_client.rb +20 -13
  29. data/lib/oci/key_management/models/create_key_details.rb +34 -1
  30. data/lib/oci/key_management/models/create_vault_details.rb +34 -1
  31. data/lib/oci/key_management/models/key_version.rb +1 -1
  32. data/lib/oci/key_management/models/update_key_details.rb +37 -4
  33. data/lib/oci/key_management/models/update_vault_details.rb +37 -4
  34. data/lib/oci/load_balancer/load_balancer_client.rb +17 -10
  35. data/lib/oci/object_storage/object_storage_client.rb +17 -10
  36. data/lib/oci/regions.rb +20 -4
  37. data/lib/oci/resource_search/resource_search_client.rb +17 -10
  38. data/lib/oci/streaming/models/create_cursor_details.rb +205 -0
  39. data/lib/oci/streaming/models/create_group_cursor_details.rb +237 -0
  40. data/lib/oci/streaming/models/create_stream_details.rb +227 -0
  41. data/lib/oci/streaming/models/cursor.rb +150 -0
  42. data/lib/oci/streaming/models/group.rb +179 -0
  43. data/lib/oci/streaming/models/message.rb +199 -0
  44. data/lib/oci/streaming/models/partition_reservation.rb +192 -0
  45. data/lib/oci/streaming/models/put_messages_details.rb +149 -0
  46. data/lib/oci/{announcements_service/models/notification_followup_details.rb → streaming/models/put_messages_details_entry.rb} +19 -22
  47. data/lib/oci/streaming/models/put_messages_result.rb +165 -0
  48. data/lib/oci/streaming/models/put_messages_result_entry.rb +196 -0
  49. data/lib/oci/streaming/models/stream.rb +319 -0
  50. data/lib/oci/streaming/models/stream_summary.rb +291 -0
  51. data/lib/oci/streaming/models/update_group_details.rb +176 -0
  52. data/lib/oci/streaming/models/update_stream_details.rb +174 -0
  53. data/lib/oci/streaming/stream_admin_client.rb +432 -0
  54. data/lib/oci/streaming/stream_admin_client_composite_operations.rb +143 -0
  55. data/lib/oci/streaming/stream_client.rb +602 -0
  56. data/lib/oci/streaming/stream_client_composite_operations.rb +24 -0
  57. data/lib/oci/streaming/streaming.rb +35 -0
  58. data/lib/oci/streaming/util.rb +2 -0
  59. data/lib/oci/version.rb +1 -1
  60. data/lib/oci/waas/waas_client.rb +17 -10
  61. metadata +51 -3
@@ -10,12 +10,25 @@ module OCI
10
10
  # @return [String]
11
11
  attr_accessor :compartment_id
12
12
 
13
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
14
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
15
+ #
16
+ # @return [Hash<String, Hash<String, Object>>]
17
+ attr_accessor :defined_tags
18
+
13
19
  # **[Required]** A user-friendly name for the key. It does not have to be unique, and it is changeable.
14
20
  # Avoid entering confidential information.
15
21
  #
16
22
  # @return [String]
17
23
  attr_accessor :display_name
18
24
 
25
+ # Simple key-value pair that is applied without any predefined name, type, or scope.
26
+ # Exists for cross-compatibility only.
27
+ # Example: `{\"bar-key\": \"value\"}`
28
+ #
29
+ # @return [Hash<String, String>]
30
+ attr_accessor :freeform_tags
31
+
19
32
  # This attribute is required.
20
33
  # @return [OCI::KeyManagement::Models::KeyShape]
21
34
  attr_accessor :key_shape
@@ -25,7 +38,9 @@ module OCI
25
38
  {
26
39
  # rubocop:disable Style/SymbolLiteral
27
40
  'compartment_id': :'compartmentId',
41
+ 'defined_tags': :'definedTags',
28
42
  'display_name': :'displayName',
43
+ 'freeform_tags': :'freeformTags',
29
44
  'key_shape': :'keyShape'
30
45
  # rubocop:enable Style/SymbolLiteral
31
46
  }
@@ -36,7 +51,9 @@ module OCI
36
51
  {
37
52
  # rubocop:disable Style/SymbolLiteral
38
53
  'compartment_id': :'String',
54
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
39
55
  'display_name': :'String',
56
+ 'freeform_tags': :'Hash<String, String>',
40
57
  'key_shape': :'OCI::KeyManagement::Models::KeyShape'
41
58
  # rubocop:enable Style/SymbolLiteral
42
59
  }
@@ -49,7 +66,9 @@ module OCI
49
66
  # Initializes the object
50
67
  # @param [Hash] attributes Model attributes in the form of hash
51
68
  # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
69
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
52
70
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
71
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
53
72
  # @option attributes [OCI::KeyManagement::Models::KeyShape] :key_shape The value to assign to the {#key_shape} property
54
73
  def initialize(attributes = {})
55
74
  return unless attributes.is_a?(Hash)
@@ -63,12 +82,24 @@ module OCI
63
82
 
64
83
  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
65
84
 
85
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
86
+
87
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
88
+
89
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
90
+
66
91
  self.display_name = attributes[:'displayName'] if attributes[:'displayName']
67
92
 
68
93
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
69
94
 
70
95
  self.display_name = attributes[:'display_name'] if attributes[:'display_name']
71
96
 
97
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
98
+
99
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
100
+
101
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
102
+
72
103
  self.key_shape = attributes[:'keyShape'] if attributes[:'keyShape']
73
104
 
74
105
  raise 'You cannot provide both :keyShape and :key_shape' if attributes.key?(:'keyShape') && attributes.key?(:'key_shape')
@@ -88,7 +119,9 @@ module OCI
88
119
 
89
120
  self.class == other.class &&
90
121
  compartment_id == other.compartment_id &&
122
+ defined_tags == other.defined_tags &&
91
123
  display_name == other.display_name &&
124
+ freeform_tags == other.freeform_tags &&
92
125
  key_shape == other.key_shape
93
126
  end
94
127
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
@@ -105,7 +138,7 @@ module OCI
105
138
  # Calculates hash code according to all attributes.
106
139
  # @return [Fixnum] Hash code
107
140
  def hash
108
- [compartment_id, display_name, key_shape].hash
141
+ [compartment_id, defined_tags, display_name, freeform_tags, key_shape].hash
109
142
  end
110
143
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
111
144
 
@@ -14,12 +14,25 @@ module OCI
14
14
  # @return [String]
15
15
  attr_accessor :compartment_id
16
16
 
17
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
18
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
19
+ #
20
+ # @return [Hash<String, Hash<String, Object>>]
21
+ attr_accessor :defined_tags
22
+
17
23
  # **[Required]** A user-friendly name for the vault. It does not have to be unique, and it is changeable.
18
24
  # Avoid entering confidential information.
19
25
  #
20
26
  # @return [String]
21
27
  attr_accessor :display_name
22
28
 
29
+ # Simple key-value pair that is applied without any predefined name, type, or scope.
30
+ # Exists for cross-compatibility only.
31
+ # Example: `{\"bar-key\": \"value\"}`
32
+ #
33
+ # @return [Hash<String, String>]
34
+ attr_accessor :freeform_tags
35
+
23
36
  # **[Required]** The type of vault to create. Each type of vault stores the key with different degrees of isolation and has different options and pricing.
24
37
  #
25
38
  # @return [String]
@@ -30,7 +43,9 @@ module OCI
30
43
  {
31
44
  # rubocop:disable Style/SymbolLiteral
32
45
  'compartment_id': :'compartmentId',
46
+ 'defined_tags': :'definedTags',
33
47
  'display_name': :'displayName',
48
+ 'freeform_tags': :'freeformTags',
34
49
  'vault_type': :'vaultType'
35
50
  # rubocop:enable Style/SymbolLiteral
36
51
  }
@@ -41,7 +56,9 @@ module OCI
41
56
  {
42
57
  # rubocop:disable Style/SymbolLiteral
43
58
  'compartment_id': :'String',
59
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
44
60
  'display_name': :'String',
61
+ 'freeform_tags': :'Hash<String, String>',
45
62
  'vault_type': :'String'
46
63
  # rubocop:enable Style/SymbolLiteral
47
64
  }
@@ -54,7 +71,9 @@ module OCI
54
71
  # Initializes the object
55
72
  # @param [Hash] attributes Model attributes in the form of hash
56
73
  # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
74
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
57
75
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
76
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
58
77
  # @option attributes [String] :vault_type The value to assign to the {#vault_type} property
59
78
  def initialize(attributes = {})
60
79
  return unless attributes.is_a?(Hash)
@@ -68,12 +87,24 @@ module OCI
68
87
 
69
88
  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
70
89
 
90
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
91
+
92
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
93
+
94
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
95
+
71
96
  self.display_name = attributes[:'displayName'] if attributes[:'displayName']
72
97
 
73
98
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
74
99
 
75
100
  self.display_name = attributes[:'display_name'] if attributes[:'display_name']
76
101
 
102
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
103
+
104
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
105
+
106
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
107
+
77
108
  self.vault_type = attributes[:'vaultType'] if attributes[:'vaultType']
78
109
 
79
110
  raise 'You cannot provide both :vaultType and :vault_type' if attributes.key?(:'vaultType') && attributes.key?(:'vault_type')
@@ -103,7 +134,9 @@ module OCI
103
134
 
104
135
  self.class == other.class &&
105
136
  compartment_id == other.compartment_id &&
137
+ defined_tags == other.defined_tags &&
106
138
  display_name == other.display_name &&
139
+ freeform_tags == other.freeform_tags &&
107
140
  vault_type == other.vault_type
108
141
  end
109
142
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
@@ -120,7 +153,7 @@ module OCI
120
153
  # Calculates hash code according to all attributes.
121
154
  # @return [Fixnum] Hash code
122
155
  def hash
123
- [compartment_id, display_name, vault_type].hash
156
+ [compartment_id, defined_tags, display_name, freeform_tags, vault_type].hash
124
157
  end
125
158
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
126
159
 
@@ -20,7 +20,7 @@ module OCI
20
20
 
21
21
  # **[Required]** The date and time this key version was created, expressed in [RFC 3339](https://tools.ietf.org/html/rfc3339) timestamp format.
22
22
  #
23
- # Example: `2018-04-03T21:10:29.600Z`
23
+ # Example: \"2018-04-03T21:10:29.600Z\"
24
24
  #
25
25
  # @return [DateTime]
26
26
  attr_accessor :time_created
@@ -6,17 +6,32 @@ require 'date'
6
6
  module OCI
7
7
  # UpdateKeyDetails model.
8
8
  class KeyManagement::Models::UpdateKeyDetails # rubocop:disable Metrics/LineLength
9
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
10
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
11
+ #
12
+ # @return [Hash<String, Hash<String, Object>>]
13
+ attr_accessor :defined_tags
14
+
9
15
  # A user-friendly name for the key. It does not have to be unique, and it is changeable.
10
16
  # Avoid entering confidential information.
11
17
  #
12
18
  # @return [String]
13
19
  attr_accessor :display_name
14
20
 
21
+ # Simple key-value pair that is applied without any predefined name, type, or scope.
22
+ # Exists for cross-compatibility only.
23
+ # Example: `{\"bar-key\": \"value\"}`
24
+ #
25
+ # @return [Hash<String, String>]
26
+ attr_accessor :freeform_tags
27
+
15
28
  # Attribute mapping from ruby-style variable name to JSON key.
16
29
  def self.attribute_map
17
30
  {
18
31
  # rubocop:disable Style/SymbolLiteral
19
- 'display_name': :'displayName'
32
+ 'defined_tags': :'definedTags',
33
+ 'display_name': :'displayName',
34
+ 'freeform_tags': :'freeformTags'
20
35
  # rubocop:enable Style/SymbolLiteral
21
36
  }
22
37
  end
@@ -25,7 +40,9 @@ module OCI
25
40
  def self.swagger_types
26
41
  {
27
42
  # rubocop:disable Style/SymbolLiteral
28
- 'display_name': :'String'
43
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
44
+ 'display_name': :'String',
45
+ 'freeform_tags': :'Hash<String, String>'
29
46
  # rubocop:enable Style/SymbolLiteral
30
47
  }
31
48
  end
@@ -36,18 +53,32 @@ module OCI
36
53
 
37
54
  # Initializes the object
38
55
  # @param [Hash] attributes Model attributes in the form of hash
56
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
39
57
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
58
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
40
59
  def initialize(attributes = {})
41
60
  return unless attributes.is_a?(Hash)
42
61
 
43
62
  # convert string to symbol for hash key
44
63
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
45
64
 
65
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
66
+
67
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
68
+
69
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
70
+
46
71
  self.display_name = attributes[:'displayName'] if attributes[:'displayName']
47
72
 
48
73
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
49
74
 
50
75
  self.display_name = attributes[:'display_name'] if attributes[:'display_name']
76
+
77
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
78
+
79
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
80
+
81
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
51
82
  end
52
83
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
53
84
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -61,7 +92,9 @@ module OCI
61
92
  return true if equal?(other)
62
93
 
63
94
  self.class == other.class &&
64
- display_name == other.display_name
95
+ defined_tags == other.defined_tags &&
96
+ display_name == other.display_name &&
97
+ freeform_tags == other.freeform_tags
65
98
  end
66
99
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
67
100
 
@@ -77,7 +110,7 @@ module OCI
77
110
  # Calculates hash code according to all attributes.
78
111
  # @return [Fixnum] Hash code
79
112
  def hash
80
- [display_name].hash
113
+ [defined_tags, display_name, freeform_tags].hash
81
114
  end
82
115
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
83
116
 
@@ -6,17 +6,32 @@ require 'date'
6
6
  module OCI
7
7
  # UpdateVaultDetails model.
8
8
  class KeyManagement::Models::UpdateVaultDetails # rubocop:disable Metrics/LineLength
9
+ # Usage of predefined tag keys. These predefined keys are scoped to namespaces.
10
+ # Example: `{\"foo-namespace\": {\"bar-key\": \"foo-value\"}}`
11
+ #
12
+ # @return [Hash<String, Hash<String, Object>>]
13
+ attr_accessor :defined_tags
14
+
9
15
  # A user-friendly name for the vault. It does not have to be unique, and it is changeable.
10
16
  # Avoid entering confidential information.
11
17
  #
12
18
  # @return [String]
13
19
  attr_accessor :display_name
14
20
 
21
+ # Simple key-value pair that is applied without any predefined name, type, or scope.
22
+ # Exists for cross-compatibility only.
23
+ # Example: `{\"bar-key\": \"value\"}`
24
+ #
25
+ # @return [Hash<String, String>]
26
+ attr_accessor :freeform_tags
27
+
15
28
  # Attribute mapping from ruby-style variable name to JSON key.
16
29
  def self.attribute_map
17
30
  {
18
31
  # rubocop:disable Style/SymbolLiteral
19
- 'display_name': :'displayName'
32
+ 'defined_tags': :'definedTags',
33
+ 'display_name': :'displayName',
34
+ 'freeform_tags': :'freeformTags'
20
35
  # rubocop:enable Style/SymbolLiteral
21
36
  }
22
37
  end
@@ -25,7 +40,9 @@ module OCI
25
40
  def self.swagger_types
26
41
  {
27
42
  # rubocop:disable Style/SymbolLiteral
28
- 'display_name': :'String'
43
+ 'defined_tags': :'Hash<String, Hash<String, Object>>',
44
+ 'display_name': :'String',
45
+ 'freeform_tags': :'Hash<String, String>'
29
46
  # rubocop:enable Style/SymbolLiteral
30
47
  }
31
48
  end
@@ -36,18 +53,32 @@ module OCI
36
53
 
37
54
  # Initializes the object
38
55
  # @param [Hash] attributes Model attributes in the form of hash
56
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
39
57
  # @option attributes [String] :display_name The value to assign to the {#display_name} property
58
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
40
59
  def initialize(attributes = {})
41
60
  return unless attributes.is_a?(Hash)
42
61
 
43
62
  # convert string to symbol for hash key
44
63
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
45
64
 
65
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
66
+
67
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
68
+
69
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
70
+
46
71
  self.display_name = attributes[:'displayName'] if attributes[:'displayName']
47
72
 
48
73
  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
49
74
 
50
75
  self.display_name = attributes[:'display_name'] if attributes[:'display_name']
76
+
77
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
78
+
79
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
80
+
81
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
51
82
  end
52
83
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
53
84
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -61,7 +92,9 @@ module OCI
61
92
  return true if equal?(other)
62
93
 
63
94
  self.class == other.class &&
64
- display_name == other.display_name
95
+ defined_tags == other.defined_tags &&
96
+ display_name == other.display_name &&
97
+ freeform_tags == other.freeform_tags
65
98
  end
66
99
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
67
100
 
@@ -77,7 +110,7 @@ module OCI
77
110
  # Calculates hash code according to all attributes.
78
111
  # @return [Fixnum] Hash code
79
112
  def hash
80
- [display_name].hash
113
+ [defined_tags, display_name, freeform_tags].hash
81
114
  end
82
115
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
83
116
 
@@ -26,20 +26,22 @@ module OCI
26
26
  # @return [String]
27
27
  attr_reader :region
28
28
 
29
- # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
29
+ # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
30
30
 
31
31
 
32
32
  # Creates a new LoadBalancerClient.
33
33
  # Notes:
34
34
  # If a config is not specified, then the global OCI.config will be used.
35
- # This client is not thread-safe
36
35
  #
37
- # A region must be specified in either the config or the region parameter. If specified in both,
38
- # then the region parameter will be used.
36
+ # This client is not thread-safe
39
37
  #
38
+ # Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the
39
+ # region. A region may be specified in the config or via or the region parameter. If specified in both, then the
40
+ # region parameter will be used.
40
41
  # @param [Config] config A Config object.
41
42
  # @param [String] region A region used to determine the service endpoint. This will usually
42
43
  # correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
44
+ # @param [String] endpoint The fully qualified endpoint URL
43
45
  # @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
44
46
  # a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
45
47
  # so that the instance principals signer can be provided to the client
@@ -48,7 +50,7 @@ module OCI
48
50
  # @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
49
51
  # apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
50
52
  # will not perform any retries
51
- def initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil)
53
+ def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
52
54
  # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
53
55
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
54
56
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
@@ -74,11 +76,16 @@ module OCI
74
76
  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
75
77
  @retry_config = retry_config
76
78
 
77
- region ||= config.region
78
- region ||= signer.region if signer.respond_to?(:region)
79
- self.region = region
79
+ if endpoint
80
+ @endpoint = endpoint + '/20170115'
81
+ else
82
+ region ||= config.region
83
+ region ||= signer.region if signer.respond_to?(:region)
84
+ self.region = region
85
+ end
86
+ logger.info "LoadBalancerClient endpoint set to '#{@endpoint}'." if logger
80
87
  end
81
- # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
88
+ # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines, Metrics/PerceivedComplexity
82
89
 
83
90
  # Set the region that will be used to determine the service endpoint.
84
91
  # This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
@@ -89,7 +96,7 @@ module OCI
89
96
  raise 'A region must be specified.' unless @region
90
97
 
91
98
  @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://iaas.{region}.oraclecloud.com') + '/20170115'
92
- logger.info "LoadBalancerClient endpoint set to '#{endpoint}'." if logger
99
+ logger.info "LoadBalancerClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
93
100
  end
94
101
 
95
102
  # @return [Logger] The logger for this client. May be nil.