Class: CDK8sPlus25::K8S::JobTemplateSpec
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::JobTemplateSpec
- Defined in:
- k8_s/job_template_spec.rb
Overview
JobTemplateSpec describes the data a Job should have when created from a template.
Instance Attribute Summary collapse
-
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta?
readonly
Standard object's metadata of the jobs created from this template.
-
#spec ⇒ CDK8sPlus25::K8S::JobSpec?
readonly
Specification of the desired behavior of the job.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil) ⇒ JobTemplateSpec
constructor
A new instance of JobTemplateSpec.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil) ⇒ JobTemplateSpec
Returns a new instance of JobTemplateSpec.
9 10 11 12 13 14 |
# File 'k8_s/job_template_spec.rb', line 9 def initialize(metadata: nil, spec: nil) @metadata = .is_a?(Hash) ? ::CDK8sPlus25::K8S::ObjectMeta.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@metadata, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5PYmplY3RNZXRhIn0=", "metadata") unless @metadata.nil? @spec = spec.is_a?(Hash) ? ::CDK8sPlus25::K8S::JobSpec.new(**spec.transform_keys(&:to_sym)) : spec Jsii::Type.check_type(@spec, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5Kb2JTcGVjIn0=", "spec") unless @spec.nil? end |
Instance Attribute Details
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta? (readonly)
Standard object's metadata of the jobs created from this template.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
21 22 23 |
# File 'k8_s/job_template_spec.rb', line 21 def @metadata end |
#spec ⇒ CDK8sPlus25::K8S::JobSpec? (readonly)
Specification of the desired behavior of the job.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
27 28 29 |
# File 'k8_s/job_template_spec.rb', line 27 def spec @spec end |
Class Method Details
.jsii_properties ⇒ Object
29 30 31 32 33 34 |
# File 'k8_s/job_template_spec.rb', line 29 def self.jsii_properties { :metadata => "metadata", :spec => "spec", } end |
Instance Method Details
#to_jsii ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'k8_s/job_template_spec.rb', line 36 def to_jsii result = {} result.merge!({ "metadata" => @metadata, "spec" => @spec, }) result.compact end |