oci 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (248) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/lib/oci.rb +2 -1
  4. data/lib/oci/audit/audit.rb +19 -0
  5. data/lib/oci/audit/audit_client.rb +176 -0
  6. data/lib/oci/audit/models/audit_event.rb +307 -0
  7. data/lib/oci/audit/models/configuration.rb +120 -0
  8. data/lib/oci/audit/models/update_configuration_details.rb +120 -0
  9. data/lib/oci/audit/util.rb +1 -0
  10. data/lib/oci/core/blockstorage_client.rb +69 -1
  11. data/lib/oci/core/compute_client.rb +106 -16
  12. data/lib/oci/core/core.rb +3 -0
  13. data/lib/oci/core/models/attach_i_scsi_volume_details.rb +2 -2
  14. data/lib/oci/core/models/attach_vnic_details.rb +2 -2
  15. data/lib/oci/core/models/attach_volume_details.rb +2 -2
  16. data/lib/oci/core/models/capture_console_history_details.rb +2 -2
  17. data/lib/oci/core/models/console_history.rb +2 -2
  18. data/lib/oci/core/models/cpe.rb +2 -2
  19. data/lib/oci/core/models/create_cpe_details.rb +2 -2
  20. data/lib/oci/core/models/create_cross_connect_details.rb +2 -2
  21. data/lib/oci/core/models/create_cross_connect_group_details.rb +2 -2
  22. data/lib/oci/core/models/create_dhcp_details.rb +2 -2
  23. data/lib/oci/core/models/create_drg_attachment_details.rb +2 -2
  24. data/lib/oci/core/models/create_drg_details.rb +2 -2
  25. data/lib/oci/core/models/create_image_details.rb +2 -2
  26. data/lib/oci/core/models/create_instance_console_connection_details.rb +2 -2
  27. data/lib/oci/core/models/create_internet_gateway_details.rb +2 -2
  28. data/lib/oci/core/models/create_ip_sec_connection_details.rb +2 -2
  29. data/lib/oci/core/models/create_private_ip_details.rb +2 -2
  30. data/lib/oci/core/models/create_route_table_details.rb +2 -2
  31. data/lib/oci/core/models/create_security_list_details.rb +2 -2
  32. data/lib/oci/core/models/create_subnet_details.rb +2 -2
  33. data/lib/oci/core/models/create_vcn_details.rb +2 -2
  34. data/lib/oci/core/models/create_virtual_circuit_details.rb +5 -6
  35. data/lib/oci/core/models/create_vnic_details.rb +2 -2
  36. data/lib/oci/core/models/create_volume_backup_details.rb +2 -2
  37. data/lib/oci/core/models/create_volume_details.rb +20 -4
  38. data/lib/oci/core/models/cross_connect.rb +2 -2
  39. data/lib/oci/core/models/cross_connect_group.rb +2 -2
  40. data/lib/oci/core/models/cross_connect_location.rb +2 -2
  41. data/lib/oci/core/models/cross_connect_mapping.rb +2 -2
  42. data/lib/oci/core/models/cross_connect_port_speed_shape.rb +2 -2
  43. data/lib/oci/core/models/cross_connect_status.rb +2 -2
  44. data/lib/oci/core/models/dhcp_dns_option.rb +2 -2
  45. data/lib/oci/core/models/dhcp_option.rb +2 -2
  46. data/lib/oci/core/models/dhcp_options.rb +2 -2
  47. data/lib/oci/core/models/dhcp_search_domain_option.rb +2 -2
  48. data/lib/oci/core/models/drg.rb +2 -2
  49. data/lib/oci/core/models/drg_attachment.rb +2 -2
  50. data/lib/oci/core/models/egress_security_rule.rb +2 -2
  51. data/lib/oci/core/models/export_image_details.rb +3 -3
  52. data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +5 -5
  53. data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +3 -3
  54. data/lib/oci/core/models/fast_connect_provider_service.rb +2 -2
  55. data/lib/oci/core/models/i_scsi_volume_attachment.rb +2 -2
  56. data/lib/oci/core/models/icmp_options.rb +2 -2
  57. data/lib/oci/core/models/image.rb +2 -2
  58. data/lib/oci/core/models/image_source_details.rb +3 -3
  59. data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +5 -5
  60. data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +3 -3
  61. data/lib/oci/core/models/ingress_security_rule.rb +2 -2
  62. data/lib/oci/core/models/instance.rb +4 -4
  63. data/lib/oci/core/models/instance_console_connection.rb +2 -2
  64. data/lib/oci/core/models/instance_credentials.rb +2 -2
  65. data/lib/oci/core/models/internet_gateway.rb +2 -2
  66. data/lib/oci/core/models/ip_sec_connection.rb +2 -2
  67. data/lib/oci/core/models/ip_sec_connection_device_config.rb +2 -2
  68. data/lib/oci/core/models/ip_sec_connection_device_status.rb +2 -2
  69. data/lib/oci/core/models/launch_instance_details.rb +4 -4
  70. data/lib/oci/core/models/letter_of_authority.rb +2 -2
  71. data/lib/oci/core/models/port_range.rb +2 -2
  72. data/lib/oci/core/models/private_ip.rb +2 -2
  73. data/lib/oci/core/models/route_rule.rb +2 -2
  74. data/lib/oci/core/models/route_table.rb +2 -2
  75. data/lib/oci/core/models/security_list.rb +2 -2
  76. data/lib/oci/core/models/shape.rb +2 -2
  77. data/lib/oci/core/models/subnet.rb +2 -2
  78. data/lib/oci/core/models/tcp_options.rb +2 -2
  79. data/lib/oci/core/models/tunnel_config.rb +2 -2
  80. data/lib/oci/core/models/tunnel_status.rb +2 -2
  81. data/lib/oci/core/models/udp_options.rb +2 -2
  82. data/lib/oci/core/models/update_console_history_details.rb +2 -2
  83. data/lib/oci/core/models/update_cpe_details.rb +2 -2
  84. data/lib/oci/core/models/update_cross_connect_details.rb +2 -2
  85. data/lib/oci/core/models/update_cross_connect_group_details.rb +2 -2
  86. data/lib/oci/core/models/update_dhcp_details.rb +2 -2
  87. data/lib/oci/core/models/update_drg_attachment_details.rb +2 -2
  88. data/lib/oci/core/models/update_drg_details.rb +2 -2
  89. data/lib/oci/core/models/update_image_details.rb +2 -2
  90. data/lib/oci/core/models/update_instance_details.rb +2 -2
  91. data/lib/oci/core/models/update_internet_gateway_details.rb +2 -2
  92. data/lib/oci/core/models/update_ip_sec_connection_details.rb +2 -2
  93. data/lib/oci/core/models/update_private_ip_details.rb +2 -2
  94. data/lib/oci/core/models/update_route_table_details.rb +2 -2
  95. data/lib/oci/core/models/update_security_list_details.rb +2 -2
  96. data/lib/oci/core/models/update_subnet_details.rb +2 -2
  97. data/lib/oci/core/models/update_vcn_details.rb +2 -2
  98. data/lib/oci/core/models/update_virtual_circuit_details.rb +2 -3
  99. data/lib/oci/core/models/update_vnic_details.rb +2 -2
  100. data/lib/oci/core/models/update_volume_backup_details.rb +2 -2
  101. data/lib/oci/core/models/update_volume_details.rb +2 -2
  102. data/lib/oci/core/models/vcn.rb +2 -2
  103. data/lib/oci/core/models/virtual_circuit.rb +5 -5
  104. data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +2 -2
  105. data/lib/oci/core/models/vnic.rb +2 -2
  106. data/lib/oci/core/models/vnic_attachment.rb +2 -2
  107. data/lib/oci/core/models/volume.rb +29 -5
  108. data/lib/oci/core/models/volume_attachment.rb +2 -2
  109. data/lib/oci/core/models/volume_backup.rb +2 -2
  110. data/lib/oci/core/models/volume_source_details.rb +131 -0
  111. data/lib/oci/core/models/volume_source_from_volume_backup_details.rb +128 -0
  112. data/lib/oci/core/models/volume_source_from_volume_details.rb +128 -0
  113. data/lib/oci/core/virtual_network_client.rb +312 -10
  114. data/lib/oci/database/database.rb +7 -0
  115. data/lib/oci/database/database_client.rb +228 -4
  116. data/lib/oci/database/models/backup.rb +253 -0
  117. data/lib/oci/database/models/backup_summary.rb +253 -0
  118. data/lib/oci/database/models/create_backup_details.rb +131 -0
  119. data/lib/oci/database/models/create_data_guard_association_details.rb +2 -2
  120. data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +2 -2
  121. data/lib/oci/database/models/create_database_details.rb +13 -3
  122. data/lib/oci/database/models/create_db_home_details.rb +2 -2
  123. data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +2 -2
  124. data/lib/oci/database/models/data_guard_association.rb +2 -2
  125. data/lib/oci/database/models/data_guard_association_summary.rb +374 -0
  126. data/lib/oci/database/models/database.rb +15 -3
  127. data/lib/oci/database/models/database_summary.rb +15 -3
  128. data/lib/oci/database/models/db_backup_config.rb +120 -0
  129. data/lib/oci/database/models/db_home.rb +2 -2
  130. data/lib/oci/database/models/db_home_summary.rb +2 -2
  131. data/lib/oci/database/models/db_node.rb +2 -2
  132. data/lib/oci/database/models/db_node_summary.rb +2 -2
  133. data/lib/oci/database/models/db_system.rb +9 -9
  134. data/lib/oci/database/models/db_system_shape_summary.rb +2 -2
  135. data/lib/oci/database/models/db_system_summary.rb +9 -9
  136. data/lib/oci/database/models/db_version_summary.rb +2 -2
  137. data/lib/oci/database/models/failover_data_guard_association_details.rb +2 -2
  138. data/lib/oci/database/models/launch_db_system_details.rb +2 -2
  139. data/lib/oci/database/models/patch.rb +4 -2
  140. data/lib/oci/database/models/patch_details.rb +4 -3
  141. data/lib/oci/database/models/patch_history_entry.rb +3 -2
  142. data/lib/oci/database/models/patch_history_entry_summary.rb +3 -2
  143. data/lib/oci/database/models/patch_summary.rb +4 -2
  144. data/lib/oci/database/models/reinstate_data_guard_association_details.rb +2 -2
  145. data/lib/oci/database/models/restore_database_details.rb +145 -0
  146. data/lib/oci/database/models/switchover_data_guard_association_details.rb +2 -2
  147. data/lib/oci/database/models/update_database_details.rb +119 -0
  148. data/lib/oci/database/models/update_db_home_details.rb +2 -2
  149. data/lib/oci/database/models/update_db_system_details.rb +9 -9
  150. data/lib/oci/identity/identity_client.rb +6 -5
  151. data/lib/oci/identity/models/add_user_to_group_details.rb +2 -2
  152. data/lib/oci/identity/models/api_key.rb +2 -2
  153. data/lib/oci/identity/models/availability_domain.rb +2 -2
  154. data/lib/oci/identity/models/compartment.rb +3 -3
  155. data/lib/oci/identity/models/create_api_key_details.rb +2 -2
  156. data/lib/oci/identity/models/create_compartment_details.rb +2 -2
  157. data/lib/oci/identity/models/create_customer_secret_key_details.rb +2 -2
  158. data/lib/oci/identity/models/create_group_details.rb +2 -2
  159. data/lib/oci/identity/models/create_identity_provider_details.rb +2 -2
  160. data/lib/oci/identity/models/create_idp_group_mapping_details.rb +2 -2
  161. data/lib/oci/identity/models/create_policy_details.rb +2 -2
  162. data/lib/oci/identity/models/create_region_subscription_details.rb +2 -2
  163. data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +2 -2
  164. data/lib/oci/identity/models/create_swift_password_details.rb +2 -2
  165. data/lib/oci/identity/models/create_user_details.rb +2 -2
  166. data/lib/oci/identity/models/customer_secret_key.rb +2 -2
  167. data/lib/oci/identity/models/customer_secret_key_summary.rb +2 -2
  168. data/lib/oci/identity/models/group.rb +2 -2
  169. data/lib/oci/identity/models/identity_provider.rb +4 -4
  170. data/lib/oci/identity/models/idp_group_mapping.rb +2 -2
  171. data/lib/oci/identity/models/policy.rb +2 -2
  172. data/lib/oci/identity/models/region.rb +4 -4
  173. data/lib/oci/identity/models/region_subscription.rb +4 -4
  174. data/lib/oci/identity/models/saml2_identity_provider.rb +2 -2
  175. data/lib/oci/identity/models/swift_password.rb +2 -2
  176. data/lib/oci/identity/models/tenancy.rb +2 -2
  177. data/lib/oci/identity/models/ui_password.rb +2 -2
  178. data/lib/oci/identity/models/update_compartment_details.rb +2 -2
  179. data/lib/oci/identity/models/update_customer_secret_key_details.rb +2 -2
  180. data/lib/oci/identity/models/update_group_details.rb +2 -2
  181. data/lib/oci/identity/models/update_identity_provider_details.rb +2 -2
  182. data/lib/oci/identity/models/update_idp_group_mapping_details.rb +2 -2
  183. data/lib/oci/identity/models/update_policy_details.rb +2 -2
  184. data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +2 -2
  185. data/lib/oci/identity/models/update_state_details.rb +2 -2
  186. data/lib/oci/identity/models/update_swift_password_details.rb +2 -2
  187. data/lib/oci/identity/models/update_user_details.rb +2 -2
  188. data/lib/oci/identity/models/user.rb +2 -2
  189. data/lib/oci/identity/models/user_group_membership.rb +2 -2
  190. data/lib/oci/load_balancer/load_balancer_client.rb +1 -1
  191. data/lib/oci/load_balancer/models/backend.rb +2 -2
  192. data/lib/oci/load_balancer/models/backend_details.rb +2 -2
  193. data/lib/oci/load_balancer/models/backend_health.rb +2 -2
  194. data/lib/oci/load_balancer/models/backend_set.rb +2 -2
  195. data/lib/oci/load_balancer/models/backend_set_details.rb +2 -2
  196. data/lib/oci/load_balancer/models/backend_set_health.rb +2 -2
  197. data/lib/oci/load_balancer/models/certificate.rb +2 -2
  198. data/lib/oci/load_balancer/models/certificate_details.rb +2 -2
  199. data/lib/oci/load_balancer/models/create_backend_details.rb +2 -2
  200. data/lib/oci/load_balancer/models/create_backend_set_details.rb +2 -2
  201. data/lib/oci/load_balancer/models/create_certificate_details.rb +2 -2
  202. data/lib/oci/load_balancer/models/create_listener_details.rb +2 -2
  203. data/lib/oci/load_balancer/models/create_load_balancer_details.rb +2 -2
  204. data/lib/oci/load_balancer/models/health_check_result.rb +2 -2
  205. data/lib/oci/load_balancer/models/health_checker.rb +2 -2
  206. data/lib/oci/load_balancer/models/health_checker_details.rb +2 -2
  207. data/lib/oci/load_balancer/models/ip_address.rb +2 -2
  208. data/lib/oci/load_balancer/models/listener.rb +2 -2
  209. data/lib/oci/load_balancer/models/listener_details.rb +2 -2
  210. data/lib/oci/load_balancer/models/load_balancer.rb +2 -2
  211. data/lib/oci/load_balancer/models/load_balancer_health.rb +2 -2
  212. data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +2 -2
  213. data/lib/oci/load_balancer/models/load_balancer_policy.rb +2 -2
  214. data/lib/oci/load_balancer/models/load_balancer_protocol.rb +2 -2
  215. data/lib/oci/load_balancer/models/load_balancer_shape.rb +2 -2
  216. data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +2 -2
  217. data/lib/oci/load_balancer/models/ssl_configuration.rb +2 -2
  218. data/lib/oci/load_balancer/models/ssl_configuration_details.rb +2 -2
  219. data/lib/oci/load_balancer/models/update_backend_details.rb +2 -2
  220. data/lib/oci/load_balancer/models/update_backend_set_details.rb +2 -2
  221. data/lib/oci/load_balancer/models/update_health_checker_details.rb +2 -2
  222. data/lib/oci/load_balancer/models/update_listener_details.rb +2 -2
  223. data/lib/oci/load_balancer/models/update_load_balancer_details.rb +2 -2
  224. data/lib/oci/load_balancer/models/work_request.rb +2 -2
  225. data/lib/oci/load_balancer/models/work_request_error.rb +2 -2
  226. data/lib/oci/object_storage/models/bucket.rb +44 -12
  227. data/lib/oci/object_storage/models/bucket_summary.rb +6 -4
  228. data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +2 -2
  229. data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +2 -2
  230. data/lib/oci/object_storage/models/create_bucket_details.rb +41 -11
  231. data/lib/oci/object_storage/models/create_multipart_upload_details.rb +9 -7
  232. data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +6 -7
  233. data/lib/oci/object_storage/models/list_objects.rb +4 -3
  234. data/lib/oci/object_storage/models/multipart_upload.rb +3 -3
  235. data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +6 -6
  236. data/lib/oci/object_storage/models/namespace_metadata.rb +142 -0
  237. data/lib/oci/object_storage/models/object_summary.rb +6 -4
  238. data/lib/oci/object_storage/models/preauthenticated_request.rb +13 -11
  239. data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +8 -10
  240. data/lib/oci/object_storage/models/rename_object_details.rb +164 -0
  241. data/lib/oci/object_storage/models/restore_objects_details.rb +120 -0
  242. data/lib/oci/object_storage/models/update_bucket_details.rb +20 -8
  243. data/lib/oci/object_storage/models/update_namespace_metadata_details.rb +131 -0
  244. data/lib/oci/object_storage/object_storage.rb +4 -0
  245. data/lib/oci/object_storage/object_storage_client.rb +206 -94
  246. data/lib/oci/regions.rb +2 -1
  247. data/lib/oci/version.rb +1 -1
  248. metadata +22 -2
@@ -0,0 +1,120 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class ObjectStorage::Models::RestoreObjectsDetails
7
+ # A object which was in an archived state and need to be restored.
8
+ # @return [String]
9
+ attr_accessor :object_name
10
+
11
+
12
+ # Initializes the object
13
+ # @param [Hash] attributes Model attributes in the form of hash
14
+ def initialize(attributes = {})
15
+ return unless attributes.is_a?(Hash)
16
+
17
+ # convert string to symbol for hash key
18
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
19
+
20
+ if attributes[:'objectName']
21
+ self.object_name = attributes[:'objectName']
22
+ end
23
+
24
+ end
25
+
26
+ # Checks equality by comparing each attribute.
27
+ # @param [Object] other_object to be compared
28
+ def ==(other_object)
29
+ return true if self.equal?(other_object)
30
+ self.class == other_object.class &&
31
+ object_name == other_object.object_name
32
+ end
33
+
34
+ # @see the `==` method
35
+ # @param [Object] other_object to be compared
36
+ def eql?(other_object)
37
+ self == other_object
38
+ end
39
+
40
+ # Calculates hash code according to all attributes.
41
+ # @return [Fixnum] Hash code
42
+ def hash
43
+ [object_name].hash
44
+ end
45
+
46
+ # Builds the object from hash
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ # @return [Object] Returns the model itself
49
+ def build_from_hash(attributes)
50
+ return nil unless attributes.is_a?(Hash)
51
+ self.class.swagger_types.each_pair do |key, type|
52
+ if type =~ /^Array<(.*)>/i
53
+ # check to ensure the input is an array given that the the attribute
54
+ # is documented as an array but the input is not
55
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
56
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
57
+ end
58
+ elsif !attributes[self.class.attribute_map[key]].nil?
59
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
60
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
61
+ end
62
+
63
+ self
64
+ end
65
+
66
+ # Returns the string representation of the object
67
+ # @return [String] String presentation of the object
68
+ def to_s
69
+ to_hash.to_s
70
+ end
71
+
72
+ # Returns the object in the form of hash
73
+ # @return [Hash] Returns the object in the form of hash
74
+ def to_hash
75
+ hash = {}
76
+ self.class.attribute_map.each_pair do |attr, param|
77
+ value = send(attr)
78
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
79
+ hash[param] = _to_hash(value)
80
+ end
81
+ hash
82
+ end
83
+
84
+ private
85
+
86
+ # Outputs non-array value in the form of hash
87
+ # For object, use to_hash. Otherwise, just return the value
88
+ # @param [Object] value Any valid value
89
+ # @return [Hash] Returns the value in the form of hash
90
+ def _to_hash(value)
91
+ if value.is_a?(Array)
92
+ value.compact.map{ |v| _to_hash(v) }
93
+ elsif value.is_a?(Hash)
94
+ {}.tap do |hash|
95
+ value.each { |k, v| hash[k] = _to_hash(v) }
96
+ end
97
+ elsif value.respond_to? :to_hash
98
+ value.to_hash
99
+ else
100
+ value
101
+ end
102
+ end
103
+
104
+
105
+
106
+ # Attribute mapping from ruby-style variable name to JSON key.
107
+ def self.attribute_map
108
+ {
109
+ :'object_name' => :'objectName'
110
+ }
111
+ end
112
+
113
+ # Attribute type mapping.
114
+ def self.swagger_types
115
+ {
116
+ :'object_name' => :'String'
117
+ }
118
+ end
119
+ end
120
+ end
@@ -12,7 +12,13 @@ module OCI
12
12
  # @return [String]
13
13
  attr_accessor :namespace
14
14
 
15
- # The name of the bucket.
15
+ # The compartmentId for the compartment to which the bucket is targeted to move to.
16
+ # @return [String]
17
+ attr_accessor :compartment_id
18
+
19
+ # The name of the bucket. Avoid entering confidential information.
20
+ # Example: my-new-bucket1
21
+ #
16
22
  # @return [String]
17
23
  attr_accessor :name
18
24
 
@@ -20,10 +26,9 @@ module OCI
20
26
  # @return [Hash<String, String>]
21
27
  attr_accessor :metadata
22
28
 
23
- # The type of public access available on this bucket. Allows authenticated caller to access the bucket or
24
- # contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess
25
- # when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access.
26
- # When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects.
29
+ # The type of public access enabled on this bucket. A bucket is set to `NoPublicAccess` by default, which only allows an
30
+ # authenticated caller to access the bucket and its contents. When `ObjectRead` is enabled on the bucket, public access
31
+ # is allowed for the `GetObject`, `HeadObject`, and `ListObjects` operations.
27
32
  #
28
33
  # @return [String]
29
34
  attr_accessor :public_access_type
@@ -41,6 +46,10 @@ module OCI
41
46
  self.namespace = attributes[:'namespace']
42
47
  end
43
48
 
49
+ if attributes[:'compartmentId']
50
+ self.compartment_id = attributes[:'compartmentId']
51
+ end
52
+
44
53
  if attributes[:'name']
45
54
  self.name = attributes[:'name']
46
55
  end
@@ -71,6 +80,7 @@ module OCI
71
80
  return true if self.equal?(other_object)
72
81
  self.class == other_object.class &&
73
82
  namespace == other_object.namespace &&
83
+ compartment_id == other_object.compartment_id &&
74
84
  name == other_object.name &&
75
85
  metadata == other_object.metadata &&
76
86
  public_access_type == other_object.public_access_type
@@ -85,7 +95,7 @@ module OCI
85
95
  # Calculates hash code according to all attributes.
86
96
  # @return [Fixnum] Hash code
87
97
  def hash
88
- [namespace, name, metadata, public_access_type].hash
98
+ [namespace, compartment_id, name, metadata, public_access_type].hash
89
99
  end
90
100
 
91
101
  # Builds the object from hash
@@ -119,8 +129,8 @@ module OCI
119
129
  def to_hash
120
130
  hash = {}
121
131
  self.class.attribute_map.each_pair do |attr, param|
122
- value = self.send(attr)
123
- next if value.nil?
132
+ value = send(attr)
133
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
124
134
  hash[param] = _to_hash(value)
125
135
  end
126
136
  hash
@@ -152,6 +162,7 @@ module OCI
152
162
  def self.attribute_map
153
163
  {
154
164
  :'namespace' => :'namespace',
165
+ :'compartment_id' => :'compartmentId',
155
166
  :'name' => :'name',
156
167
  :'metadata' => :'metadata',
157
168
  :'public_access_type' => :'publicAccessType'
@@ -162,6 +173,7 @@ module OCI
162
173
  def self.swagger_types
163
174
  {
164
175
  :'namespace' => :'String',
176
+ :'compartment_id' => :'String',
165
177
  :'name' => :'String',
166
178
  :'metadata' => :'Hash<String, String>',
167
179
  :'public_access_type' => :'String'
@@ -0,0 +1,131 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class ObjectStorage::Models::UpdateNamespaceMetadataDetails
7
+ # The update compartment id for an S3 client if this field is set.
8
+ # @return [String]
9
+ attr_accessor :default_s3_compartment_id
10
+
11
+ # The update compartment id for a Swift client if this field is set.
12
+ # @return [String]
13
+ attr_accessor :default_swift_compartment_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
+ if attributes[:'defaultS3CompartmentId']
25
+ self.default_s3_compartment_id = attributes[:'defaultS3CompartmentId']
26
+ end
27
+
28
+ if attributes[:'defaultSwiftCompartmentId']
29
+ self.default_swift_compartment_id = attributes[:'defaultSwiftCompartmentId']
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
+ default_s3_compartment_id == other_object.default_s3_compartment_id &&
40
+ default_swift_compartment_id == other_object.default_swift_compartment_id
41
+ end
42
+
43
+ # @see the `==` method
44
+ # @param [Object] other_object to be compared
45
+ def eql?(other_object)
46
+ self == other_object
47
+ end
48
+
49
+ # Calculates hash code according to all attributes.
50
+ # @return [Fixnum] Hash code
51
+ def hash
52
+ [default_s3_compartment_id, default_swift_compartment_id].hash
53
+ end
54
+
55
+ # Builds the object from hash
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ # @return [Object] Returns the model itself
58
+ def build_from_hash(attributes)
59
+ return nil unless attributes.is_a?(Hash)
60
+ self.class.swagger_types.each_pair do |key, type|
61
+ if type =~ /^Array<(.*)>/i
62
+ # check to ensure the input is an array given that the the attribute
63
+ # is documented as an array but the input is not
64
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
65
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
66
+ end
67
+ elsif !attributes[self.class.attribute_map[key]].nil?
68
+ self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
69
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
70
+ end
71
+
72
+ self
73
+ end
74
+
75
+ # Returns the string representation of the object
76
+ # @return [String] String presentation of the object
77
+ def to_s
78
+ to_hash.to_s
79
+ end
80
+
81
+ # Returns the object in the form of hash
82
+ # @return [Hash] Returns the object in the form of hash
83
+ def to_hash
84
+ hash = {}
85
+ self.class.attribute_map.each_pair do |attr, param|
86
+ value = send(attr)
87
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
88
+ hash[param] = _to_hash(value)
89
+ end
90
+ hash
91
+ end
92
+
93
+ private
94
+
95
+ # Outputs non-array value in the form of hash
96
+ # For object, use to_hash. Otherwise, just return the value
97
+ # @param [Object] value Any valid value
98
+ # @return [Hash] Returns the value in the form of hash
99
+ def _to_hash(value)
100
+ if value.is_a?(Array)
101
+ value.compact.map{ |v| _to_hash(v) }
102
+ elsif value.is_a?(Hash)
103
+ {}.tap do |hash|
104
+ value.each { |k, v| hash[k] = _to_hash(v) }
105
+ end
106
+ elsif value.respond_to? :to_hash
107
+ value.to_hash
108
+ else
109
+ value
110
+ end
111
+ end
112
+
113
+
114
+
115
+ # Attribute mapping from ruby-style variable name to JSON key.
116
+ def self.attribute_map
117
+ {
118
+ :'default_s3_compartment_id' => :'defaultS3CompartmentId',
119
+ :'default_swift_compartment_id' => :'defaultSwiftCompartmentId'
120
+ }
121
+ end
122
+
123
+ # Attribute type mapping.
124
+ def self.swagger_types
125
+ {
126
+ :'default_s3_compartment_id' => :'String',
127
+ :'default_swift_compartment_id' => :'String'
128
+ }
129
+ end
130
+ end
131
+ end
@@ -18,10 +18,14 @@ require 'oci/object_storage/models/create_preauthenticated_request_details'
18
18
  require 'oci/object_storage/models/list_objects'
19
19
  require 'oci/object_storage/models/multipart_upload'
20
20
  require 'oci/object_storage/models/multipart_upload_part_summary'
21
+ require 'oci/object_storage/models/namespace_metadata'
21
22
  require 'oci/object_storage/models/object_summary'
22
23
  require 'oci/object_storage/models/preauthenticated_request'
23
24
  require 'oci/object_storage/models/preauthenticated_request_summary'
25
+ require 'oci/object_storage/models/rename_object_details'
26
+ require 'oci/object_storage/models/restore_objects_details'
24
27
  require 'oci/object_storage/models/update_bucket_details'
28
+ require 'oci/object_storage/models/update_namespace_metadata_details'
25
29
 
26
30
  # Require generated clients
27
31
  require 'oci/object_storage/object_storage_client'
@@ -61,12 +61,10 @@ module OCI
61
61
  # Aborts an in-progress multipart upload and deletes all parts that have been uploaded.
62
62
  #
63
63
  # @param [String] namespace_name The top-level namespace used for the request.
64
- # @param [String] bucket_name The name of the bucket.
65
- #
64
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
66
65
  # Example: `my-new-bucket1`
67
66
  #
68
- # @param [String] object_name The name of the object.
69
- #
67
+ # @param [String] object_name The name of the object. Avoid entering confidential information.
70
68
  # Example: `test/object1.log`
71
69
  #
72
70
  # @param [String] upload_id The upload ID for a multipart upload.
@@ -107,12 +105,10 @@ module OCI
107
105
  # Commits a multipart upload, which involves checking part numbers and ETags of the parts, to create an aggregate object.
108
106
  #
109
107
  # @param [String] namespace_name The top-level namespace used for the request.
110
- # @param [String] bucket_name The name of the bucket.
111
- #
108
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
112
109
  # Example: `my-new-bucket1`
113
110
  #
114
- # @param [String] object_name The name of the object.
115
- #
111
+ # @param [String] object_name The name of the object. Avoid entering confidential information.
116
112
  # Example: `test/object1.log`
117
113
  #
118
114
  # @param [String] upload_id The upload ID for a multipart upload.
@@ -122,8 +118,7 @@ module OCI
122
118
  # For uploading a part, this is the entity tag of the target part.
123
119
  #
124
120
  # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
125
- # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag
126
- # of the target part.
121
+ # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
127
122
  #
128
123
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
129
124
  # @return [Response] A Response object with data of type nil
@@ -163,10 +158,6 @@ module OCI
163
158
 
164
159
  # Creates a bucket in the given namespace with a bucket name and optional user-defined metadata.
165
160
  #
166
- # To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
167
- # talk to an administrator. If you're an administrator who needs to write policies to give users access, see
168
- # [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
169
- #
170
161
  # @param [String] namespace_name The top-level namespace used for the request.
171
162
  # @param [CreateBucketDetails] create_bucket_details Request object for creating a bucket.
172
163
  # @param [Hash] opts the optional parameters
@@ -204,8 +195,7 @@ module OCI
204
195
  # Starts a new multipart upload to a specific object in the given bucket in the given namespace.
205
196
  #
206
197
  # @param [String] namespace_name The top-level namespace used for the request.
207
- # @param [String] bucket_name The name of the bucket.
208
- #
198
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
209
199
  # Example: `my-new-bucket1`
210
200
  #
211
201
  # @param [CreateMultipartUploadDetails] create_multipart_upload_details Request object for creating a multi-part upload.
@@ -214,8 +204,7 @@ module OCI
214
204
  # For uploading a part, this is the entity tag of the target part.
215
205
  #
216
206
  # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
217
- # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag
218
- # of the target part.
207
+ # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
219
208
  #
220
209
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
221
210
  # @return [Response] A Response object with data of type OCI::ObjectStorage::Models::MultipartUpload
@@ -251,14 +240,13 @@ module OCI
251
240
  :return_type => 'OCI::ObjectStorage::Models::MultipartUpload')
252
241
  end
253
242
 
254
- # Create a pre-authenticated request specific to the bucket
243
+ # Creates a pre-authenticated request specific to the bucket.
255
244
  #
256
245
  # @param [String] namespace_name The top-level namespace used for the request.
257
- # @param [String] bucket_name The name of the bucket.
258
- #
246
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
259
247
  # Example: `my-new-bucket1`
260
248
  #
261
- # @param [CreatePreauthenticatedRequestDetails] create_preauthenticated_request_details details for creating the pre-authenticated request.
249
+ # @param [CreatePreauthenticatedRequestDetails] create_preauthenticated_request_details Information needed to create the pre-authenticated request.
262
250
  # @param [Hash] opts the optional parameters
263
251
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
264
252
  # @return [Response] A Response object with data of type OCI::ObjectStorage::Models::PreauthenticatedRequest
@@ -295,8 +283,7 @@ module OCI
295
283
  # Deletes a bucket if it is already empty. If the bucket is not empty, use {#delete_object delete_object} first.
296
284
  #
297
285
  # @param [String] namespace_name The top-level namespace used for the request.
298
- # @param [String] bucket_name The name of the bucket.
299
- #
286
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
300
287
  # Example: `my-new-bucket1`
301
288
  #
302
289
  # @param [Hash] opts the optional parameters
@@ -337,12 +324,10 @@ module OCI
337
324
  # Deletes an object.
338
325
  #
339
326
  # @param [String] namespace_name The top-level namespace used for the request.
340
- # @param [String] bucket_name The name of the bucket.
341
- #
327
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
342
328
  # Example: `my-new-bucket1`
343
329
  #
344
- # @param [String] object_name The name of the object.
345
- #
330
+ # @param [String] object_name The name of the object. Avoid entering confidential information.
346
331
  # Example: `test/object1.log`
347
332
  #
348
333
  # @param [Hash] opts the optional parameters
@@ -381,14 +366,13 @@ module OCI
381
366
  :body => post_body)
382
367
  end
383
368
 
384
- # Deletes the bucket level pre-authenticateted request
369
+ # Deletes the pre-authenticated request for the bucket.
385
370
  # @param [String] namespace_name The top-level namespace used for the request.
386
- # @param [String] bucket_name The name of the bucket.
387
- #
371
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
388
372
  # Example: `my-new-bucket1`
389
373
  #
390
- # @param [String] par_id The unique identifier for the pre-authenticated request (PAR). This can be used to manage the PAR
391
- # such as GET or DELETE the PAR
374
+ # @param [String] par_id The unique identifier for the pre-authenticated request. This can be used to manage operations against
375
+ # the pre-authenticated request, such as GET or DELETE.
392
376
  #
393
377
  # @param [Hash] opts the optional parameters
394
378
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -425,8 +409,7 @@ module OCI
425
409
  # Gets the current representation of the given bucket in the given namespace.
426
410
  #
427
411
  # @param [String] namespace_name The top-level namespace used for the request.
428
- # @param [String] bucket_name The name of the bucket.
429
- #
412
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
430
413
  # Example: `my-new-bucket1`
431
414
  #
432
415
  # @param [Hash] opts the optional parameters
@@ -434,8 +417,7 @@ module OCI
434
417
  # For uploading a part, this is the entity tag of the target part.
435
418
  #
436
419
  # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
437
- # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag
438
- # of the target part.
420
+ # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
439
421
  #
440
422
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
441
423
  # @return [Response] A Response object with data of type OCI::ObjectStorage::Models::Bucket
@@ -503,15 +485,50 @@ module OCI
503
485
  :return_type => 'String')
504
486
  end
505
487
 
488
+ # Get the metadata for the namespace, which contains defaultS3CompartmentId and defaultSwiftCompartmentId.
489
+ # Any user with the NAMESPACE_READ permission will be able to see the current metadata. If you're not authorized,
490
+ # talk to an administrator. If you're an administrator who needs to write
491
+ # policies to give users access, see [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
492
+ #
493
+ # @param [String] namespace_name The top-level namespace used for the request.
494
+ # @param [Hash] opts the optional parameters
495
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
496
+ # @return [Response] A Response object with data of type OCI::ObjectStorage::Models::NamespaceMetadata
497
+ def get_namespace_metadata(namespace_name, opts = {})
498
+ logger.debug "Calling operation ObjectStorageClient#get_namespace_metadata." if logger
499
+
500
+ fail "Missing the required parameter 'namespace_name' when calling get_namespace_metadata." if namespace_name.nil?
501
+
502
+ path = "/n/{namespaceName}".sub('{namespaceName}', namespace_name.to_s)
503
+
504
+ # Query Params
505
+ query_params = {}
506
+
507
+ # Header Params
508
+ header_params = {}
509
+ header_params['accept'] = 'application/json'
510
+ header_params['content-type'] = 'application/json'
511
+ header_params[:'opc-client-request-id'] = opts[:'opc_client_request_id'] if opts[:'opc_client_request_id']
512
+
513
+ post_body = nil
514
+
515
+ return @api_client.call_api(
516
+ :GET,
517
+ path,
518
+ endpoint,
519
+ :header_params => header_params,
520
+ :query_params => query_params,
521
+ :body => post_body,
522
+ :return_type => 'OCI::ObjectStorage::Models::NamespaceMetadata')
523
+ end
524
+
506
525
  # Gets the metadata and body of an object.
507
526
  #
508
527
  # @param [String] namespace_name The top-level namespace used for the request.
509
- # @param [String] bucket_name The name of the bucket.
510
- #
528
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
511
529
  # Example: `my-new-bucket1`
512
530
  #
513
- # @param [String] object_name The name of the object.
514
- #
531
+ # @param [String] object_name The name of the object. Avoid entering confidential information.
515
532
  # Example: `test/object1.log`
516
533
  #
517
534
  # @param [Hash] opts the optional parameters
@@ -519,12 +536,11 @@ module OCI
519
536
  # For uploading a part, this is the entity tag of the target part.
520
537
  #
521
538
  # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
522
- # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag
523
- # of the target part.
539
+ # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
524
540
  #
525
541
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
526
542
  # @option opts [String] :range Optional byte range to fetch, as described in [RFC 7233](https://tools.ietf.org/rfc/rfc7233), section 2.1.
527
- # Note, only a single range of bytes is supported.
543
+ # Note that only a single range of bytes is supported.
528
544
  #
529
545
  # @option opts [String, IO] :response_target Streaming http body into a file (specified by file name or File object) or IO object if the block is not given
530
546
  # @option [Block] &block Streaming http body to the block
@@ -602,14 +618,13 @@ module OCI
602
618
  end
603
619
  end
604
620
 
605
- # Get the bucket level pre-authenticateted request
621
+ # Gets the pre-authenticated request for the bucket.
606
622
  # @param [String] namespace_name The top-level namespace used for the request.
607
- # @param [String] bucket_name The name of the bucket.
608
- #
623
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
609
624
  # Example: `my-new-bucket1`
610
625
  #
611
- # @param [String] par_id The unique identifier for the pre-authenticated request (PAR). This can be used to manage the PAR
612
- # such as GET or DELETE the PAR
626
+ # @param [String] par_id The unique identifier for the pre-authenticated request. This can be used to manage operations against
627
+ # the pre-authenticated request, such as GET or DELETE.
613
628
  #
614
629
  # @param [Hash] opts the optional parameters
615
630
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -644,11 +659,10 @@ module OCI
644
659
  :return_type => 'OCI::ObjectStorage::Models::PreauthenticatedRequestSummary')
645
660
  end
646
661
 
647
- # Efficiently checks if a bucket exists and gets the current ETag for the bucket.
662
+ # Efficiently checks to see if a bucket exists and gets the current ETag for the bucket.
648
663
  #
649
664
  # @param [String] namespace_name The top-level namespace used for the request.
650
- # @param [String] bucket_name The name of the bucket.
651
- #
665
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
652
666
  # Example: `my-new-bucket1`
653
667
  #
654
668
  # @param [Hash] opts the optional parameters
@@ -656,8 +670,7 @@ module OCI
656
670
  # For uploading a part, this is the entity tag of the target part.
657
671
  #
658
672
  # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
659
- # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag
660
- # of the target part.
673
+ # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
661
674
  #
662
675
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
663
676
  # @return [Response] A Response object with data of type nil
@@ -694,12 +707,10 @@ module OCI
694
707
  # Gets the user-defined metadata and entity tag for an object.
695
708
  #
696
709
  # @param [String] namespace_name The top-level namespace used for the request.
697
- # @param [String] bucket_name The name of the bucket.
698
- #
710
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
699
711
  # Example: `my-new-bucket1`
700
712
  #
701
- # @param [String] object_name The name of the object.
702
- #
713
+ # @param [String] object_name The name of the object. Avoid entering confidential information.
703
714
  # Example: `test/object1.log`
704
715
  #
705
716
  # @param [Hash] opts the optional parameters
@@ -707,8 +718,7 @@ module OCI
707
718
  # For uploading a part, this is the entity tag of the target part.
708
719
  #
709
720
  # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
710
- # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag
711
- # of the target part.
721
+ # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
712
722
  #
713
723
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
714
724
  # @return [Response] A Response object with data of type nil
@@ -746,8 +756,8 @@ module OCI
746
756
  # Gets a list of all `BucketSummary`s in a compartment. A `BucketSummary` contains only summary fields for the bucket
747
757
  # and does not contain fields like the user-defined metadata.
748
758
  #
749
- # To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
750
- # talk to an administrator. If you're an administrator who needs to write policies to give users access, see
759
+ # To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
760
+ # talk to an administrator. If you're an administrator who needs to write policies to give users access, see
751
761
  # [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
752
762
  #
753
763
  # @param [String] namespace_name The top-level namespace used for the request.
@@ -792,12 +802,10 @@ module OCI
792
802
  # Lists the parts of an in-progress multipart upload.
793
803
  #
794
804
  # @param [String] namespace_name The top-level namespace used for the request.
795
- # @param [String] bucket_name The name of the bucket.
796
- #
805
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
797
806
  # Example: `my-new-bucket1`
798
807
  #
799
- # @param [String] object_name The name of the object.
800
- #
808
+ # @param [String] object_name The name of the object. Avoid entering confidential information.
801
809
  # Example: `test/object1.log`
802
810
  #
803
811
  # @param [String] upload_id The upload ID for a multipart upload.
@@ -843,8 +851,7 @@ module OCI
843
851
  # Lists all in-progress multipart uploads for the given bucket in the given namespace.
844
852
  #
845
853
  # @param [String] namespace_name The top-level namespace used for the request.
846
- # @param [String] bucket_name The name of the bucket.
847
- #
854
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
848
855
  # Example: `my-new-bucket1`
849
856
  #
850
857
  # @param [Hash] opts the optional parameters
@@ -885,13 +892,12 @@ module OCI
885
892
 
886
893
  # Lists the objects in a bucket.
887
894
  #
888
- # To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
889
- # talk to an administrator. If you're an administrator who needs to write policies to give users access, see
895
+ # To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
896
+ # talk to an administrator. If you're an administrator who needs to write policies to give users access, see
890
897
  # [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
891
898
  #
892
899
  # @param [String] namespace_name The top-level namespace used for the request.
893
- # @param [String] bucket_name The name of the bucket.
894
- #
900
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
895
901
  # Example: `my-new-bucket1`
896
902
  #
897
903
  # @param [Hash] opts the optional parameters
@@ -910,6 +916,7 @@ module OCI
910
916
  # Value of this parameter should be a comma-separated, case-insensitive list of those field names.
911
917
  # For example 'name,timeCreated,md5'.
912
918
  #
919
+ # Allowed values are: name, size, timeCreated, md5
913
920
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
914
921
  # @return [Response] A Response object with data of type OCI::ObjectStorage::Models::ListObjects
915
922
  def list_objects(namespace_name, bucket_name, opts = {})
@@ -951,15 +958,14 @@ module OCI
951
958
  :return_type => 'OCI::ObjectStorage::Models::ListObjects')
952
959
  end
953
960
 
954
- # List pre-authenticated requests for the bucket
961
+ # Lists pre-authenticated requests for the bucket.
955
962
  #
956
963
  # @param [String] namespace_name The top-level namespace used for the request.
957
- # @param [String] bucket_name The name of the bucket.
958
- #
964
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
959
965
  # Example: `my-new-bucket1`
960
966
  #
961
967
  # @param [Hash] opts the optional parameters
962
- # @option opts [String] :object_name_prefix Pre-authenticated requests returned by the list must have object names starting with prefix
968
+ # @option opts [String] :object_name_prefix User-specified object name prefixes can be used to query and return a list of pre-authenticated requests.
963
969
  # @option opts [Integer] :limit The maximum number of items to return.
964
970
  # @option opts [String] :page The page at which to start retrieving results.
965
971
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
@@ -998,17 +1004,11 @@ module OCI
998
1004
 
999
1005
  # Creates a new object or overwrites an existing one.
1000
1006
  #
1001
- # To use this and other API operations, you must be authorized in an IAM policy. If you're not authorized,
1002
- # talk to an administrator. If you're an administrator who needs to write policies to give users access, see
1003
- # [Getting Started with Policies](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
1004
- #
1005
1007
  # @param [String] namespace_name The top-level namespace used for the request.
1006
- # @param [String] bucket_name The name of the bucket.
1007
- #
1008
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
1008
1009
  # Example: `my-new-bucket1`
1009
1010
  #
1010
- # @param [String] object_name The name of the object.
1011
- #
1011
+ # @param [String] object_name The name of the object. Avoid entering confidential information.
1012
1012
  # Example: `test/object1.log`
1013
1013
  #
1014
1014
  # @param [String, IO] put_object_body The object to upload to the object store.
@@ -1018,8 +1018,7 @@ module OCI
1018
1018
  # For uploading a part, this is the entity tag of the target part.
1019
1019
  #
1020
1020
  # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
1021
- # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag
1022
- # of the target part.
1021
+ # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
1023
1022
  #
1024
1023
  # @option opts [String] :opc_client_request_id The client request ID for tracing.
1025
1024
  # @option opts [String] :expect 100-continue (default to 100-continue)
@@ -1072,11 +1071,88 @@ module OCI
1072
1071
  :body => post_body)
1073
1072
  end
1074
1073
 
1075
- # Performs a partial or full update of a bucket's user-defined metadata.
1074
+ # Rename an object from source key to target key in the given namespace.
1075
+ #
1076
+ # @param [String] namespace_name The top-level namespace used for the request.
1077
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
1078
+ # Example: `my-new-bucket1`
1079
+ #
1080
+ # @param [RenameObjectDetails] rename_object_details The sourceName and newName of rename operation.
1081
+ # @param [Hash] opts the optional parameters
1082
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
1083
+ # @return [Response] A Response object with data of type nil
1084
+ def rename_object(namespace_name, bucket_name, rename_object_details, opts = {})
1085
+ logger.debug "Calling operation ObjectStorageClient#rename_object." if logger
1086
+
1087
+ fail "Missing the required parameter 'namespace_name' when calling rename_object." if namespace_name.nil?
1088
+ fail "Missing the required parameter 'bucket_name' when calling rename_object." if bucket_name.nil?
1089
+ fail "Missing the required parameter 'rename_object_details' when calling rename_object." if rename_object_details.nil?
1090
+
1091
+ path = "/n/{namespaceName}/b/{bucketName}/actions/renameObject".sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
1092
+
1093
+ # Query Params
1094
+ query_params = {}
1095
+
1096
+ # Header Params
1097
+ header_params = {}
1098
+ header_params['accept'] = 'application/json'
1099
+ header_params['content-type'] = 'application/json'
1100
+ header_params[:'opc-client-request-id'] = opts[:'opc_client_request_id'] if opts[:'opc_client_request_id']
1101
+
1102
+ post_body = @api_client.object_to_http_body(rename_object_details)
1103
+
1104
+ return @api_client.call_api(
1105
+ :POST,
1106
+ path,
1107
+ endpoint,
1108
+ :header_params => header_params,
1109
+ :query_params => query_params,
1110
+ :body => post_body)
1111
+ end
1112
+
1113
+ # Restore one or more objects specified by objectName parameter.
1076
1114
  #
1077
1115
  # @param [String] namespace_name The top-level namespace used for the request.
1078
- # @param [String] bucket_name The name of the bucket.
1116
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
1117
+ # Example: `my-new-bucket1`
1079
1118
  #
1119
+ # @param [RestoreObjectsDetails] restore_objects_details Request to restore objects.
1120
+ # @param [Hash] opts the optional parameters
1121
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
1122
+ # @return [Response] A Response object with data of type nil
1123
+ def restore_objects(namespace_name, bucket_name, restore_objects_details, opts = {})
1124
+ logger.debug "Calling operation ObjectStorageClient#restore_objects." if logger
1125
+
1126
+ fail "Missing the required parameter 'namespace_name' when calling restore_objects." if namespace_name.nil?
1127
+ fail "Missing the required parameter 'bucket_name' when calling restore_objects." if bucket_name.nil?
1128
+ fail "Missing the required parameter 'restore_objects_details' when calling restore_objects." if restore_objects_details.nil?
1129
+
1130
+ path = "/n/{namespaceName}/b/{bucketName}/actions/restoreObjects".sub('{namespaceName}', namespace_name.to_s).sub('{bucketName}', bucket_name.to_s)
1131
+
1132
+ # Query Params
1133
+ query_params = {}
1134
+
1135
+ # Header Params
1136
+ header_params = {}
1137
+ header_params['accept'] = 'application/json'
1138
+ header_params['content-type'] = 'application/json'
1139
+ header_params[:'opc-client-request-id'] = opts[:'opc_client_request_id'] if opts[:'opc_client_request_id']
1140
+
1141
+ post_body = @api_client.object_to_http_body(restore_objects_details)
1142
+
1143
+ return @api_client.call_api(
1144
+ :POST,
1145
+ path,
1146
+ endpoint,
1147
+ :header_params => header_params,
1148
+ :query_params => query_params,
1149
+ :body => post_body)
1150
+ end
1151
+
1152
+ # Performs a partial or full update of a bucket's user-defined metadata.
1153
+ #
1154
+ # @param [String] namespace_name The top-level namespace used for the request.
1155
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
1080
1156
  # Example: `my-new-bucket1`
1081
1157
  #
1082
1158
  # @param [UpdateBucketDetails] update_bucket_details Request object for updating a bucket.
@@ -1117,15 +1193,52 @@ module OCI
1117
1193
  :return_type => 'OCI::ObjectStorage::Models::Bucket')
1118
1194
  end
1119
1195
 
1196
+ # Change the default Swift/S3 compartmentId of user's namespace into the user-defined compartmentId. Upon doing
1197
+ # this, all subsequent bucket creations will use the new default compartment, but no previously created
1198
+ # buckets will be modified. A user must have the NAMESPACE_UPDATE permission to make changes to the default
1199
+ # compartments for S3 and Swift.
1200
+ #
1201
+ # @param [String] namespace_name The top-level namespace used for the request.
1202
+ # @param [UpdateNamespaceMetadataDetails] update_namespace_metadata_details Request object for update NamespaceMetadata.
1203
+ # @param [Hash] opts the optional parameters
1204
+ # @option opts [String] :opc_client_request_id The client request ID for tracing.
1205
+ # @return [Response] A Response object with data of type OCI::ObjectStorage::Models::NamespaceMetadata
1206
+ def update_namespace_metadata(namespace_name, update_namespace_metadata_details, opts = {})
1207
+ logger.debug "Calling operation ObjectStorageClient#update_namespace_metadata." if logger
1208
+
1209
+ fail "Missing the required parameter 'namespace_name' when calling update_namespace_metadata." if namespace_name.nil?
1210
+ fail "Missing the required parameter 'update_namespace_metadata_details' when calling update_namespace_metadata." if update_namespace_metadata_details.nil?
1211
+
1212
+ path = "/n/{namespaceName}".sub('{namespaceName}', namespace_name.to_s)
1213
+
1214
+ # Query Params
1215
+ query_params = {}
1216
+
1217
+ # Header Params
1218
+ header_params = {}
1219
+ header_params['accept'] = 'application/json'
1220
+ header_params['content-type'] = 'application/json'
1221
+ header_params[:'opc-client-request-id'] = opts[:'opc_client_request_id'] if opts[:'opc_client_request_id']
1222
+
1223
+ post_body = @api_client.object_to_http_body(update_namespace_metadata_details)
1224
+
1225
+ return @api_client.call_api(
1226
+ :PUT,
1227
+ path,
1228
+ endpoint,
1229
+ :header_params => header_params,
1230
+ :query_params => query_params,
1231
+ :body => post_body,
1232
+ :return_type => 'OCI::ObjectStorage::Models::NamespaceMetadata')
1233
+ end
1234
+
1120
1235
  # Uploads a single part of a multipart upload.
1121
1236
  #
1122
1237
  # @param [String] namespace_name The top-level namespace used for the request.
1123
- # @param [String] bucket_name The name of the bucket.
1124
- #
1238
+ # @param [String] bucket_name The name of the bucket. Avoid entering confidential information.
1125
1239
  # Example: `my-new-bucket1`
1126
1240
  #
1127
- # @param [String] object_name The name of the object.
1128
- #
1241
+ # @param [String] object_name The name of the object. Avoid entering confidential information.
1129
1242
  # Example: `test/object1.log`
1130
1243
  #
1131
1244
  # @param [String] upload_id The upload ID for a multipart upload.
@@ -1138,8 +1251,7 @@ module OCI
1138
1251
  # For uploading a part, this is the entity tag of the target part.
1139
1252
  #
1140
1253
  # @option opts [String] :if_none_match The entity tag to avoid matching. The only valid value is \u2018*\u2019, which indicates that the request should fail if the object already exists.
1141
- # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag
1142
- # of the target part.
1254
+ # For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a part, this is the entity tag of the target part.
1143
1255
  #
1144
1256
  # @option opts [String] :expect 100-continue (default to 100-continue)
1145
1257
  # @option opts [String] :content_md5 The base-64 encoded MD5 hash of the body.