Class: CDK8sPlus25::K8S::ManagedFieldsEntry

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
k8_s/managed_fields_entry.rb

Overview

ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_version: nil, fields_type: nil, fields_v1: nil, manager: nil, operation: nil, subresource: nil, time: nil) ⇒ ManagedFieldsEntry

Returns a new instance of ManagedFieldsEntry.

Parameters:

  • api_version (String, nil) (defaults to: nil)

    APIVersion defines the version of this resource that this field set applies to.

  • fields_type (String, nil) (defaults to: nil)

    FieldsType is the discriminator for the different fields format and version.

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

    FieldsV1 holds the first JSON version format as described in the "FieldsV1" type.

  • manager (String, nil) (defaults to: nil)

    Manager is an identifier of the workflow managing these fields.

  • operation (String, nil) (defaults to: nil)

    Operation is the type of operation which lead to this ManagedFieldsEntry being created.

  • subresource (String, nil) (defaults to: nil)

    Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource.

  • time (DateTime, nil) (defaults to: nil)

    Time is the timestamp of when the ManagedFields entry was added.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'k8_s/managed_fields_entry.rb', line 14

def initialize(api_version: nil, fields_type: nil, fields_v1: nil, manager: nil, operation: nil, subresource: nil, time: nil)
  @api_version = api_version
  Jsii::Type.check_type(@api_version, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "apiVersion") unless @api_version.nil?
  @fields_type = fields_type
  Jsii::Type.check_type(@fields_type, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "fieldsType") unless @fields_type.nil?
  @fields_v1 = fields_v1
  Jsii::Type.check_type(@fields_v1, "eyJwcmltaXRpdmUiOiJhbnkifQ==", "fieldsV1") unless @fields_v1.nil?
  @manager = manager
  Jsii::Type.check_type(@manager, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "manager") unless @manager.nil?
  @operation = operation
  Jsii::Type.check_type(@operation, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "operation") unless @operation.nil?
  @subresource = subresource
  Jsii::Type.check_type(@subresource, "eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==", "subresource") unless @subresource.nil?
  @time = time
  Jsii::Type.check_type(@time, "eyJwcmltaXRpdmUiOiJkYXRlIn0=", "time") unless @time.nil?
end

Instance Attribute Details

#api_versionString? (readonly)

APIVersion defines the version of this resource that this field set applies to.

The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.

Returns:

  • (String, nil)


36
37
38
# File 'k8_s/managed_fields_entry.rb', line 36

def api_version
  @api_version
end

#fields_typeString? (readonly)

FieldsType is the discriminator for the different fields format and version.

There is currently only one possible value: "FieldsV1"

Returns:

  • (String, nil)


42
43
44
# File 'k8_s/managed_fields_entry.rb', line 42

def fields_type
  @fields_type
end

#fields_v1Object? (readonly)

FieldsV1 holds the first JSON version format as described in the "FieldsV1" type.

Returns:

  • (Object, nil)


46
47
48
# File 'k8_s/managed_fields_entry.rb', line 46

def fields_v1
  @fields_v1
end

#managerString? (readonly)

Manager is an identifier of the workflow managing these fields.

Returns:

  • (String, nil)


50
51
52
# File 'k8_s/managed_fields_entry.rb', line 50

def manager
  @manager
end

#operationString? (readonly)

Operation is the type of operation which lead to this ManagedFieldsEntry being created.

The only valid values for this field are 'Apply' and 'Update'.

Returns:

  • (String, nil)


56
57
58
# File 'k8_s/managed_fields_entry.rb', line 56

def operation
  @operation
end

#subresourceString? (readonly)

Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource.

The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.

Returns:

  • (String, nil)


62
63
64
# File 'k8_s/managed_fields_entry.rb', line 62

def subresource
  @subresource
end

#timeDateTime? (readonly)

Time is the timestamp of when the ManagedFields entry was added.

The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.

Returns:

  • (DateTime, nil)


68
69
70
# File 'k8_s/managed_fields_entry.rb', line 68

def time
  @time
end

Class Method Details

.jsii_propertiesObject



70
71
72
73
74
75
76
77
78
79
80
# File 'k8_s/managed_fields_entry.rb', line 70

def self.jsii_properties
  {
    :api_version => "apiVersion",
    :fields_type => "fieldsType",
    :fields_v1 => "fieldsV1",
    :manager => "manager",
    :operation => "operation",
    :subresource => "subresource",
    :time => "time",
  }
end

Instance Method Details

#to_jsiiObject



82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'k8_s/managed_fields_entry.rb', line 82

def to_jsii
  result = {}
  result.merge!({
    "apiVersion" => @api_version,
    "fieldsType" => @fields_type,
    "fieldsV1" => @fields_v1,
    "manager" => @manager,
    "operation" => @operation,
    "subresource" => @subresource,
    "time" => @time,
  })
  result.compact
end