Sha256: 0f7d9eb3e61c738480134e9d0f34ef784025151c69175150a67b3dd56094b99a

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

module Kuby::CRDB::DSL::CRDB::V1alpha1
  class SpecAffinityNodeAffinity < ::KubeDSL::DSLObject
    object_field(:required_during_scheduling_ignored_during_execution) { Kuby::CRDB::DSL::CRDB::V1alpha1::SpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution.new }
    value_field :preferred_during_scheduling_ignored_during_execution

    validates :required_during_scheduling_ignored_during_execution, object: { kind_of: Kuby::CRDB::DSL::CRDB::V1alpha1::SpecAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution }
    validates :preferred_during_scheduling_ignored_during_execution, field: { format: :string }, presence: false

    def serialize
      {}.tap do |result|
        result[:requiredDuringSchedulingIgnoredDuringExecution] = required_during_scheduling_ignored_during_execution.serialize
        result[:preferredDuringSchedulingIgnoredDuringExecution] = preferred_during_scheduling_ignored_during_execution
      end
    end

    def kind_sym
      :spec_affinity_node_affinity
    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_affinity_node_affinity.rb