Sha256: 166d3bd7ebac80375a9894cea7fa2a9e758e5ccc07678b5c47fc42acc72cde2b

Contents?: true

Size: 805 Bytes

Versions: 8

Compression:

Stored size: 805 Bytes

Contents

# frozen_string_literal: true

module Cocina
  module Models
    class RequestAdminPolicy < Struct
      include Checkable

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

      attribute :type, Types::Strict::String.enum(*RequestAdminPolicy::TYPES)
      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

8 entries across 8 versions & 1 rubygems

Version Path
cocina-models-0.63.1 lib/cocina/models/request_admin_policy.rb
cocina-models-0.63.0 lib/cocina/models/request_admin_policy.rb
cocina-models-0.62.1 lib/cocina/models/request_admin_policy.rb
cocina-models-0.62.0 lib/cocina/models/request_admin_policy.rb
cocina-models-0.61.3 lib/cocina/models/request_admin_policy.rb
cocina-models-0.61.2 lib/cocina/models/request_admin_policy.rb
cocina-models-0.61.1 lib/cocina/models/request_admin_policy.rb
cocina-models-0.61.0 lib/cocina/models/request_admin_policy.rb