Sha256: 200170f017dc0b62b667d92364615c998571d50eab2aafabff6b75f56006339b

Contents?: true

Size: 835 Bytes

Versions: 1

Compression:

Stored size: 835 Bytes

Contents

module Kuby::CRDB::DSL::CRDB::V1alpha1
  class SpecDataStore < ::KubeDSL::DSLObject
    object_field(:pvc) { Kuby::CRDB::DSL::CRDB::V1alpha1::SpecDataStorePvc.new }
    value_field :supports_auto_resize
    object_field(:host_path) { Kuby::CRDB::DSL::CRDB::V1alpha1::SpecDataStoreHostPath.new }

    validates :pvc, object: { kind_of: Kuby::CRDB::DSL::CRDB::V1alpha1::SpecDataStorePvc }
    validates :supports_auto_resize, field: { format: :boolean }, presence: true
    validates :host_path, object: { kind_of: Kuby::CRDB::DSL::CRDB::V1alpha1::SpecDataStoreHostPath }

    def serialize
      {}.tap do |result|
        result[:pvc] = pvc.serialize
        result[:supportsAutoResize] = supports_auto_resize
        result[:hostPath] = host_path.serialize
      end
    end

    def kind_sym
      :spec_data_store
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kuby-crdb-0.1.0 lib/kuby/crdb/dsl/crdb/v1alpha1/spec_data_store.rb