Sha256: 1d8ddb0fa52360d48471eb31cf6299c53ad8d0eac34863946dcdc123f1e988fc

Contents?: true

Size: 907 Bytes

Versions: 43

Compression:

Stored size: 907 Bytes

Contents

# frozen_string_literal: true

module Cocina
  module Models
    class AdminPolicy < Struct
      include Checkable

      TYPES = ['http://cocina.sul.stanford.edu/models/admin_policy.jsonld'].freeze

      # example: item
      attribute :type, Types::Strict::String.enum(*AdminPolicy::TYPES)
      # example: druid:bc123df4567
      attribute :externalIdentifier, Types::Strict::String
      attribute :label, Types::Strict::String
      attribute :version, Types::Strict::Integer
      attribute(:administrative, AdminPolicyAdministrative.default { AdminPolicyAdministrative.new })
      attribute :description, Description.optional.meta(omittable: true)

      def self.new(attributes = default_attributes, safe = false, validate = true, &block)
        Validator.validate(self, attributes.with_indifferent_access) if validate && name
        super(attributes, safe, &block)
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
cocina-models-0.60.0 lib/cocina/models/admin_policy.rb
cocina-models-0.59.1 lib/cocina/models/admin_policy.rb
cocina-models-0.59.0 lib/cocina/models/admin_policy.rb
cocina-models-0.58.2 lib/cocina/models/admin_policy.rb
cocina-models-0.58.1 lib/cocina/models/admin_policy.rb
cocina-models-0.58.0 lib/cocina/models/admin_policy.rb
cocina-models-0.57.0 lib/cocina/models/admin_policy.rb
cocina-models-0.56.1 lib/cocina/models/admin_policy.rb
cocina-models-0.56.0 lib/cocina/models/admin_policy.rb
cocina-models-0.55.0 lib/cocina/models/admin_policy.rb
cocina-models-0.54.0 lib/cocina/models/admin_policy.rb
cocina-models-0.54.0.beta.2 lib/cocina/models/admin_policy.rb
cocina-models-0.53.1 lib/cocina/models/admin_policy.rb
cocina-models-0.54.0.beta.1 lib/cocina/models/admin_policy.rb
cocina-models-0.53.0 lib/cocina/models/admin_policy.rb
cocina-models-0.52.0 lib/cocina/models/admin_policy.rb
cocina-models-0.51.0 lib/cocina/models/admin_policy.rb
cocina-models-0.50.0 lib/cocina/models/admin_policy.rb
cocina-models-0.49.0 lib/cocina/models/admin_policy.rb
cocina-models-0.48.0 lib/cocina/models/admin_policy.rb