Sha256: 21ce276f81881fa5fc927dcc9bd1962341c0595d6bedd5af701a27acbf049282

Contents?: true

Size: 1.01 KB

Versions: 17

Compression:

Stored size: 1.01 KB

Contents

# frozen_string_literal: true

module Cocina
  module Models
    class RequestFile < Struct
      include Checkable

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

      attribute :type, Types::Strict::String.enum(*RequestFile::TYPES)
      attribute :label, Types::Strict::String
      attribute :filename, Types::Strict::String
      attribute :size, Types::Strict::Integer.meta(omittable: true)
      attribute :version, Types::Strict::Integer
      attribute :hasMimeType, Types::Strict::String.meta(omittable: true)
      attribute :externalIdentifier, Types::Strict::String.meta(omittable: true)
      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/request_file.rb
cocina-models-0.74.1 lib/cocina/models/request_file.rb
cocina-models-0.74.0 lib/cocina/models/request_file.rb
cocina-models-0.73.6 lib/cocina/models/request_file.rb
cocina-models-0.73.5 lib/cocina/models/request_file.rb
cocina-models-0.73.4 lib/cocina/models/request_file.rb
cocina-models-0.73.3 lib/cocina/models/request_file.rb
cocina-models-0.73.2 lib/cocina/models/request_file.rb
cocina-models-0.73.1 lib/cocina/models/request_file.rb
cocina-models-0.73.0 lib/cocina/models/request_file.rb
cocina-models-0.72.0 lib/cocina/models/request_file.rb
cocina-models-0.71.0 lib/cocina/models/request_file.rb
cocina-models-0.70.0 lib/cocina/models/request_file.rb
cocina-models-0.69.2 lib/cocina/models/request_file.rb
cocina-models-0.69.1 lib/cocina/models/request_file.rb
cocina-models-0.69.0 lib/cocina/models/request_file.rb
cocina-models-0.68.0 lib/cocina/models/request_file.rb