Sha256: c33b8c3d333c264be3dab51e22d6bd98fd636b7b9348cc236ff3dffd36b5315c

Contents?: true

Size: 1.22 KB

Versions: 24

Compression:

Stored size: 1.22 KB

Contents

# frozen_string_literal: true

module Cocina
  module Models
    # Same as a Collection, but doesn't have an externalIdentifier as one will be created
    class RequestCollection < Struct
      include Validatable

      include Checkable

      TYPES = ['https://cocina.sul.stanford.edu/models/collection',
               'https://cocina.sul.stanford.edu/models/curated-collection',
               'https://cocina.sul.stanford.edu/models/user-collection',
               'https://cocina.sul.stanford.edu/models/exhibit',
               'https://cocina.sul.stanford.edu/models/series'].freeze

      # The version of Cocina with which this object conforms.
      # example: 1.2.3
      attribute :cocinaVersion, CocinaVersion.default(VERSION)
      attribute :type, Types::Strict::String.enum(*RequestCollection::TYPES)
      attribute :label, Types::Strict::String
      attribute :version, Types::Strict::Integer.default(1).enum(1)
      attribute(:access, CollectionAccess.default { CollectionAccess.new })
      attribute(:administrative, RequestAdministrative.default { RequestAdministrative.new })
      attribute? :description, RequestDescription.optional
      attribute? :identification, CollectionIdentification.optional
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
cocina-models-0.99.1 lib/cocina/models/request_collection.rb
cocina-models-0.99.0 lib/cocina/models/request_collection.rb
cocina-models-0.98.1 lib/cocina/models/request_collection.rb
cocina-models-0.98.0 lib/cocina/models/request_collection.rb
cocina-models-0.96.0 lib/cocina/models/request_collection.rb
cocina-models-0.95.1 lib/cocina/models/request_collection.rb
cocina-models-0.95.0 lib/cocina/models/request_collection.rb
cocina-models-0.94.2 lib/cocina/models/request_collection.rb
cocina-models-0.94.1 lib/cocina/models/request_collection.rb
cocina-models-0.94.0 lib/cocina/models/request_collection.rb
cocina-models-0.93.1 lib/cocina/models/request_collection.rb
cocina-models-0.93.0 lib/cocina/models/request_collection.rb
cocina-models-0.92.0 lib/cocina/models/request_collection.rb
cocina-models-0.91.4 lib/cocina/models/request_collection.rb
cocina-models-0.91.3 lib/cocina/models/request_collection.rb
cocina-models-0.91.2 lib/cocina/models/request_collection.rb
cocina-models-0.91.1 lib/cocina/models/request_collection.rb
cocina-models-0.91.0 lib/cocina/models/request_collection.rb
cocina-models-0.90.0 lib/cocina/models/request_collection.rb
cocina-models-0.89.1 lib/cocina/models/request_collection.rb