1
0

Automated commit message

This commit is contained in:
PayPalServerSDKs
2024-09-04 15:55:32 +00:00
parent c9cb1ad04a
commit f6cd8b4d4f
732 changed files with 73611 additions and 1 deletions

View File

@@ -0,0 +1,84 @@
<?php
declare(strict_types=1);
/*
* PayPalRESTAPIsLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
namespace PayPalRESTAPIsLib\Logging;
use PayPalRESTAPIsLib\ConfigurationDefaults;
use Core\Logger\Configuration\ResponseConfiguration;
use Core\Utils\CoreHelper;
class ResponseLoggingConfigurationBuilder
{
private $body = ConfigurationDefaults::LOGGER_LOG_BODY;
private $headers = ConfigurationDefaults::LOGGER_LOG_HEADERS;
private $includeHeaders = ConfigurationDefaults::LOGGER_INCLUDE_HEADERS;
private $excludeHeaders = ConfigurationDefaults::LOGGER_EXCLUDE_HEADERS;
private $unmaskHeaders = ConfigurationDefaults::LOGGER_UNMASK_HEADERS;
/**
* Initializer for ResponseLoggingConfigurationBuilder.
*/
public static function init(): self
{
return new self();
}
public function body(bool $body): self
{
$this->body = $body;
return $this;
}
public function headers(bool $headers): self
{
$this->headers = $headers;
return $this;
}
public function includeHeaders(string ...$includeHeaders): self
{
$this->includeHeaders = $includeHeaders;
return $this;
}
public function excludeHeaders(string ...$excludeHeaders): self
{
$this->excludeHeaders = $excludeHeaders;
return $this;
}
public function unmaskHeaders(string ...$unmaskHeaders): self
{
$this->unmaskHeaders = $unmaskHeaders;
return $this;
}
public function getConfiguration(): array
{
return [
'body' => $this->body,
'headers' => $this->headers,
'includeHeaders' => CoreHelper::clone($this->includeHeaders),
'excludeHeaders' => CoreHelper::clone($this->excludeHeaders),
'unmaskHeaders' => CoreHelper::clone($this->unmaskHeaders)
];
}
public function build(): ResponseConfiguration
{
return new ResponseConfiguration(
$this->body,
$this->headers,
$this->includeHeaders,
$this->excludeHeaders,
$this->unmaskHeaders
);
}
}