Class: Supabase::Storage::Types::AnalyticsBucket

Inherits:
Struct
  • Object
show all
Defined in:
lib/supabase/storage/types.rb

Overview

Returned by analytics.create / analytics.list. Mirrors storage3’s ‘AnalyticsBucket` pydantic model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



104
105
106
# File 'lib/supabase/storage/types.rb', line 104

def created_at
  @created_at
end

#formatObject

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



104
105
106
# File 'lib/supabase/storage/types.rb', line 104

def format
  @format
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



104
105
106
# File 'lib/supabase/storage/types.rb', line 104

def name
  @name
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



104
105
106
# File 'lib/supabase/storage/types.rb', line 104

def type
  @type
end

#updated_atObject

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



104
105
106
# File 'lib/supabase/storage/types.rb', line 104

def updated_at
  @updated_at
end

Class Method Details

.from_hash(hash) ⇒ Object



105
106
107
108
109
110
111
# File 'lib/supabase/storage/types.rb', line 105

def self.from_hash(hash)
  return nil if hash.nil?

  h = hash.transform_keys(&:to_s)
  new(name: h["name"], type: h["type"], format: h["format"],
      created_at: h["created_at"], updated_at: h["updated_at"])
end