# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2020 Raritan Inc. All rights reserved.
#
# This file was generated by IdlC from Net.idl.

use strict;

package Raritan::RPC::net::NetworkConfigIP;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'gai_prefer_ipv6'} = ($in->{'gai_prefer_ipv6'}) ? JSON::true : JSON::false;
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'gai_prefer_ipv6'} = ($in->{'gai_prefer_ipv6'}) ? 1 : 0;
    return $decoded;
}

1;
