Class: OCI::ObjectStorage::Models::CreateMultipartUploadDetails
- Inherits:
-
Object
- Object
- OCI::ObjectStorage::Models::CreateMultipartUploadDetails
- Defined in:
- lib/oci/object_storage/models/create_multipart_upload_details.rb
Overview
To use any of the API operations, you must be authorized in an IAM policy. If you are not authorized, talk to an administrator. If you are an administrator who needs to write policies to give users access, see [Getting Started with Policies](docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm).
Instance Attribute Summary collapse
-
#content_encoding ⇒ String
The content encoding of the object to upload.
-
#content_language ⇒ String
The content language of the object to upload.
-
#content_type ⇒ String
The content type of the object to upload.
-
#metadata ⇒ Hash<String, String>
Arbitrary string keys and values for the user-defined metadata for the object.
-
#object ⇒ String
[Required] The name of the object to which this multi-part upload is targeted.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ CreateMultipartUploadDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ CreateMultipartUploadDetails
Initializes the object
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 73 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.object = attributes[:'object'] if attributes[:'object'] self.content_type = attributes[:'contentType'] if attributes[:'contentType'] raise 'You cannot provide both :contentType and :content_type' if attributes.key?(:'contentType') && attributes.key?(:'content_type') self.content_type = attributes[:'content_type'] if attributes[:'content_type'] self.content_language = attributes[:'contentLanguage'] if attributes[:'contentLanguage'] raise 'You cannot provide both :contentLanguage and :content_language' if attributes.key?(:'contentLanguage') && attributes.key?(:'content_language') self.content_language = attributes[:'content_language'] if attributes[:'content_language'] self.content_encoding = attributes[:'contentEncoding'] if attributes[:'contentEncoding'] raise 'You cannot provide both :contentEncoding and :content_encoding' if attributes.key?(:'contentEncoding') && attributes.key?(:'content_encoding') self.content_encoding = attributes[:'content_encoding'] if attributes[:'content_encoding'] self. = attributes[:'metadata'] if attributes[:'metadata'] end |
Instance Attribute Details
#content_encoding ⇒ String
The content encoding of the object to upload.
28 29 30 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 28 def content_encoding @content_encoding end |
#content_language ⇒ String
The content language of the object to upload.
24 25 26 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 24 def content_language @content_language end |
#content_type ⇒ String
The content type of the object to upload.
20 21 22 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 20 def content_type @content_type end |
#metadata ⇒ Hash<String, String>
Arbitrary string keys and values for the user-defined metadata for the object. Keys must be in "opc-meta-*" format. Avoid entering confidential information.
34 35 36 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 34 def @metadata end |
#object ⇒ String
[Required] The name of the object to which this multi-part upload is targeted. Avoid entering confidential information. Example: test/object1.log
16 17 18 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 16 def object @object end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 37 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'object': :'object', 'content_type': :'contentType', 'content_language': :'contentLanguage', 'content_encoding': :'contentEncoding', 'metadata': :'metadata' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 50 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'object': :'String', 'content_type': :'String', 'content_language': :'String', 'content_encoding': :'String', 'metadata': :'Hash<String, String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
109 110 111 112 113 114 115 116 117 118 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 109 def ==(other) return true if equal?(other) self.class == other.class && object == other.object && content_type == other.content_type && content_language == other.content_language && content_encoding == other.content_encoding && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 143 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
123 124 125 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 123 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
132 133 134 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 132 def hash [object, content_type, content_language, content_encoding, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
176 177 178 179 180 181 182 183 184 185 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 176 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
170 171 172 |
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 170 def to_s to_hash.to_s end |