Sha256: 8d1d4b3314f2261c8fe1471c89c5a9e09f9cf32388d649626f760154b2716f23

Contents?: true

Size: 1.86 KB

Versions: 4

Compression:

Stored size: 1.86 KB

Contents

# frozen_string_literal: true

module Cocina
  module Models
    class RequestDRO < Struct
      include Validatable

      include Checkable

      TYPES = ['https://cocina.sul.stanford.edu/models/object',
               'https://cocina.sul.stanford.edu/models/3d',
               'https://cocina.sul.stanford.edu/models/agreement',
               'https://cocina.sul.stanford.edu/models/book',
               'https://cocina.sul.stanford.edu/models/document',
               'https://cocina.sul.stanford.edu/models/geo',
               'https://cocina.sul.stanford.edu/models/image',
               'https://cocina.sul.stanford.edu/models/page',
               'https://cocina.sul.stanford.edu/models/photograph',
               'https://cocina.sul.stanford.edu/models/manuscript',
               'https://cocina.sul.stanford.edu/models/map',
               'https://cocina.sul.stanford.edu/models/media',
               'https://cocina.sul.stanford.edu/models/track',
               'https://cocina.sul.stanford.edu/models/webarchive-binary',
               'https://cocina.sul.stanford.edu/models/webarchive-seed'].freeze

      # The version of Cocina with which this object conforms.
      # example: 1.2.3
      attribute :cocinaVersion, Types::Strict::String.default(Cocina::Models::VERSION)
      attribute :type, Types::Strict::String.enum(*RequestDRO::TYPES)
      attribute :label, Types::Strict::String
      attribute :version, Types::Strict::Integer.default(1).enum(1)
      attribute? :access, DROAccess.optional
      attribute(:administrative, RequestAdministrative.default { RequestAdministrative.new })
      attribute? :description, RequestDescription.optional
      attribute(:identification, RequestIdentification.default { RequestIdentification.new })
      attribute? :structural, RequestDROStructural.optional
      attribute? :geographic, Geographic.optional
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cocina-models-0.79.0 lib/cocina/models/request_dro.rb
cocina-models-0.78.0 lib/cocina/models/request_dro.rb
cocina-models-0.77.0 lib/cocina/models/request_dro.rb
cocina-models-0.76.0 lib/cocina/models/request_dro.rb