Class: CDK8sPlus25::K8S::ManagedFieldsEntry
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- CDK8sPlus25::K8S::ManagedFieldsEntry
- 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
-
#api_version ⇒ String?
readonly
APIVersion defines the version of this resource that this field set applies to.
-
#fields_type ⇒ String?
readonly
FieldsType is the discriminator for the different fields format and version.
-
#fields_v1 ⇒ Object?
readonly
FieldsV1 holds the first JSON version format as described in the "FieldsV1" type.
-
#manager ⇒ String?
readonly
Manager is an identifier of the workflow managing these fields.
-
#operation ⇒ String?
readonly
Operation is the type of operation which lead to this ManagedFieldsEntry being created.
-
#subresource ⇒ String?
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.
-
#time ⇒ DateTime?
readonly
Time is the timestamp of when the ManagedFields entry was added.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_version: nil, fields_type: nil, fields_v1: nil, manager: nil, operation: nil, subresource: nil, time: nil) ⇒ ManagedFieldsEntry
constructor
A new instance of ManagedFieldsEntry.
- #to_jsii ⇒ Object
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.
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_version ⇒ String? (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.
36 37 38 |
# File 'k8_s/managed_fields_entry.rb', line 36 def api_version @api_version end |
#fields_type ⇒ String? (readonly)
FieldsType is the discriminator for the different fields format and version.
There is currently only one possible value: "FieldsV1"
42 43 44 |
# File 'k8_s/managed_fields_entry.rb', line 42 def fields_type @fields_type end |
#fields_v1 ⇒ Object? (readonly)
FieldsV1 holds the first JSON version format as described in the "FieldsV1" type.
46 47 48 |
# File 'k8_s/managed_fields_entry.rb', line 46 def fields_v1 @fields_v1 end |
#manager ⇒ String? (readonly)
Manager is an identifier of the workflow managing these fields.
50 51 52 |
# File 'k8_s/managed_fields_entry.rb', line 50 def manager @manager end |
#operation ⇒ String? (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'.
56 57 58 |
# File 'k8_s/managed_fields_entry.rb', line 56 def operation @operation end |
#subresource ⇒ String? (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.
62 63 64 |
# File 'k8_s/managed_fields_entry.rb', line 62 def subresource @subresource end |
#time ⇒ DateTime? (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.
68 69 70 |
# File 'k8_s/managed_fields_entry.rb', line 68 def time @time end |
Class Method Details
.jsii_properties ⇒ Object
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_jsii ⇒ Object
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 |