Class: OCI::ObjectStorage::Models::CreateMultipartUploadDetails

Inherits:
Object
  • Object
show all
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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ CreateMultipartUploadDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :object (String)

    The value to assign to the #object property

  • :content_type (String)

    The value to assign to the #content_type property

  • :content_language (String)

    The value to assign to the #content_language property

  • :content_encoding (String)

    The value to assign to the #content_encoding property

  • :content_disposition (String)

    The value to assign to the #content_disposition property

  • :cache_control (String)

    The value to assign to the #cache_control property

  • :metadata (Hash<String, String>)

    The value to assign to the #metadata property



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 109

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.content_disposition = attributes[:'contentDisposition'] if attributes[:'contentDisposition']

  raise 'You cannot provide both :contentDisposition and :content_disposition' if attributes.key?(:'contentDisposition') && attributes.key?(:'content_disposition')

  self.content_disposition = attributes[:'content_disposition'] if attributes[:'content_disposition']

  self.cache_control = attributes[:'cacheControl'] if attributes[:'cacheControl']

  raise 'You cannot provide both :cacheControl and :cache_control' if attributes.key?(:'cacheControl') && attributes.key?(:'cache_control')

  self.cache_control = attributes[:'cache_control'] if attributes[:'cache_control']

  self. = attributes[:'metadata'] if attributes[:'metadata']
end

Instance Attribute Details

#cache_controlString

The optional Cache-Control header that defines the caching behavior value to be returned in GetObject and HeadObject responses. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to identify objects that require caching restrictions.

Returns:

  • (String)


58
59
60
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 58

def cache_control
  @cache_control
end

#content_dispositionString

The optional Content-Disposition header that defines presentational information for the object to be returned in GetObject and HeadObject responses. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to let users download objects with custom filenames in a browser.

Returns:

  • (String)


50
51
52
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 50

def content_disposition
  @content_disposition
end

#content_encodingString

The optional Content-Encoding header that defines the content encodings that were applied to the object to upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to determine what decoding mechanisms need to be applied to obtain the media-type specified by the Content-Type header of the object.

Returns:

  • (String)


42
43
44
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 42

def content_encoding
  @content_encoding
end

#content_languageString

The optional Content-Language header that defines the content language of the object to upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to identify and differentiate objects based on a particular language.

Returns:

  • (String)


33
34
35
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 33

def content_language
  @content_language
end

#content_typeString

The optional Content-Type header that defines the standard MIME type format of the object to upload. Specifying values for this header has no effect on Object Storage behavior. Programs that read the object determine what to do based on the value provided. For example, you could use this header to identify and perform special operations on text only objects.

Returns:

  • (String)


25
26
27
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 25

def content_type
  @content_type
end

#metadataHash<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.

Returns:

  • (Hash<String, String>)


64
65
66
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 64

def 
  @metadata
end

#objectString

[Required] The name of the object to which this multi-part upload is targeted. Avoid entering confidential information. Example: test/object1.log

Returns:

  • (String)


17
18
19
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 17

def object
  @object
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 67

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'object': :'object',
    'content_type': :'contentType',
    'content_language': :'contentLanguage',
    'content_encoding': :'contentEncoding',
    'content_disposition': :'contentDisposition',
    'cache_control': :'cacheControl',
    'metadata': :'metadata'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 82

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'object': :'String',
    'content_type': :'String',
    'content_language': :'String',
    'content_encoding': :'String',
    'content_disposition': :'String',
    'cache_control': :'String',
    'metadata': :'Hash<String, String>'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 157

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 &&
    content_disposition == other.content_disposition &&
    cache_control == other.cache_control &&
     == other.
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 193

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


173
174
175
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 173

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



182
183
184
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 182

def hash
  [object, content_type, content_language, content_encoding, content_disposition, cache_control, ].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



226
227
228
229
230
231
232
233
234
235
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 226

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



220
221
222
# File 'lib/oci/object_storage/models/create_multipart_upload_details.rb', line 220

def to_s
  to_hash.to_s
end