Class: CDK8sPlus25::K8S::KubeLeaseProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::KubeLeaseProps
- Defined in:
- k8_s/kube_lease_props.rb
Overview
Lease defines a lease concept.
Instance Attribute Summary collapse
- #metadata ⇒ CDK8sPlus25::K8S::ObjectMeta? readonly
-
#spec ⇒ CDK8sPlus25::K8S::LeaseSpec?
readonly
Specification of the Lease.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metadata: nil, spec: nil) ⇒ KubeLeaseProps
constructor
A new instance of KubeLeaseProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metadata: nil, spec: nil) ⇒ KubeLeaseProps
Returns a new instance of KubeLeaseProps.
9 10 11 12 13 14 |
# File 'k8_s/kube_lease_props.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::LeaseSpec.new(**spec.transform_keys(&:to_sym)) : spec Jsii::Type.check_type(@spec, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5MZWFzZVNwZWMifQ==", "spec") unless @spec.nil? end |
Instance Attribute Details
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta? (readonly)
19 20 21 |
# File 'k8_s/kube_lease_props.rb', line 19 def @metadata end |
#spec ⇒ CDK8sPlus25::K8S::LeaseSpec? (readonly)
Specification of the Lease.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
25 26 27 |
# File 'k8_s/kube_lease_props.rb', line 25 def spec @spec end |
Class Method Details
.jsii_properties ⇒ Object
27 28 29 30 31 32 |
# File 'k8_s/kube_lease_props.rb', line 27 def self.jsii_properties { :metadata => "metadata", :spec => "spec", } end |
Instance Method Details
#to_jsii ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'k8_s/kube_lease_props.rb', line 34 def to_jsii result = {} result.merge!({ "metadata" => @metadata, "spec" => @spec, }) result.compact end |