Sha256: b0bdcab4bf9041cabb2f43a06b5e4f81f4abcd9dc59e72c7ae8ab41a64360318

Contents?: true

Size: 1.44 KB

Versions: 17

Compression:

Stored size: 1.44 KB

Contents

# frozen_string_literal: true

module Cocina
  module Models
    class File < Struct
      include Checkable

      TYPES = ['https://cocina.sul.stanford.edu/models/file'].freeze

      # The content type of the File.
      attribute :type, Types::Strict::String.enum(*File::TYPES)
      # Identifier for the resource within the SDR architecture but outside of the repository. UUID. Constant across resource versions. What clients will use calling the repository.
      attribute :externalIdentifier, Types::Strict::String
      # Primary processing label (can be same as title) for a File.
      attribute :label, Types::Strict::String
      # Filename for a file. Can be same as label.
      attribute :filename, Types::Strict::String
      # Size of the File (binary) in bytes.
      attribute :size, Types::Strict::Integer.meta(omittable: true)
      # Version for the File within SDR.
      attribute :version, Types::Strict::Integer
      # MIME Type of the File.
      attribute :hasMimeType, Types::Strict::String.meta(omittable: true)
      # Use for the File.
      attribute :use, Types::Strict::String.meta(omittable: true)
      attribute :hasMessageDigests, Types::Strict::Array.of(MessageDigest).default([].freeze)
      attribute(:access, FileAccess.default { FileAccess.new })
      attribute(:administrative, FileAdministrative.default { FileAdministrative.new })
      attribute :presentation, Presentation.optional.meta(omittable: true)
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
cocina-models-0.75.0 lib/cocina/models/file.rb
cocina-models-0.74.1 lib/cocina/models/file.rb
cocina-models-0.74.0 lib/cocina/models/file.rb
cocina-models-0.73.6 lib/cocina/models/file.rb
cocina-models-0.73.5 lib/cocina/models/file.rb
cocina-models-0.73.4 lib/cocina/models/file.rb
cocina-models-0.73.3 lib/cocina/models/file.rb
cocina-models-0.73.2 lib/cocina/models/file.rb
cocina-models-0.73.1 lib/cocina/models/file.rb
cocina-models-0.73.0 lib/cocina/models/file.rb
cocina-models-0.72.0 lib/cocina/models/file.rb
cocina-models-0.71.0 lib/cocina/models/file.rb
cocina-models-0.70.0 lib/cocina/models/file.rb
cocina-models-0.69.2 lib/cocina/models/file.rb
cocina-models-0.69.1 lib/cocina/models/file.rb
cocina-models-0.69.0 lib/cocina/models/file.rb
cocina-models-0.68.0 lib/cocina/models/file.rb