Class: CDK8sPlus25::K8S::KubeControllerRevisionProps

Inherits:
Jsii::Struct
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(revision:, data: nil, metadata: nil) ⇒ KubeControllerRevisionProps

Returns a new instance of KubeControllerRevisionProps.

Parameters:

  • revision (Numeric)

    Revision indicates the revision of the state represented by Data.

  • data (Object, nil) (defaults to: nil)

    Data is the serialized representation of the state.

  • metadata (CDK8sPlus25::K8S::ObjectMeta, nil) (defaults to: nil)

    Standard object's metadata.



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

#dataObject? (readonly)

Data is the serialized representation of the state.

Returns:

  • (Object, nil)


28
29
30
# File 'k8_s/kube_controller_revision_props.rb', line 28

def data
  @data
end

#metadataCDK8sPlus25::K8S::ObjectMeta? (readonly)



34
35
36
# File 'k8_s/kube_controller_revision_props.rb', line 34

def 
  @metadata
end

#revisionNumeric (readonly)

Revision indicates the revision of the state represented by Data.

Returns:

  • (Numeric)


24
25
26
# File 'k8_s/kube_controller_revision_props.rb', line 24

def revision
  @revision
end

Class Method Details

.jsii_propertiesObject



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_jsiiObject



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