oci 2.4.5 → 2.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,163 @@
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
+ # Information represents a notification follow-up
8
+ class AnnouncementsService::Models::NotificationFollowupDetails # rubocop:disable Metrics/LineLength
9
+ # The follow-up message, a markdown format input
10
+ # @return [String]
11
+ attr_accessor :message
12
+
13
+ # When the update is made
14
+ # @return [DateTime]
15
+ attr_accessor :time_created
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ # rubocop:disable Style/SymbolLiteral
21
+ 'message': :'message',
22
+ 'time_created': :'timeCreated'
23
+ # rubocop:enable Style/SymbolLiteral
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ # rubocop:disable Style/SymbolLiteral
31
+ 'message': :'String',
32
+ 'time_created': :'DateTime'
33
+ # rubocop:enable Style/SymbolLiteral
34
+ }
35
+ end
36
+
37
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
38
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
39
+
40
+
41
+ # Initializes the object
42
+ # @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
45
+ def initialize(attributes = {})
46
+ return unless attributes.is_a?(Hash)
47
+
48
+ # convert string to symbol for hash key
49
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
50
+
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')
56
+
57
+ self.time_created = attributes[:'time_created'] if attributes[:'time_created']
58
+ end
59
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
60
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
61
+
62
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
63
+
64
+
65
+ # Checks equality by comparing each attribute.
66
+ # @param [Object] other the other object to be compared
67
+ def ==(other)
68
+ return true if equal?(other)
69
+
70
+ self.class == other.class &&
71
+ message == other.message &&
72
+ time_created == other.time_created
73
+ end
74
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
75
+
76
+ # @see the `==` method
77
+ # @param [Object] other the other object to be compared
78
+ def eql?(other)
79
+ self == other
80
+ end
81
+
82
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
83
+
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Fixnum] Hash code
87
+ def hash
88
+ [message, time_created].hash
89
+ end
90
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
91
+
92
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
93
+
94
+
95
+ # Builds the object from hash
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ # @return [Object] Returns the model itself
98
+ def build_from_hash(attributes)
99
+ return nil unless attributes.is_a?(Hash)
100
+
101
+ self.class.swagger_types.each_pair do |key, type|
102
+ if type =~ /^Array<(.*)>/i
103
+ # check to ensure the input is an array given that the the attribute
104
+ # is documented as an array but the input is not
105
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
106
+ public_method("#{key}=").call(
107
+ attributes[self.class.attribute_map[key]]
108
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
109
+ )
110
+ end
111
+ elsif !attributes[self.class.attribute_map[key]].nil?
112
+ public_method("#{key}=").call(
113
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
114
+ )
115
+ end
116
+ # or else data not found in attributes(hash), not an issue as the data can be optional
117
+ end
118
+
119
+ self
120
+ end
121
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
122
+
123
+ # Returns the string representation of the object
124
+ # @return [String] String presentation of the object
125
+ def to_s
126
+ to_hash.to_s
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = public_method(attr).call
135
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
136
+
137
+ hash[param] = _to_hash(value)
138
+ end
139
+ hash
140
+ end
141
+
142
+ private
143
+
144
+ # Outputs non-array value in the form of hash
145
+ # For object, use to_hash. Otherwise, just return the value
146
+ # @param [Object] value Any valid value
147
+ # @return [Hash] Returns the value in the form of hash
148
+ def _to_hash(value)
149
+ if value.is_a?(Array)
150
+ value.compact.map { |v| _to_hash(v) }
151
+ elsif value.is_a?(Hash)
152
+ {}.tap do |hash|
153
+ value.each { |k, v| hash[k] = _to_hash(v) }
154
+ end
155
+ elsif value.respond_to? :to_hash
156
+ value.to_hash
157
+ else
158
+ value
159
+ end
160
+ end
161
+ end
162
+ end
163
+ # rubocop:enable Lint/UnneededCopDisableDirective
@@ -0,0 +1,2 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
@@ -37,6 +37,7 @@ module OCI
37
37
 
38
38
  # --- Start of service prefixes ---
39
39
  SERVICE_ENDPOINT_PREFIX_MAPPING = {
40
+ AnnouncementClient: 'announcements',
40
41
  AuditClient: 'audit',
41
42
  Auth: 'auth',
42
43
  BlockstorageClient: 'iaas',
@@ -1,5 +1,5 @@
1
1
  # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  module OCI
4
- VERSION = '2.4.5'.freeze
4
+ VERSION = '2.4.6'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oci
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.5
4
+ version: 2.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oracle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-23 00:00:00.000000000 Z
11
+ date: 2019-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -188,6 +188,17 @@ extensions: []
188
188
  extra_rdoc_files: []
189
189
  files:
190
190
  - "./lib/oci.rb"
191
+ - "./lib/oci/announcements_service/announcement_client.rb"
192
+ - "./lib/oci/announcements_service/announcement_client_composite_operations.rb"
193
+ - "./lib/oci/announcements_service/announcements_service.rb"
194
+ - "./lib/oci/announcements_service/models/affected_resource.rb"
195
+ - "./lib/oci/announcements_service/models/announcement.rb"
196
+ - "./lib/oci/announcements_service/models/announcement_summary.rb"
197
+ - "./lib/oci/announcements_service/models/announcement_user_status_details.rb"
198
+ - "./lib/oci/announcements_service/models/announcements_collection.rb"
199
+ - "./lib/oci/announcements_service/models/base_announcement.rb"
200
+ - "./lib/oci/announcements_service/models/notification_followup_details.rb"
201
+ - "./lib/oci/announcements_service/util.rb"
191
202
  - "./lib/oci/api_client.rb"
192
203
  - "./lib/oci/api_client_proxy_settings.rb"
193
204
  - "./lib/oci/audit/audit.rb"