oci 2.0.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.
- checksums.yaml +7 -0
- data/LICENSE.txt +82 -0
- data/README.md +262 -0
- data/lib/oci.rb +25 -0
- data/lib/oci/api_client.rb +389 -0
- data/lib/oci/config.rb +118 -0
- data/lib/oci/config_file_loader.rb +96 -0
- data/lib/oci/core/blockstorage_client.rb +462 -0
- data/lib/oci/core/compute_client.rb +1415 -0
- data/lib/oci/core/core.rb +114 -0
- data/lib/oci/core/models/attach_i_scsi_volume_details.rb +137 -0
- data/lib/oci/core/models/attach_vnic_details.rb +144 -0
- data/lib/oci/core/models/attach_volume_details.rb +165 -0
- data/lib/oci/core/models/capture_console_history_details.rb +120 -0
- data/lib/oci/core/models/console_history.rb +213 -0
- data/lib/oci/core/models/cpe.rb +169 -0
- data/lib/oci/core/models/create_cpe_details.rb +145 -0
- data/lib/oci/core/models/create_cross_connect_details.rb +204 -0
- data/lib/oci/core/models/create_cross_connect_group_details.rb +133 -0
- data/lib/oci/core/models/create_dhcp_details.rb +153 -0
- data/lib/oci/core/models/create_drg_attachment_details.rb +142 -0
- data/lib/oci/core/models/create_drg_details.rb +131 -0
- data/lib/oci/core/models/create_image_details.rb +159 -0
- data/lib/oci/core/models/create_instance_console_connection_details.rb +131 -0
- data/lib/oci/core/models/create_internet_gateway_details.rb +153 -0
- data/lib/oci/core/models/create_ip_sec_connection_details.rb +168 -0
- data/lib/oci/core/models/create_private_ip_details.rb +173 -0
- data/lib/oci/core/models/create_route_table_details.rb +153 -0
- data/lib/oci/core/models/create_security_list_details.rb +164 -0
- data/lib/oci/core/models/create_subnet_details.rb +257 -0
- data/lib/oci/core/models/create_vcn_details.rb +171 -0
- data/lib/oci/core/models/create_virtual_circuit_details.rb +260 -0
- data/lib/oci/core/models/create_vnic_details.rb +214 -0
- data/lib/oci/core/models/create_volume_backup_details.rb +133 -0
- data/lib/oci/core/models/create_volume_details.rb +170 -0
- data/lib/oci/core/models/cross_connect.rb +235 -0
- data/lib/oci/core/models/cross_connect_group.rb +187 -0
- data/lib/oci/core/models/cross_connect_location.rb +134 -0
- data/lib/oci/core/models/cross_connect_mapping.rb +190 -0
- data/lib/oci/core/models/cross_connect_port_speed_shape.rb +137 -0
- data/lib/oci/core/models/cross_connect_status.rb +200 -0
- data/lib/oci/core/models/dhcp_dns_option.rb +171 -0
- data/lib/oci/core/models/dhcp_option.rb +135 -0
- data/lib/oci/core/models/dhcp_options.rb +208 -0
- data/lib/oci/core/models/dhcp_search_domain_option.rb +141 -0
- data/lib/oci/core/models/drg.rb +186 -0
- data/lib/oci/core/models/drg_attachment.rb +208 -0
- data/lib/oci/core/models/egress_security_rule.rb +198 -0
- data/lib/oci/core/models/export_image_details.rb +134 -0
- data/lib/oci/core/models/export_image_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/export_image_via_object_storage_uri_details.rb +130 -0
- data/lib/oci/core/models/fast_connect_provider_service.rb +145 -0
- data/lib/oci/core/models/i_scsi_volume_attachment.rb +212 -0
- data/lib/oci/core/models/icmp_options.rb +131 -0
- data/lib/oci/core/models/image.rb +245 -0
- data/lib/oci/core/models/image_source_details.rb +134 -0
- data/lib/oci/core/models/image_source_via_object_storage_tuple_details.rb +150 -0
- data/lib/oci/core/models/image_source_via_object_storage_uri_details.rb +128 -0
- data/lib/oci/core/models/ingress_security_rule.rb +198 -0
- data/lib/oci/core/models/instance.rb +307 -0
- data/lib/oci/core/models/instance_console_connection.rb +193 -0
- data/lib/oci/core/models/instance_credentials.rb +131 -0
- data/lib/oci/core/models/internet_gateway.rb +210 -0
- data/lib/oci/core/models/ip_sec_connection.rb +223 -0
- data/lib/oci/core/models/ip_sec_connection_device_config.rb +153 -0
- data/lib/oci/core/models/ip_sec_connection_device_status.rb +156 -0
- data/lib/oci/core/models/launch_instance_details.rb +336 -0
- data/lib/oci/core/models/letter_of_authority.rb +194 -0
- data/lib/oci/core/models/port_range.rb +133 -0
- data/lib/oci/core/models/private_ip.rb +248 -0
- data/lib/oci/core/models/route_rule.rb +135 -0
- data/lib/oci/core/models/route_table.rb +208 -0
- data/lib/oci/core/models/security_list.rb +219 -0
- data/lib/oci/core/models/shape.rb +122 -0
- data/lib/oci/core/models/subnet.rb +351 -0
- data/lib/oci/core/models/tcp_options.rb +135 -0
- data/lib/oci/core/models/tunnel_config.rb +151 -0
- data/lib/oci/core/models/tunnel_status.rb +178 -0
- data/lib/oci/core/models/udp_options.rb +135 -0
- data/lib/oci/core/models/update_cpe_details.rb +122 -0
- data/lib/oci/core/models/update_cross_connect_details.rb +138 -0
- data/lib/oci/core/models/update_cross_connect_group_details.rb +122 -0
- data/lib/oci/core/models/update_dhcp_details.rb +132 -0
- data/lib/oci/core/models/update_drg_attachment_details.rb +122 -0
- data/lib/oci/core/models/update_drg_details.rb +122 -0
- data/lib/oci/core/models/update_image_details.rb +124 -0
- data/lib/oci/core/models/update_instance_details.rb +124 -0
- data/lib/oci/core/models/update_internet_gateway_details.rb +133 -0
- data/lib/oci/core/models/update_ip_sec_connection_details.rb +122 -0
- data/lib/oci/core/models/update_private_ip_details.rb +157 -0
- data/lib/oci/core/models/update_route_table_details.rb +133 -0
- data/lib/oci/core/models/update_security_list_details.rb +144 -0
- data/lib/oci/core/models/update_subnet_details.rb +122 -0
- data/lib/oci/core/models/update_vcn_details.rb +122 -0
- data/lib/oci/core/models/update_virtual_circuit_details.rb +240 -0
- data/lib/oci/core/models/update_vnic_details.rb +144 -0
- data/lib/oci/core/models/update_volume_backup_details.rb +122 -0
- data/lib/oci/core/models/update_volume_details.rb +122 -0
- data/lib/oci/core/models/vcn.rb +276 -0
- data/lib/oci/core/models/virtual_circuit.rb +395 -0
- data/lib/oci/core/models/virtual_circuit_bandwidth_shape.rb +137 -0
- data/lib/oci/core/models/vnic.rb +287 -0
- data/lib/oci/core/models/vnic_attachment.rb +250 -0
- data/lib/oci/core/models/volume.rb +210 -0
- data/lib/oci/core/models/volume_attachment.rb +246 -0
- data/lib/oci/core/models/volume_backup.rb +235 -0
- data/lib/oci/core/util.rb +1 -0
- data/lib/oci/core/virtual_network_client.rb +3421 -0
- data/lib/oci/errors.rb +78 -0
- data/lib/oci/global_context.rb +20 -0
- data/lib/oci/identity/identity.rb +55 -0
- data/lib/oci/identity/identity_client.rb +2148 -0
- data/lib/oci/identity/models/add_user_to_group_details.rb +131 -0
- data/lib/oci/identity/models/api_key.rb +211 -0
- data/lib/oci/identity/models/availability_domain.rb +131 -0
- data/lib/oci/identity/models/compartment.rb +211 -0
- data/lib/oci/identity/models/create_api_key_details.rb +120 -0
- data/lib/oci/identity/models/create_compartment_details.rb +145 -0
- data/lib/oci/identity/models/create_customer_secret_key_details.rb +121 -0
- data/lib/oci/identity/models/create_group_details.rb +144 -0
- data/lib/oci/identity/models/create_identity_provider_details.rb +215 -0
- data/lib/oci/identity/models/create_idp_group_mapping_details.rb +133 -0
- data/lib/oci/identity/models/create_policy_details.rb +173 -0
- data/lib/oci/identity/models/create_region_subscription_details.rb +128 -0
- data/lib/oci/identity/models/create_saml2_identity_provider_details.rb +154 -0
- data/lib/oci/identity/models/create_swift_password_details.rb +121 -0
- data/lib/oci/identity/models/create_user_details.rb +144 -0
- data/lib/oci/identity/models/customer_secret_key.rb +225 -0
- data/lib/oci/identity/models/customer_secret_key_summary.rb +213 -0
- data/lib/oci/identity/models/group.rb +211 -0
- data/lib/oci/identity/models/identity_provider.rb +261 -0
- data/lib/oci/identity/models/idp_group_mapping.rb +220 -0
- data/lib/oci/identity/models/policy.rb +237 -0
- data/lib/oci/identity/models/region.rb +143 -0
- data/lib/oci/identity/models/region_subscription.rb +180 -0
- data/lib/oci/identity/models/saml2_identity_provider.rb +180 -0
- data/lib/oci/identity/models/swift_password.rb +226 -0
- data/lib/oci/identity/models/tenancy.rb +159 -0
- data/lib/oci/identity/models/ui_password.rb +187 -0
- data/lib/oci/identity/models/update_compartment_details.rb +132 -0
- data/lib/oci/identity/models/update_customer_secret_key_details.rb +120 -0
- data/lib/oci/identity/models/update_group_details.rb +120 -0
- data/lib/oci/identity/models/update_identity_provider_details.rb +160 -0
- data/lib/oci/identity/models/update_idp_group_mapping_details.rb +131 -0
- data/lib/oci/identity/models/update_policy_details.rb +148 -0
- data/lib/oci/identity/models/update_saml2_identity_provider_details.rb +145 -0
- data/lib/oci/identity/models/update_state_details.rb +121 -0
- data/lib/oci/identity/models/update_swift_password_details.rb +120 -0
- data/lib/oci/identity/models/update_user_details.rb +120 -0
- data/lib/oci/identity/models/user.rb +217 -0
- data/lib/oci/identity/models/user_group_membership.rb +209 -0
- data/lib/oci/identity/util.rb +1 -0
- data/lib/oci/internal/internal.rb +10 -0
- data/lib/oci/internal/util.rb +69 -0
- data/lib/oci/load_balancer/load_balancer.rb +51 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +1449 -0
- data/lib/oci/load_balancer/models/backend.rb +220 -0
- data/lib/oci/load_balancer/models/backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/backend_health.rb +158 -0
- data/lib/oci/load_balancer/models/backend_set.rb +182 -0
- data/lib/oci/load_balancer/models/backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/backend_set_health.rb +207 -0
- data/lib/oci/load_balancer/models/certificate.rb +169 -0
- data/lib/oci/load_balancer/models/certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_backend_details.rb +206 -0
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +181 -0
- data/lib/oci/load_balancer/models/create_certificate_details.rb +205 -0
- data/lib/oci/load_balancer/models/create_listener_details.rb +175 -0
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +220 -0
- data/lib/oci/load_balancer/models/health_check_result.rb +183 -0
- data/lib/oci/load_balancer/models/health_checker.rb +224 -0
- data/lib/oci/load_balancer/models/health_checker_details.rb +223 -0
- data/lib/oci/load_balancer/models/ip_address.rb +139 -0
- data/lib/oci/load_balancer/models/listener.rb +174 -0
- data/lib/oci/load_balancer/models/listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/load_balancer.rb +280 -0
- data/lib/oci/load_balancer/models/load_balancer_health.rb +215 -0
- data/lib/oci/load_balancer/models/load_balancer_health_summary.rb +168 -0
- data/lib/oci/load_balancer/models/load_balancer_policy.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_protocol.rb +120 -0
- data/lib/oci/load_balancer/models/load_balancer_shape.rb +120 -0
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +141 -0
- data/lib/oci/load_balancer/models/ssl_configuration.rb +155 -0
- data/lib/oci/load_balancer/models/ssl_configuration_details.rb +155 -0
- data/lib/oci/load_balancer/models/update_backend_details.rb +178 -0
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +165 -0
- data/lib/oci/load_balancer/models/update_health_checker_details.rb +222 -0
- data/lib/oci/load_balancer/models/update_listener_details.rb +160 -0
- data/lib/oci/load_balancer/models/update_load_balancer_details.rb +124 -0
- data/lib/oci/load_balancer/models/work_request.rb +229 -0
- data/lib/oci/load_balancer/models/work_request_error.rb +145 -0
- data/lib/oci/load_balancer/util.rb +58 -0
- data/lib/oci/object_storage/models/bucket.rb +216 -0
- data/lib/oci/object_storage/models/bucket_summary.rb +175 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_details.rb +133 -0
- data/lib/oci/object_storage/models/commit_multipart_upload_part_details.rb +131 -0
- data/lib/oci/object_storage/models/create_bucket_details.rb +173 -0
- data/lib/oci/object_storage/models/create_multipart_upload_details.rb +166 -0
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +171 -0
- data/lib/oci/object_storage/models/list_objects.rb +146 -0
- data/lib/oci/object_storage/models/multipart_upload.rb +164 -0
- data/lib/oci/object_storage/models/multipart_upload_part_summary.rb +153 -0
- data/lib/oci/object_storage/models/object_summary.rb +153 -0
- data/lib/oci/object_storage/models/preauthenticated_request.rb +207 -0
- data/lib/oci/object_storage/models/preauthenticated_request_summary.rb +196 -0
- data/lib/oci/object_storage/models/update_bucket_details.rb +171 -0
- data/lib/oci/object_storage/object_storage.rb +30 -0
- data/lib/oci/object_storage/object_storage_client.rb +1185 -0
- data/lib/oci/object_storage/util.rb +1 -0
- data/lib/oci/regions.rb +43 -0
- data/lib/oci/response.rb +80 -0
- data/lib/oci/response_headers.rb +144 -0
- data/lib/oci/signer.rb +157 -0
- data/lib/oci/version.rb +5 -0
- data/lib/oci/waiter.rb +101 -0
- data/lib/oraclebmc.rb +3 -0
- metadata +375 -0
|
@@ -0,0 +1,133 @@
|
|
|
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::CommitMultipartUploadDetails
|
|
7
|
+
# The part numbers and ETags for the parts to be committed.
|
|
8
|
+
# @return [Array<OCI::ObjectStorage::Models::CommitMultipartUploadPartDetails>]
|
|
9
|
+
attr_accessor :parts_to_commit
|
|
10
|
+
|
|
11
|
+
# The part numbers for the parts to be excluded from the completed object.
|
|
12
|
+
# Each part created for this upload must be in either partsToExclude or partsToCommit, but cannot be in both.
|
|
13
|
+
#
|
|
14
|
+
# @return [Array<Integer>]
|
|
15
|
+
attr_accessor :parts_to_exclude
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Initializes the object
|
|
19
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
20
|
+
def initialize(attributes = {})
|
|
21
|
+
return unless attributes.is_a?(Hash)
|
|
22
|
+
|
|
23
|
+
# convert string to symbol for hash key
|
|
24
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
25
|
+
|
|
26
|
+
if attributes[:'partsToCommit']
|
|
27
|
+
self.parts_to_commit = attributes[:'partsToCommit']
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
if attributes[:'partsToExclude']
|
|
31
|
+
self.parts_to_exclude = attributes[:'partsToExclude']
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Checks equality by comparing each attribute.
|
|
37
|
+
# @param [Object] other_object to be compared
|
|
38
|
+
def ==(other_object)
|
|
39
|
+
return true if self.equal?(other_object)
|
|
40
|
+
self.class == other_object.class &&
|
|
41
|
+
parts_to_commit == other_object.parts_to_commit &&
|
|
42
|
+
parts_to_exclude == other_object.parts_to_exclude
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# @see the `==` method
|
|
46
|
+
# @param [Object] other_object to be compared
|
|
47
|
+
def eql?(other_object)
|
|
48
|
+
self == other_object
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Calculates hash code according to all attributes.
|
|
52
|
+
# @return [Fixnum] Hash code
|
|
53
|
+
def hash
|
|
54
|
+
[parts_to_commit, parts_to_exclude].hash
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Builds the object from hash
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
# @return [Object] Returns the model itself
|
|
60
|
+
def build_from_hash(attributes)
|
|
61
|
+
return nil unless attributes.is_a?(Hash)
|
|
62
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
63
|
+
if type =~ /^Array<(.*)>/i
|
|
64
|
+
# check to ensure the input is an array given that the the attribute
|
|
65
|
+
# is documented as an array but the input is not
|
|
66
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
67
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
68
|
+
end
|
|
69
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
70
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
71
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
self
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns the string representation of the object
|
|
78
|
+
# @return [String] String presentation of the object
|
|
79
|
+
def to_s
|
|
80
|
+
to_hash.to_s
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Returns the object in the form of hash
|
|
84
|
+
# @return [Hash] Returns the object in the form of hash
|
|
85
|
+
def to_hash
|
|
86
|
+
hash = {}
|
|
87
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
88
|
+
value = self.send(attr)
|
|
89
|
+
next if value.nil?
|
|
90
|
+
hash[param] = _to_hash(value)
|
|
91
|
+
end
|
|
92
|
+
hash
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
private
|
|
96
|
+
|
|
97
|
+
# Outputs non-array value in the form of hash
|
|
98
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
99
|
+
# @param [Object] value Any valid value
|
|
100
|
+
# @return [Hash] Returns the value in the form of hash
|
|
101
|
+
def _to_hash(value)
|
|
102
|
+
if value.is_a?(Array)
|
|
103
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
104
|
+
elsif value.is_a?(Hash)
|
|
105
|
+
{}.tap do |hash|
|
|
106
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
107
|
+
end
|
|
108
|
+
elsif value.respond_to? :to_hash
|
|
109
|
+
value.to_hash
|
|
110
|
+
else
|
|
111
|
+
value
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
118
|
+
def self.attribute_map
|
|
119
|
+
{
|
|
120
|
+
:'parts_to_commit' => :'partsToCommit',
|
|
121
|
+
:'parts_to_exclude' => :'partsToExclude'
|
|
122
|
+
}
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Attribute type mapping.
|
|
126
|
+
def self.swagger_types
|
|
127
|
+
{
|
|
128
|
+
:'parts_to_commit' => :'Array<OCI::ObjectStorage::Models::CommitMultipartUploadPartDetails>',
|
|
129
|
+
:'parts_to_exclude' => :'Array<Integer>'
|
|
130
|
+
}
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|
|
@@ -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::CommitMultipartUploadPartDetails
|
|
7
|
+
# The part number for this part.
|
|
8
|
+
# @return [Integer]
|
|
9
|
+
attr_accessor :part_num
|
|
10
|
+
|
|
11
|
+
# The ETag returned when this part was uploaded.
|
|
12
|
+
# @return [String]
|
|
13
|
+
attr_accessor :etag
|
|
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[:'partNum']
|
|
25
|
+
self.part_num = attributes[:'partNum']
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
if attributes[:'etag']
|
|
29
|
+
self.etag = attributes[:'etag']
|
|
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
|
+
part_num == other_object.part_num &&
|
|
40
|
+
etag == other_object.etag
|
|
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
|
+
[part_num, etag].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 = self.send(attr)
|
|
87
|
+
next if value.nil?
|
|
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
|
+
:'part_num' => :'partNum',
|
|
119
|
+
:'etag' => :'etag'
|
|
120
|
+
}
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Attribute type mapping.
|
|
124
|
+
def self.swagger_types
|
|
125
|
+
{
|
|
126
|
+
:'part_num' => :'Integer',
|
|
127
|
+
:'etag' => :'String'
|
|
128
|
+
}
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
@@ -0,0 +1,173 @@
|
|
|
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::CreateBucketDetails
|
|
7
|
+
|
|
8
|
+
PUBLIC_ACCESS_TYPE_ENUM = [PUBLIC_ACCESS_TYPE_NO_PUBLIC_ACCESS = 'NoPublicAccess',
|
|
9
|
+
PUBLIC_ACCESS_TYPE_OBJECT_READ = 'ObjectRead']
|
|
10
|
+
|
|
11
|
+
# The name of the bucket. Valid characters are uppercase or lowercase letters,
|
|
12
|
+
# numbers, and dashes. Bucket names must be unique within the namespace.
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :name
|
|
16
|
+
|
|
17
|
+
# The ID of the compartment in which to create the bucket.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :compartment_id
|
|
20
|
+
|
|
21
|
+
# Arbitrary string, up to 4KB, of keys and values for user-defined metadata.
|
|
22
|
+
# @return [Hash<String, String>]
|
|
23
|
+
attr_accessor :metadata
|
|
24
|
+
|
|
25
|
+
# The type of public access available on this bucket. Allows authenticated caller to access the bucket or
|
|
26
|
+
# contents of this bucket. By default a bucket is set to NoPublicAccess. It is treated as NoPublicAccess
|
|
27
|
+
# when this value is not specified. When the type is NoPublicAccess the bucket does not allow any public access.
|
|
28
|
+
# When the type is ObjectRead the bucket allows public access to the GetObject, HeadObject, ListObjects.
|
|
29
|
+
#
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :public_access_type
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Initializes the object
|
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
36
|
+
def initialize(attributes = {})
|
|
37
|
+
return unless attributes.is_a?(Hash)
|
|
38
|
+
|
|
39
|
+
# convert string to symbol for hash key
|
|
40
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
41
|
+
|
|
42
|
+
if attributes[:'name']
|
|
43
|
+
self.name = attributes[:'name']
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
if attributes[:'compartmentId']
|
|
47
|
+
self.compartment_id = attributes[:'compartmentId']
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
if attributes[:'metadata']
|
|
51
|
+
self.metadata = attributes[:'metadata']
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
if attributes[:'publicAccessType']
|
|
55
|
+
self.public_access_type = attributes[:'publicAccessType']
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
61
|
+
# @param [Object] public_access_type Object to be assigned
|
|
62
|
+
def public_access_type=(public_access_type)
|
|
63
|
+
if public_access_type && !PUBLIC_ACCESS_TYPE_ENUM.include?(public_access_type)
|
|
64
|
+
fail "Invalid value for 'public_access_type': this must be one of the values in PUBLIC_ACCESS_TYPE_ENUM."
|
|
65
|
+
else
|
|
66
|
+
@public_access_type = public_access_type
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Checks equality by comparing each attribute.
|
|
71
|
+
# @param [Object] other_object to be compared
|
|
72
|
+
def ==(other_object)
|
|
73
|
+
return true if self.equal?(other_object)
|
|
74
|
+
self.class == other_object.class &&
|
|
75
|
+
name == other_object.name &&
|
|
76
|
+
compartment_id == other_object.compartment_id &&
|
|
77
|
+
metadata == other_object.metadata &&
|
|
78
|
+
public_access_type == other_object.public_access_type
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# @see the `==` method
|
|
82
|
+
# @param [Object] other_object to be compared
|
|
83
|
+
def eql?(other_object)
|
|
84
|
+
self == other_object
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Calculates hash code according to all attributes.
|
|
88
|
+
# @return [Fixnum] Hash code
|
|
89
|
+
def hash
|
|
90
|
+
[name, compartment_id, metadata, public_access_type].hash
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Builds the object from hash
|
|
94
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
95
|
+
# @return [Object] Returns the model itself
|
|
96
|
+
def build_from_hash(attributes)
|
|
97
|
+
return nil unless attributes.is_a?(Hash)
|
|
98
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
99
|
+
if type =~ /^Array<(.*)>/i
|
|
100
|
+
# check to ensure the input is an array given that the the attribute
|
|
101
|
+
# is documented as an array but the input is not
|
|
102
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
103
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
104
|
+
end
|
|
105
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
106
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
107
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
self
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Returns the string representation of the object
|
|
114
|
+
# @return [String] String presentation of the object
|
|
115
|
+
def to_s
|
|
116
|
+
to_hash.to_s
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Returns the object in the form of hash
|
|
120
|
+
# @return [Hash] Returns the object in the form of hash
|
|
121
|
+
def to_hash
|
|
122
|
+
hash = {}
|
|
123
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
124
|
+
value = self.send(attr)
|
|
125
|
+
next if value.nil?
|
|
126
|
+
hash[param] = _to_hash(value)
|
|
127
|
+
end
|
|
128
|
+
hash
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
private
|
|
132
|
+
|
|
133
|
+
# Outputs non-array value in the form of hash
|
|
134
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
135
|
+
# @param [Object] value Any valid value
|
|
136
|
+
# @return [Hash] Returns the value in the form of hash
|
|
137
|
+
def _to_hash(value)
|
|
138
|
+
if value.is_a?(Array)
|
|
139
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
140
|
+
elsif value.is_a?(Hash)
|
|
141
|
+
{}.tap do |hash|
|
|
142
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
143
|
+
end
|
|
144
|
+
elsif value.respond_to? :to_hash
|
|
145
|
+
value.to_hash
|
|
146
|
+
else
|
|
147
|
+
value
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
154
|
+
def self.attribute_map
|
|
155
|
+
{
|
|
156
|
+
:'name' => :'name',
|
|
157
|
+
:'compartment_id' => :'compartmentId',
|
|
158
|
+
:'metadata' => :'metadata',
|
|
159
|
+
:'public_access_type' => :'publicAccessType'
|
|
160
|
+
}
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Attribute type mapping.
|
|
164
|
+
def self.swagger_types
|
|
165
|
+
{
|
|
166
|
+
:'name' => :'String',
|
|
167
|
+
:'compartment_id' => :'String',
|
|
168
|
+
:'metadata' => :'Hash<String, String>',
|
|
169
|
+
:'public_access_type' => :'String'
|
|
170
|
+
}
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
end
|
|
@@ -0,0 +1,166 @@
|
|
|
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::CreateMultipartUploadDetails
|
|
7
|
+
# the name of the object to which this multi-part upload is targetted.
|
|
8
|
+
# @return [String]
|
|
9
|
+
attr_accessor :object
|
|
10
|
+
|
|
11
|
+
# the content type of the object to upload.
|
|
12
|
+
# @return [String]
|
|
13
|
+
attr_accessor :content_type
|
|
14
|
+
|
|
15
|
+
# the content language of the object to upload.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :content_language
|
|
18
|
+
|
|
19
|
+
# the content encoding of the object to upload.
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :content_encoding
|
|
22
|
+
|
|
23
|
+
# Arbitrary string keys and values for the user-defined metadata for the object.
|
|
24
|
+
# Keys must be in \"opc-meta-*\" format.
|
|
25
|
+
#
|
|
26
|
+
# @return [Hash<String, String>]
|
|
27
|
+
attr_accessor :metadata
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Initializes the object
|
|
31
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
32
|
+
def initialize(attributes = {})
|
|
33
|
+
return unless attributes.is_a?(Hash)
|
|
34
|
+
|
|
35
|
+
# convert string to symbol for hash key
|
|
36
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
37
|
+
|
|
38
|
+
if attributes[:'object']
|
|
39
|
+
self.object = attributes[:'object']
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
if attributes[:'contentType']
|
|
43
|
+
self.content_type = attributes[:'contentType']
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
if attributes[:'contentLanguage']
|
|
47
|
+
self.content_language = attributes[:'contentLanguage']
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
if attributes[:'contentEncoding']
|
|
51
|
+
self.content_encoding = attributes[:'contentEncoding']
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
if attributes[:'metadata']
|
|
55
|
+
self.metadata = attributes[:'metadata']
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Checks equality by comparing each attribute.
|
|
61
|
+
# @param [Object] other_object to be compared
|
|
62
|
+
def ==(other_object)
|
|
63
|
+
return true if self.equal?(other_object)
|
|
64
|
+
self.class == other_object.class &&
|
|
65
|
+
object == other_object.object &&
|
|
66
|
+
content_type == other_object.content_type &&
|
|
67
|
+
content_language == other_object.content_language &&
|
|
68
|
+
content_encoding == other_object.content_encoding &&
|
|
69
|
+
metadata == other_object.metadata
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @see the `==` method
|
|
73
|
+
# @param [Object] other_object to be compared
|
|
74
|
+
def eql?(other_object)
|
|
75
|
+
self == other_object
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Calculates hash code according to all attributes.
|
|
79
|
+
# @return [Fixnum] Hash code
|
|
80
|
+
def hash
|
|
81
|
+
[object, content_type, content_language, content_encoding, metadata].hash
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Builds the object from hash
|
|
85
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
86
|
+
# @return [Object] Returns the model itself
|
|
87
|
+
def build_from_hash(attributes)
|
|
88
|
+
return nil unless attributes.is_a?(Hash)
|
|
89
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
90
|
+
if type =~ /^Array<(.*)>/i
|
|
91
|
+
# check to ensure the input is an array given that the the attribute
|
|
92
|
+
# is documented as an array but the input is not
|
|
93
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
94
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
|
95
|
+
end
|
|
96
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
97
|
+
self.send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
|
98
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
self
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Returns the string representation of the object
|
|
105
|
+
# @return [String] String presentation of the object
|
|
106
|
+
def to_s
|
|
107
|
+
to_hash.to_s
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Returns the object in the form of hash
|
|
111
|
+
# @return [Hash] Returns the object in the form of hash
|
|
112
|
+
def to_hash
|
|
113
|
+
hash = {}
|
|
114
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
115
|
+
value = self.send(attr)
|
|
116
|
+
next if value.nil?
|
|
117
|
+
hash[param] = _to_hash(value)
|
|
118
|
+
end
|
|
119
|
+
hash
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
private
|
|
123
|
+
|
|
124
|
+
# Outputs non-array value in the form of hash
|
|
125
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
126
|
+
# @param [Object] value Any valid value
|
|
127
|
+
# @return [Hash] Returns the value in the form of hash
|
|
128
|
+
def _to_hash(value)
|
|
129
|
+
if value.is_a?(Array)
|
|
130
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
131
|
+
elsif value.is_a?(Hash)
|
|
132
|
+
{}.tap do |hash|
|
|
133
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
134
|
+
end
|
|
135
|
+
elsif value.respond_to? :to_hash
|
|
136
|
+
value.to_hash
|
|
137
|
+
else
|
|
138
|
+
value
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
145
|
+
def self.attribute_map
|
|
146
|
+
{
|
|
147
|
+
:'object' => :'object',
|
|
148
|
+
:'content_type' => :'contentType',
|
|
149
|
+
:'content_language' => :'contentLanguage',
|
|
150
|
+
:'content_encoding' => :'contentEncoding',
|
|
151
|
+
:'metadata' => :'metadata'
|
|
152
|
+
}
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Attribute type mapping.
|
|
156
|
+
def self.swagger_types
|
|
157
|
+
{
|
|
158
|
+
:'object' => :'String',
|
|
159
|
+
:'content_type' => :'String',
|
|
160
|
+
:'content_language' => :'String',
|
|
161
|
+
:'content_encoding' => :'String',
|
|
162
|
+
:'metadata' => :'Hash<String, String>'
|
|
163
|
+
}
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|