<?php

declare (strict_types=1);
/*
 * PaypalServerSdkLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */
namespace FormGent\PaypalServerSdkLib\Models\Builders;

use FormGent\Core\Utils\CoreHelper;
use FormGent\PaypalServerSdkLib\Models\ParticipantMetadata;
/**
 * Builder for model ParticipantMetadata
 *
 * @see ParticipantMetadata
 */
class ParticipantMetadataBuilder
{
    /**
     * @var ParticipantMetadata
     */
    private $instance;
    private function __construct(ParticipantMetadata $instance)
    {
        $this->instance = $instance;
    }
    /**
     * Initializes a new Participant Metadata Builder object.
     */
    public static function init() : self
    {
        return new self(new ParticipantMetadata());
    }
    /**
     * Sets ip address field.
     *
     * @param string|null $value
     */
    public function ipAddress(?string $value) : self
    {
        $this->instance->setIpAddress($value);
        return $this;
    }
    /**
     * Initializes a new Participant Metadata object.
     */
    public function build() : ParticipantMetadata
    {
        return CoreHelper::clone($this->instance);
    }
}
