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
@@ -4,22 +4,23 @@ require 'date'
4
4
 
5
5
  # rubocop:disable Lint/UnneededCopDisableDirective
6
6
  module OCI
7
- # Information represents a notification follow-up
8
- class AnnouncementsService::Models::NotificationFollowupDetails # rubocop:disable Metrics/LineLength
9
- # The follow-up message, a markdown format input
7
+ # Object that represents a message to emit to a stream.
8
+ class Streaming::Models::PutMessagesDetailsEntry # rubocop:disable Metrics/LineLength
9
+ # The key of the message, expressed as a byte array up to 256 bytes in size. Messages with the same key are stored in the same partition.
10
+ #
10
11
  # @return [String]
11
- attr_accessor :message
12
+ attr_accessor :key
12
13
 
13
- # When the update is made
14
- # @return [DateTime]
15
- attr_accessor :time_created
14
+ # **[Required]** The message, expressed as a byte array up to 1 MiB in size.
15
+ # @return [String]
16
+ attr_accessor :value
16
17
 
17
18
  # Attribute mapping from ruby-style variable name to JSON key.
18
19
  def self.attribute_map
19
20
  {
20
21
  # rubocop:disable Style/SymbolLiteral
21
- 'message': :'message',
22
- 'time_created': :'timeCreated'
22
+ 'key': :'key',
23
+ 'value': :'value'
23
24
  # rubocop:enable Style/SymbolLiteral
24
25
  }
25
26
  end
@@ -28,8 +29,8 @@ module OCI
28
29
  def self.swagger_types
29
30
  {
30
31
  # rubocop:disable Style/SymbolLiteral
31
- 'message': :'String',
32
- 'time_created': :'DateTime'
32
+ 'key': :'String',
33
+ 'value': :'String'
33
34
  # rubocop:enable Style/SymbolLiteral
34
35
  }
35
36
  end
@@ -40,21 +41,17 @@ module OCI
40
41
 
41
42
  # Initializes the object
42
43
  # @param [Hash] attributes Model attributes in the form of hash
43
- # @option attributes [String] :message The value to assign to the {#message} property
44
- # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
44
+ # @option attributes [String] :key The value to assign to the {#key} property
45
+ # @option attributes [String] :value The value to assign to the {#value} property
45
46
  def initialize(attributes = {})
46
47
  return unless attributes.is_a?(Hash)
47
48
 
48
49
  # convert string to symbol for hash key
49
50
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
51
 
51
- self.message = attributes[:'message'] if attributes[:'message']
52
-
53
- self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
54
-
55
- raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
52
+ self.key = attributes[:'key'] if attributes[:'key']
56
53
 
57
- self.time_created = attributes[:'time_created'] if attributes[:'time_created']
54
+ self.value = attributes[:'value'] if attributes[:'value']
58
55
  end
59
56
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
60
57
  # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
@@ -68,8 +65,8 @@ module OCI
68
65
  return true if equal?(other)
69
66
 
70
67
  self.class == other.class &&
71
- message == other.message &&
72
- time_created == other.time_created
68
+ key == other.key &&
69
+ value == other.value
73
70
  end
74
71
  # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
75
72
 
@@ -85,7 +82,7 @@ module OCI
85
82
  # Calculates hash code according to all attributes.
86
83
  # @return [Fixnum] Hash code
87
84
  def hash
88
- [message, time_created].hash
85
+ [key, value].hash
89
86
  end
90
87
  # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
91
88
 
@@ -0,0 +1,165 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective
6
+ module OCI
7
+ # The response to a {#put_messages put_messages} request. It indicates the number
8
+ # of failed messages as well as an array of results for successful and failed messages.
9
+ #
10
+ class Streaming::Models::PutMessagesResult # rubocop:disable Metrics/LineLength
11
+ # **[Required]** The number of messages that failed to be added to the stream.
12
+ # @return [Integer]
13
+ attr_accessor :failures
14
+
15
+ # An array of items representing the result of each message.
16
+ # The order is guaranteed to be the same as in the `PutMessagesDetails` object.
17
+ # If a message was successfully appended to the stream, the entry includes the `offset`, `partition`, and `timestamp`.
18
+ # If a message failed to be appended to the stream, the entry includes the `error` and `errorMessage`.
19
+ #
20
+ # @return [Array<OCI::Streaming::Models::PutMessagesResultEntry>]
21
+ attr_accessor :entries
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ # rubocop:disable Style/SymbolLiteral
27
+ 'failures': :'failures',
28
+ 'entries': :'entries'
29
+ # rubocop:enable Style/SymbolLiteral
30
+ }
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.swagger_types
35
+ {
36
+ # rubocop:disable Style/SymbolLiteral
37
+ 'failures': :'Integer',
38
+ 'entries': :'Array<OCI::Streaming::Models::PutMessagesResultEntry>'
39
+ # rubocop:enable Style/SymbolLiteral
40
+ }
41
+ end
42
+
43
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
44
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
45
+
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ # @option attributes [Integer] :failures The value to assign to the {#failures} property
50
+ # @option attributes [Array<OCI::Streaming::Models::PutMessagesResultEntry>] :entries The value to assign to the {#entries} property
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ self.failures = attributes[:'failures'] if attributes[:'failures']
58
+
59
+ self.entries = attributes[:'entries'] if attributes[:'entries']
60
+ end
61
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
62
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
63
+
64
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
65
+
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] other the other object to be compared
69
+ def ==(other)
70
+ return true if equal?(other)
71
+
72
+ self.class == other.class &&
73
+ failures == other.failures &&
74
+ entries == other.entries
75
+ end
76
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
77
+
78
+ # @see the `==` method
79
+ # @param [Object] other the other object to be compared
80
+ def eql?(other)
81
+ self == other
82
+ end
83
+
84
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
85
+
86
+
87
+ # Calculates hash code according to all attributes.
88
+ # @return [Fixnum] Hash code
89
+ def hash
90
+ [failures, entries].hash
91
+ end
92
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
93
+
94
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
95
+
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def build_from_hash(attributes)
101
+ return nil unless attributes.is_a?(Hash)
102
+
103
+ self.class.swagger_types.each_pair do |key, type|
104
+ if type =~ /^Array<(.*)>/i
105
+ # check to ensure the input is an array given that the the attribute
106
+ # is documented as an array but the input is not
107
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
108
+ public_method("#{key}=").call(
109
+ attributes[self.class.attribute_map[key]]
110
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
111
+ )
112
+ end
113
+ elsif !attributes[self.class.attribute_map[key]].nil?
114
+ public_method("#{key}=").call(
115
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
116
+ )
117
+ end
118
+ # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
124
+
125
+ # Returns the string representation of the object
126
+ # @return [String] String presentation of the object
127
+ def to_s
128
+ to_hash.to_s
129
+ end
130
+
131
+ # Returns the object in the form of hash
132
+ # @return [Hash] Returns the object in the form of hash
133
+ def to_hash
134
+ hash = {}
135
+ self.class.attribute_map.each_pair do |attr, param|
136
+ value = public_method(attr).call
137
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
138
+
139
+ hash[param] = _to_hash(value)
140
+ end
141
+ hash
142
+ end
143
+
144
+ private
145
+
146
+ # Outputs non-array value in the form of hash
147
+ # For object, use to_hash. Otherwise, just return the value
148
+ # @param [Object] value Any valid value
149
+ # @return [Hash] Returns the value in the form of hash
150
+ def _to_hash(value)
151
+ if value.is_a?(Array)
152
+ value.compact.map { |v| _to_hash(v) }
153
+ elsif value.is_a?(Hash)
154
+ {}.tap do |hash|
155
+ value.each { |k, v| hash[k] = _to_hash(v) }
156
+ end
157
+ elsif value.respond_to? :to_hash
158
+ value.to_hash
159
+ else
160
+ value
161
+ end
162
+ end
163
+ end
164
+ end
165
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -0,0 +1,196 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ # rubocop:disable Lint/UnneededCopDisableDirective
6
+ module OCI
7
+ # Represents the result of a {#put_messages put_messages} request, whether it was successful or not.
8
+ # If a message was successfully appended to the stream, the entry includes the `offset`, `partition`, and `timestamp`.
9
+ # If the message failed to be appended to the stream, the entry includes the `error` and `errorMessage`.
10
+ #
11
+ class Streaming::Models::PutMessagesResultEntry # rubocop:disable Metrics/LineLength
12
+ # The ID of the partition where the message was stored.
13
+ # @return [String]
14
+ attr_accessor :partition
15
+
16
+ # The offset of the message in the partition.
17
+ # @return [Integer]
18
+ attr_accessor :offset
19
+
20
+ # The timestamp indicating when the server appended the message to the stream.
21
+ # @return [DateTime]
22
+ attr_accessor :timestamp
23
+
24
+ # The error code, in case the message was not successfully appended to the stream.
25
+ # @return [String]
26
+ attr_accessor :error
27
+
28
+ # A human-readable error message associated with the error code.
29
+ # @return [String]
30
+ attr_accessor :error_message
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ # rubocop:disable Style/SymbolLiteral
36
+ 'partition': :'partition',
37
+ 'offset': :'offset',
38
+ 'timestamp': :'timestamp',
39
+ 'error': :'error',
40
+ 'error_message': :'errorMessage'
41
+ # rubocop:enable Style/SymbolLiteral
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.swagger_types
47
+ {
48
+ # rubocop:disable Style/SymbolLiteral
49
+ 'partition': :'String',
50
+ 'offset': :'Integer',
51
+ 'timestamp': :'DateTime',
52
+ 'error': :'String',
53
+ 'error_message': :'String'
54
+ # rubocop:enable Style/SymbolLiteral
55
+ }
56
+ end
57
+
58
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
59
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
60
+
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ # @option attributes [String] :partition The value to assign to the {#partition} property
65
+ # @option attributes [Integer] :offset The value to assign to the {#offset} property
66
+ # @option attributes [DateTime] :timestamp The value to assign to the {#timestamp} property
67
+ # @option attributes [String] :error The value to assign to the {#error} property
68
+ # @option attributes [String] :error_message The value to assign to the {#error_message} property
69
+ def initialize(attributes = {})
70
+ return unless attributes.is_a?(Hash)
71
+
72
+ # convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
74
+
75
+ self.partition = attributes[:'partition'] if attributes[:'partition']
76
+
77
+ self.offset = attributes[:'offset'] if attributes[:'offset']
78
+
79
+ self.timestamp = attributes[:'timestamp'] if attributes[:'timestamp']
80
+
81
+ self.error = attributes[:'error'] if attributes[:'error']
82
+
83
+ self.error_message = attributes[:'errorMessage'] if attributes[:'errorMessage']
84
+
85
+ raise 'You cannot provide both :errorMessage and :error_message' if attributes.key?(:'errorMessage') && attributes.key?(:'error_message')
86
+
87
+ self.error_message = attributes[:'error_message'] if attributes[:'error_message']
88
+ end
89
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
90
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
91
+
92
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
93
+
94
+
95
+ # Checks equality by comparing each attribute.
96
+ # @param [Object] other the other object to be compared
97
+ def ==(other)
98
+ return true if equal?(other)
99
+
100
+ self.class == other.class &&
101
+ partition == other.partition &&
102
+ offset == other.offset &&
103
+ timestamp == other.timestamp &&
104
+ error == other.error &&
105
+ error_message == other.error_message
106
+ end
107
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
108
+
109
+ # @see the `==` method
110
+ # @param [Object] other the other object to be compared
111
+ def eql?(other)
112
+ self == other
113
+ end
114
+
115
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
116
+
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Fixnum] Hash code
120
+ def hash
121
+ [partition, offset, timestamp, error, error_message].hash
122
+ end
123
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
124
+
125
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
126
+
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+
134
+ self.class.swagger_types.each_pair do |key, type|
135
+ if type =~ /^Array<(.*)>/i
136
+ # check to ensure the input is an array given that the the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ public_method("#{key}=").call(
140
+ attributes[self.class.attribute_map[key]]
141
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
142
+ )
143
+ end
144
+ elsif !attributes[self.class.attribute_map[key]].nil?
145
+ public_method("#{key}=").call(
146
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
147
+ )
148
+ end
149
+ # or else data not found in attributes(hash), not an issue as the data can be optional
150
+ end
151
+
152
+ self
153
+ end
154
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
155
+
156
+ # Returns the string representation of the object
157
+ # @return [String] String presentation of the object
158
+ def to_s
159
+ to_hash.to_s
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = public_method(attr).call
168
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
169
+
170
+ hash[param] = _to_hash(value)
171
+ end
172
+ hash
173
+ end
174
+
175
+ private
176
+
177
+ # Outputs non-array value in the form of hash
178
+ # For object, use to_hash. Otherwise, just return the value
179
+ # @param [Object] value Any valid value
180
+ # @return [Hash] Returns the value in the form of hash
181
+ def _to_hash(value)
182
+ if value.is_a?(Array)
183
+ value.compact.map { |v| _to_hash(v) }
184
+ elsif value.is_a?(Hash)
185
+ {}.tap do |hash|
186
+ value.each { |k, v| hash[k] = _to_hash(v) }
187
+ end
188
+ elsif value.respond_to? :to_hash
189
+ value.to_hash
190
+ else
191
+ value
192
+ end
193
+ end
194
+ end
195
+ end
196
+ # rubocop:enable Lint/UnneededCopDisableDirective