Class: Google::Apis::PolyV1::File

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/poly_v1/classes.rb,
generated/google/apis/poly_v1/representations.rb,
generated/google/apis/poly_v1/representations.rb

Overview

Represents a file in Poly, which can be a root, resource, or thumbnail file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ File

Returns a new instance of File



193
194
195
# File 'generated/google/apis/poly_v1/classes.rb', line 193

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#content_typeString

The MIME content-type, such as image/png. For more information, see MIME types. Corresponds to the JSON property contentType

Returns:

  • (String)


180
181
182
# File 'generated/google/apis/poly_v1/classes.rb', line 180

def content_type
  @content_type
end

#relative_pathString

The path of the resource file relative to the root file. For root or thumbnail files, this is just the filename. Corresponds to the JSON property relativePath

Returns:

  • (String)


186
187
188
# File 'generated/google/apis/poly_v1/classes.rb', line 186

def relative_path
  @relative_path
end

#urlString

The URL where the file data can be retrieved. Corresponds to the JSON property url

Returns:

  • (String)


191
192
193
# File 'generated/google/apis/poly_v1/classes.rb', line 191

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



198
199
200
201
202
# File 'generated/google/apis/poly_v1/classes.rb', line 198

def update!(**args)
  @content_type = args[:content_type] if args.key?(:content_type)
  @relative_path = args[:relative_path] if args.key?(:relative_path)
  @url = args[:url] if args.key?(:url)
end