=begin comment

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

OpenAPI spec version: v1.13.5

Generated by: https://openapi-generator.tech

=end comment

=cut

#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# Do not edit the class manually.
# Ref: https://openapi-generator.tech
#
package Kubernetes::Object::V1NodeSystemInfo;

require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::Parse;
use DateTime;


use base ("Class::Accessor", "Class::Data::Inheritable");


#
#NodeSystemInfo is a set of ids/uuids to uniquely identify the node.
#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually.
# REF: https://openapi-generator.tech
#

=begin comment

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

OpenAPI spec version: v1.13.5

Generated by: https://openapi-generator.tech

=end comment

=cut

#
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# Do not edit the class manually.
# Ref: https://openapi-generator.tech
#
__PACKAGE__->mk_classdata('attribute_map' => {});
__PACKAGE__->mk_classdata('openapi_types' => {});
__PACKAGE__->mk_classdata('method_documentation' => {}); 
__PACKAGE__->mk_classdata('class_documentation' => {});

# new object
sub new { 
    my ($class, %args) = @_; 

	my $self = bless {}, $class;
	
	foreach my $attribute (keys %{$class->attribute_map}) {
		my $args_key = $class->attribute_map->{$attribute};
		$self->$attribute( $args{ $args_key } );
	}
	
	return $self;
}  

# return perl hash
sub to_hash {
    return decode_json(JSON->new->convert_blessed->encode( shift ));
}

# used by JSON for serialization
sub TO_JSON { 
    my $self = shift;
    my $_data = {};
    foreach my $_key (keys %{$self->attribute_map}) {
        if (defined $self->{$_key}) {
            $_data->{$self->attribute_map->{$_key}} = $self->{$_key};
        }
    }
    return $_data;
}

# from Perl hashref
sub from_hash {
    my ($self, $hash) = @_;

    # loop through attributes and use openapi_types to deserialize the data
    while ( my ($_key, $_type) = each %{$self->openapi_types} ) {
    	my $_json_attribute = $self->attribute_map->{$_key}; 
        if ($_type =~ /^array\[/i) { # array
            my $_subclass = substr($_type, 6, -1);
            my @_array = ();
            foreach my $_element (@{$hash->{$_json_attribute}}) {
                push @_array, $self->_deserialize($_subclass, $_element);
            }
            $self->{$_key} = \@_array;
        } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime
            $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute});
        } else {
        	$log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute);
        }
    }
  
    return $self;
}

# deserialize non-array data
sub _deserialize {
    my ($self, $type, $data) = @_;
    $log->debugf("deserializing %s with %s",Dumper($data), $type);
        
    if ($type eq 'DateTime') {
        return DateTime->from_epoch(epoch => str2time($data));
    } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
        return $data;
    } else { # hash(model)
        my $_instance = eval "Kubernetes::Object::$type->new()";
        return $_instance->from_hash($data);
    }
}



__PACKAGE__->class_documentation({description => 'NodeSystemInfo is a set of ids/uuids to uniquely identify the node.',
                                  class => 'V1NodeSystemInfo',
                                  required => [], # TODO
}                                 );

__PACKAGE__->method_documentation({
    'architecture' => {
    	datatype => 'string',
    	base_name => 'architecture',
    	description => 'The Architecture reported by the node',
    	format => '',
    	read_only => '',
    		},
    'boot_id' => {
    	datatype => 'string',
    	base_name => 'bootID',
    	description => 'Boot ID reported by the node.',
    	format => '',
    	read_only => '',
    		},
    'container_runtime_version' => {
    	datatype => 'string',
    	base_name => 'containerRuntimeVersion',
    	description => 'ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).',
    	format => '',
    	read_only => '',
    		},
    'kernel_version' => {
    	datatype => 'string',
    	base_name => 'kernelVersion',
    	description => 'Kernel Version reported by the node from &#39;uname -r&#39; (e.g. 3.16.0-0.bpo.4-amd64).',
    	format => '',
    	read_only => '',
    		},
    'kube_proxy_version' => {
    	datatype => 'string',
    	base_name => 'kubeProxyVersion',
    	description => 'KubeProxy Version reported by the node.',
    	format => '',
    	read_only => '',
    		},
    'kubelet_version' => {
    	datatype => 'string',
    	base_name => 'kubeletVersion',
    	description => 'Kubelet Version reported by the node.',
    	format => '',
    	read_only => '',
    		},
    'machine_id' => {
    	datatype => 'string',
    	base_name => 'machineID',
    	description => 'MachineID reported by the node. For unique machine identification in the cluster this field is preferred. Learn more from man(5) machine-id: http://man7.org/linux/man-pages/man5/machine-id.5.html',
    	format => '',
    	read_only => '',
    		},
    'operating_system' => {
    	datatype => 'string',
    	base_name => 'operatingSystem',
    	description => 'The Operating System reported by the node',
    	format => '',
    	read_only => '',
    		},
    'os_image' => {
    	datatype => 'string',
    	base_name => 'osImage',
    	description => 'OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).',
    	format => '',
    	read_only => '',
    		},
    'system_uuid' => {
    	datatype => 'string',
    	base_name => 'systemUUID',
    	description => 'SystemUUID reported by the node. For unique machine identification MachineID is preferred. This field is specific to Red Hat hosts https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html/RHSM/getting-system-uuid.html',
    	format => '',
    	read_only => '',
    		},
});

__PACKAGE__->openapi_types( {
    'architecture' => 'string',
    'boot_id' => 'string',
    'container_runtime_version' => 'string',
    'kernel_version' => 'string',
    'kube_proxy_version' => 'string',
    'kubelet_version' => 'string',
    'machine_id' => 'string',
    'operating_system' => 'string',
    'os_image' => 'string',
    'system_uuid' => 'string'
} );

__PACKAGE__->attribute_map( {
    'architecture' => 'architecture',
    'boot_id' => 'bootID',
    'container_runtime_version' => 'containerRuntimeVersion',
    'kernel_version' => 'kernelVersion',
    'kube_proxy_version' => 'kubeProxyVersion',
    'kubelet_version' => 'kubeletVersion',
    'machine_id' => 'machineID',
    'operating_system' => 'operatingSystem',
    'os_image' => 'osImage',
    'system_uuid' => 'systemUUID'
} );

__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});


1;
