Class: CDK8sPlus25::K8S::KubeControllerRevisionProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::KubeControllerRevisionProps
- Defined in:
- k8_s/kube_controller_revision_props.rb
Overview
ControllerRevision implements an immutable snapshot of state data.
Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.
Instance Attribute Summary collapse
-
#data ⇒ Object?
readonly
Data is the serialized representation of the state.
-
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta?
readonly
Standard object's metadata.
-
#revision ⇒ Numeric
readonly
Revision indicates the revision of the state represented by Data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(revision:, data: nil, metadata: nil) ⇒ KubeControllerRevisionProps
constructor
A new instance of KubeControllerRevisionProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(revision:, data: nil, metadata: nil) ⇒ KubeControllerRevisionProps
Returns a new instance of KubeControllerRevisionProps.
12 13 14 15 16 17 18 19 |
# File 'k8_s/kube_controller_revision_props.rb', line 12 def initialize(revision:, data: nil, metadata: nil) @revision = revision Jsii::Type.check_type(@revision, "eyJwcmltaXRpdmUiOiJudW1iZXIifQ==", "revision") @data = data Jsii::Type.check_type(@data, "eyJwcmltaXRpdmUiOiJhbnkifQ==", "data") unless @data.nil? @metadata = .is_a?(Hash) ? ::CDK8sPlus25::K8S::ObjectMeta.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(@metadata, "eyJmcW4iOiJjZGs4cy1wbHVzLTI1Lms4cy5PYmplY3RNZXRhIn0=", "metadata") unless @metadata.nil? end |
Instance Attribute Details
#data ⇒ Object? (readonly)
Data is the serialized representation of the state.
28 29 30 |
# File 'k8_s/kube_controller_revision_props.rb', line 28 def data @data end |
#metadata ⇒ CDK8sPlus25::K8S::ObjectMeta? (readonly)
Standard object's metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
34 35 36 |
# File 'k8_s/kube_controller_revision_props.rb', line 34 def @metadata end |
#revision ⇒ Numeric (readonly)
Revision indicates the revision of the state represented by Data.
24 25 26 |
# File 'k8_s/kube_controller_revision_props.rb', line 24 def revision @revision end |
Class Method Details
.jsii_properties ⇒ Object
36 37 38 39 40 41 42 |
# File 'k8_s/kube_controller_revision_props.rb', line 36 def self.jsii_properties { :revision => "revision", :data => "data", :metadata => "metadata", } end |
Instance Method Details
#to_jsii ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'k8_s/kube_controller_revision_props.rb', line 44 def to_jsii result = {} result.merge!({ "revision" => @revision, "data" => @data, "metadata" => @metadata, }) result.compact end |