diff --git a/.github/workflows/sdk_generation.yaml b/.github/workflows/sdk_generation.yaml index 9a9c314..eff06ab 100644 --- a/.github/workflows/sdk_generation.yaml +++ b/.github/workflows/sdk_generation.yaml @@ -59,6 +59,16 @@ jobs: with: php-version: "8.3" + - name: Setup yq + # scripts/generate.sh rewrites the spec with yq (mikefarah v4) before + # generation. Pin and verify the binary instead of relying on whatever + # the runner image ships; fail closed on checksum mismatch. + run: | + curl -fsSL -o /tmp/yq \ + https://github.com/mikefarah/yq/releases/download/v4.44.3/yq_linux_amd64 + echo "a2c097180dd884a8d50c956ee16a9cec070f30a7947cf4ebf87d5f36213e9ed7 /tmp/yq" | sha256sum -c - + sudo install -m 0755 /tmp/yq /usr/local/bin/yq + - name: Regenerate client run: ./scripts/generate.sh diff --git a/README.md b/README.md index 94c0899..fac0f05 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,7 @@ use Convoy\Client\Model\ModelsCreateEvent; $config = (new Configuration()) ->setHost('https://us.getconvoy.cloud/api') - ->setApiKeyPrefix('Authorization', 'Bearer') - ->setApiKey('Authorization', $apiKey); + ->setAccessToken($apiKey); // the client adds the Bearer prefix // Pin the API version this client was generated from. $http = new \GuzzleHttp\Client([ diff --git a/scripts/generate.sh b/scripts/generate.sh index a471e1e..1165bdc 100755 --- a/scripts/generate.sh +++ b/scripts/generate.sh @@ -5,7 +5,7 @@ set -euo pipefail # (php), then sync it into src/Client/ without touching the hand-written SDK # code (the rest of src/, incl. webhook verify). # -# Requires: java 17+, rsync, curl. Run from the repo root. +# Requires: java 17+, rsync, curl, yq (mikefarah v4). Run from the repo root. SPEC_URL="${SPEC_URL:-https://raw.githubusercontent.com/frain-dev/convoy/main/docs/v3/openapi3.yaml}" # Pin so regeneration output is reproducible; bump deliberately. @@ -33,6 +33,23 @@ echo "${GENERATOR_SHA256} ${GENERATOR_JAR}" | shasum -a 256 -c - >/dev/null || curl -fsSL "$SPEC_URL" -o "$tmp/openapi3.yaml" +# The spec marks portal link endpoints_metadata items nullable via +# {allOf: [{$ref: ...}], nullable: true} so strict clients tolerate [null] +# elements from the server. OpenAPI Generator's php generator mangles that +# wrapper into a namespace-less class reference (\ConvoyClientModel...), which +# breaks ObjectSerializer at runtime +# (https://github.com/OpenAPITools/openapi-generator/issues/23141). Unwrap the +# single-$ref nullable items back to a plain $ref before generation: the PHP +# runtime already tolerates null array elements (ObjectSerializer::deserialize +# returns null before instantiating the class), so nothing is lost. No-op when +# the spec stops using the wrapper shape. +yq -i ' + (.components.schemas[] | select(has("properties")) | .properties[] + | select(has("items")) | .items + | select(has("allOf") and .nullable == true and (.allOf | length) == 1 and (.allOf[0] | has("$ref"))) + ) |= .allOf[0] +' "$tmp/openapi3.yaml" + java -jar "$GENERATOR_JAR" generate \ -i "$tmp/openapi3.yaml" \ -g php \ diff --git a/src/Client/Api/DeliveryAttemptsApi.php b/src/Client/Api/DeliveryAttemptsApi.php index b4d749a..e5f8ada 100644 --- a/src/Client/Api/DeliveryAttemptsApi.php +++ b/src/Client/Api/DeliveryAttemptsApi.php @@ -457,10 +457,9 @@ public function getDeliveryAttemptRequest($project_id, $event_delivery_id, $deli } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -792,10 +791,9 @@ public function getDeliveryAttemptsRequest($project_id, $event_delivery_id, stri } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/EndpointsApi.php b/src/Client/Api/EndpointsApi.php index 96ccb18..c80d17f 100644 --- a/src/Client/Api/EndpointsApi.php +++ b/src/Client/Api/EndpointsApi.php @@ -458,10 +458,9 @@ public function activateEndpointRequest($project_id, $endpoint_id, string $conte } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -792,10 +791,9 @@ public function createEndpointRequest($project_id, $models_create_endpoint, stri } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1127,10 +1125,9 @@ public function deleteEndpointRequest($project_id, $endpoint_id, string $content } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1481,10 +1478,9 @@ public function expireSecretRequest($project_id, $endpoint_id, $models_expire_se } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1816,10 +1812,9 @@ public function getEndpointRequest($project_id, $endpoint_id, string $contentTyp } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2236,10 +2231,9 @@ public function getEndpointsRequest($project_id, $direction = null, $next_page_c } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2571,10 +2565,9 @@ public function pauseEndpointRequest($project_id, $endpoint_id, string $contentT } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2905,10 +2898,9 @@ public function testOAuth2ConnectionRequest($project_id, $models_test_o_auth2_re } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -3259,10 +3251,9 @@ public function updateEndpointRequest($project_id, $endpoint_id, $models_update_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/EventDeliveriesApi.php b/src/Client/Api/EventDeliveriesApi.php index c05398e..214eb2f 100644 --- a/src/Client/Api/EventDeliveriesApi.php +++ b/src/Client/Api/EventDeliveriesApi.php @@ -621,10 +621,9 @@ public function batchRetryEventDeliveryRequest($project_id, $direction = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -955,10 +954,9 @@ public function forceResendEventDeliveriesRequest($project_id, $models_ids, stri } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1465,10 +1463,9 @@ public function getEventDeliveriesPagedRequest($project_id, $direction = null, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1800,10 +1797,9 @@ public function getEventDeliveryRequest($project_id, $event_delivery_id, string } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2135,10 +2131,9 @@ public function resendEventDeliveryRequest($project_id, $event_delivery_id, stri } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/EventTypesApi.php b/src/Client/Api/EventTypesApi.php index 2e94a5c..3a3c72a 100644 --- a/src/Client/Api/EventTypesApi.php +++ b/src/Client/Api/EventTypesApi.php @@ -445,10 +445,9 @@ public function createEventTypeRequest($project_id, $models_create_event_type, s } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -780,10 +779,9 @@ public function deprecateEventTypeRequest($project_id, $event_type_id, string $c } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1095,10 +1093,9 @@ public function getEventTypesRequest($project_id, string $contentType = self::co } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1429,10 +1426,9 @@ public function importOpenApiSpecRequest($project_id, $models_import_open_api_sp } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1783,10 +1779,9 @@ public function updateEventTypeRequest($project_id, $event_type_id, $models_upda } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/EventsApi.php b/src/Client/Api/EventsApi.php index b775d21..dd6430a 100644 --- a/src/Client/Api/EventsApi.php +++ b/src/Client/Api/EventsApi.php @@ -603,10 +603,9 @@ public function batchReplayEventsRequest($project_id, $direction = null, $end_da } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1083,10 +1082,9 @@ public function countAffectedEventsRequest($project_id, $direction = null, $end_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1417,10 +1415,9 @@ public function createBroadcastEventRequest($project_id, $models_broadcast_event } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1751,10 +1748,9 @@ public function createDynamicEventRequest($project_id, $models_dynamic_event, st } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2085,10 +2081,9 @@ public function createEndpointEventRequest($project_id, $models_create_event, st } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2419,10 +2414,9 @@ public function createEndpointFanoutEventRequest($project_id, $models_fanout_eve } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2754,10 +2748,9 @@ public function getEndpointEventRequest($project_id, $event_id, string $contentT } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -3234,10 +3227,9 @@ public function getEventsPagedRequest($project_id, $direction = null, $end_date } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -3569,10 +3561,9 @@ public function replayEndpointEventRequest($project_id, $event_id, string $conte } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/FiltersApi.php b/src/Client/Api/FiltersApi.php index 4f0eedc..f1df347 100644 --- a/src/Client/Api/FiltersApi.php +++ b/src/Client/Api/FiltersApi.php @@ -474,10 +474,9 @@ public function bulkCreateFiltersRequest($project_id, $subscription_id, $models_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -828,10 +827,9 @@ public function bulkUpdateFiltersRequest($project_id, $subscription_id, $models_ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1182,10 +1180,9 @@ public function createFilterRequest($project_id, $subscription_id, $models_creat } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1537,10 +1534,9 @@ public function deleteFilterRequest($project_id, $subscription_id, $filter_id, s } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1892,10 +1888,9 @@ public function getFilterRequest($project_id, $subscription_id, $filter_id, stri } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2227,10 +2222,9 @@ public function getFiltersRequest($project_id, $subscription_id, string $content } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2601,10 +2595,9 @@ public function testFilterRequest($project_id, $subscription_id, $event_type, $m } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2975,10 +2968,9 @@ public function updateFilterRequest($project_id, $subscription_id, $filter_id, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/MetaEventsApi.php b/src/Client/Api/MetaEventsApi.php index 15442e3..2bc94c0 100644 --- a/src/Client/Api/MetaEventsApi.php +++ b/src/Client/Api/MetaEventsApi.php @@ -440,10 +440,9 @@ public function getMetaEventRequest($project_id, $meta_event_id, string $content } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -860,10 +859,9 @@ public function getMetaEventsPagedRequest($project_id, $direction = null, $end_d } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1195,10 +1193,9 @@ public function resendMetaEventRequest($project_id, $meta_event_id, string $cont } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/OnboardApi.php b/src/Client/Api/OnboardApi.php index c4dd982..0deb5c2 100644 --- a/src/Client/Api/OnboardApi.php +++ b/src/Client/Api/OnboardApi.php @@ -76,7 +76,7 @@ class OnboardApi /** @var string[] $contentTypes **/ public const contentTypes = [ 'bulkOnboard' => [ - 'application/octet-stream', + 'application/json', ], ]; @@ -133,16 +133,16 @@ public function getConfig() * * @param string $project_id Project ID (required) * @param bool|null $dry_run Validate without creating (optional) - * @param \SplFileObject|null $body Onboard Details (JSON) (optional) + * @param \Convoy\Client\Model\ModelsBulkOnboardRequest|null $models_bulk_onboard_request Onboard Details (JSON) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkOnboard'] to see the possible values for this operation * * @throws \Convoy\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \Convoy\Client\Model\BulkOnboard200Response|\Convoy\Client\Model\BulkOnboard202Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response */ - public function bulkOnboard($project_id, $dry_run = null, $body = null, string $contentType = self::contentTypes['bulkOnboard'][0]) + public function bulkOnboard($project_id, $dry_run = null, $models_bulk_onboard_request = null, string $contentType = self::contentTypes['bulkOnboard'][0]) { - list($response) = $this->bulkOnboardWithHttpInfo($project_id, $dry_run, $body, $contentType); + list($response) = $this->bulkOnboardWithHttpInfo($project_id, $dry_run, $models_bulk_onboard_request, $contentType); return $response; } @@ -153,16 +153,16 @@ public function bulkOnboard($project_id, $dry_run = null, $body = null, string $ * * @param string $project_id Project ID (required) * @param bool|null $dry_run Validate without creating (optional) - * @param \SplFileObject|null $body Onboard Details (JSON) (optional) + * @param \Convoy\Client\Model\ModelsBulkOnboardRequest|null $models_bulk_onboard_request Onboard Details (JSON) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkOnboard'] to see the possible values for this operation * * @throws \Convoy\Client\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \Convoy\Client\Model\BulkOnboard200Response|\Convoy\Client\Model\BulkOnboard202Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response|\Convoy\Client\Model\GetProjects400Response, HTTP status code, HTTP response headers (array of strings) */ - public function bulkOnboardWithHttpInfo($project_id, $dry_run = null, $body = null, string $contentType = self::contentTypes['bulkOnboard'][0]) + public function bulkOnboardWithHttpInfo($project_id, $dry_run = null, $models_bulk_onboard_request = null, string $contentType = self::contentTypes['bulkOnboard'][0]) { - $request = $this->bulkOnboardRequest($project_id, $dry_run, $body, $contentType); + $request = $this->bulkOnboardRequest($project_id, $dry_run, $models_bulk_onboard_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -296,15 +296,15 @@ public function bulkOnboardWithHttpInfo($project_id, $dry_run = null, $body = nu * * @param string $project_id Project ID (required) * @param bool|null $dry_run Validate without creating (optional) - * @param \SplFileObject|null $body Onboard Details (JSON) (optional) + * @param \Convoy\Client\Model\ModelsBulkOnboardRequest|null $models_bulk_onboard_request Onboard Details (JSON) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkOnboard'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkOnboardAsync($project_id, $dry_run = null, $body = null, string $contentType = self::contentTypes['bulkOnboard'][0]) + public function bulkOnboardAsync($project_id, $dry_run = null, $models_bulk_onboard_request = null, string $contentType = self::contentTypes['bulkOnboard'][0]) { - return $this->bulkOnboardAsyncWithHttpInfo($project_id, $dry_run, $body, $contentType) + return $this->bulkOnboardAsyncWithHttpInfo($project_id, $dry_run, $models_bulk_onboard_request, $contentType) ->then( function ($response) { return $response[0]; @@ -319,16 +319,16 @@ function ($response) { * * @param string $project_id Project ID (required) * @param bool|null $dry_run Validate without creating (optional) - * @param \SplFileObject|null $body Onboard Details (JSON) (optional) + * @param \Convoy\Client\Model\ModelsBulkOnboardRequest|null $models_bulk_onboard_request Onboard Details (JSON) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkOnboard'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function bulkOnboardAsyncWithHttpInfo($project_id, $dry_run = null, $body = null, string $contentType = self::contentTypes['bulkOnboard'][0]) + public function bulkOnboardAsyncWithHttpInfo($project_id, $dry_run = null, $models_bulk_onboard_request = null, string $contentType = self::contentTypes['bulkOnboard'][0]) { $returnType = '\Convoy\Client\Model\BulkOnboard200Response'; - $request = $this->bulkOnboardRequest($project_id, $dry_run, $body, $contentType); + $request = $this->bulkOnboardRequest($project_id, $dry_run, $models_bulk_onboard_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -371,13 +371,13 @@ function ($exception) { * * @param string $project_id Project ID (required) * @param bool|null $dry_run Validate without creating (optional) - * @param \SplFileObject|null $body Onboard Details (JSON) (optional) + * @param \Convoy\Client\Model\ModelsBulkOnboardRequest|null $models_bulk_onboard_request Onboard Details (JSON) (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['bulkOnboard'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function bulkOnboardRequest($project_id, $dry_run = null, $body = null, string $contentType = self::contentTypes['bulkOnboard'][0]) + public function bulkOnboardRequest($project_id, $dry_run = null, $models_bulk_onboard_request = null, string $contentType = self::contentTypes['bulkOnboard'][0]) { // verify the required parameter 'project_id' is set @@ -425,12 +425,12 @@ public function bulkOnboardRequest($project_id, $dry_run = null, $body = null, s ); // for model (json/xml) - if (isset($body)) { + if (isset($models_bulk_onboard_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($models_bulk_onboard_request)); } else { - $httpBody = $body; + $httpBody = $models_bulk_onboard_request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -456,10 +456,9 @@ public function bulkOnboardRequest($project_id, $dry_run = null, $body = null, s } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/PortalLinksApi.php b/src/Client/Api/PortalLinksApi.php index 4c37d02..816fe9b 100644 --- a/src/Client/Api/PortalLinksApi.php +++ b/src/Client/Api/PortalLinksApi.php @@ -448,10 +448,9 @@ public function createPortalLinkRequest($project_id, $datastore_create_portal_li } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -783,10 +782,9 @@ public function getPortalLinkRequest($project_id, $portal_link_id, string $conte } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1203,10 +1201,9 @@ public function loadPortalLinksPagedRequest($project_id, $direction = null, $nex } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1538,10 +1535,9 @@ public function refreshPortalLinkAuthTokenRequest($project_id, $portal_link_id, } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1873,10 +1869,9 @@ public function revokePortalLinkRequest($project_id, $portal_link_id, string $co } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2227,10 +2222,9 @@ public function updatePortalLinkRequest($project_id, $portal_link_id, $datastore } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/ProjectsApi.php b/src/Client/Api/ProjectsApi.php index 981525d..a0a51f8 100644 --- a/src/Client/Api/ProjectsApi.php +++ b/src/Client/Api/ProjectsApi.php @@ -474,10 +474,9 @@ public function createProjectRequest($org_id, $models_create_project, string $co } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -803,10 +802,9 @@ public function deleteProjectRequest($project_id, string $contentType = self::co } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1118,10 +1116,9 @@ public function getProjectRequest($project_id, string $contentType = self::conte } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1434,10 +1431,9 @@ public function getProjectsRequest($org_id, string $contentType = self::contentT } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1782,10 +1778,9 @@ public function updateProjectRequest($project_id, $models_update_project, string } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/SourcesApi.php b/src/Client/Api/SourcesApi.php index c5d23d9..7f50f66 100644 --- a/src/Client/Api/SourcesApi.php +++ b/src/Client/Api/SourcesApi.php @@ -445,10 +445,9 @@ public function createSourceRequest($project_id, $models_create_source, string $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -780,10 +779,9 @@ public function deleteSourceRequest($project_id, $source_id, string $contentType } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1115,10 +1113,9 @@ public function getSourceRequest($project_id, $source_id, string $contentType = } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1535,10 +1532,9 @@ public function loadSourcesPagedRequest($project_id, $direction = null, $next_pa } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1889,10 +1885,9 @@ public function updateSourceRequest($project_id, $source_id, $models_update_sour } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Api/SubscriptionsApi.php b/src/Client/Api/SubscriptionsApi.php index 81337ee..1d7fa00 100644 --- a/src/Client/Api/SubscriptionsApi.php +++ b/src/Client/Api/SubscriptionsApi.php @@ -457,10 +457,9 @@ public function createSubscriptionRequest($project_id, $models_create_subscripti } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -792,10 +791,9 @@ public function deleteSubscriptionRequest($project_id, $subscription_id, string } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1127,10 +1125,9 @@ public function getSubscriptionRequest($project_id, $subscription_id, string $co } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1547,10 +1544,9 @@ public function getSubscriptionsRequest($project_id, $direction = null, $endpoin } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -1881,10 +1877,9 @@ public function testSubscriptionFilterRequest($project_id, $models_test_filter, } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2215,10 +2210,9 @@ public function testSubscriptionFunctionRequest($project_id, $models_function_re } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2550,10 +2544,9 @@ public function toggleSubscriptionStatusRequest($project_id, $subscription_id, s } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -2904,10 +2897,9 @@ public function updateSubscriptionRequest($project_id, $subscription_id, $models } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; @@ -3238,10 +3230,9 @@ public function v1ProjectsProjectIDSourcesTestFunctionPostRequest($project_id, $ } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); - if ($apiKey !== null) { - $headers['Authorization'] = $apiKey; + // this endpoint requires Bearer authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/src/Client/Model/AuthRoleType.php b/src/Client/Model/AuthRoleType.php index 7b57e10..b96f392 100644 --- a/src/Client/Model/AuthRoleType.php +++ b/src/Client/Model/AuthRoleType.php @@ -73,6 +73,8 @@ class AuthRoleType */ public const ROLE_API = 'api'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -85,7 +87,8 @@ public static function getAllowableEnumValues() self::ROLE_BILLING_ADMIN, self::ROLE_PROJECT_ADMIN, self::ROLE_PROJECT_VIEWER, - self::ROLE_API + self::ROLE_API, + self::EMPTY ]; } } diff --git a/src/Client/Model/ConfigRequestIDHeaderProvider.php b/src/Client/Model/ConfigRequestIDHeaderProvider.php index 122b892..40f6a1c 100644 --- a/src/Client/Model/ConfigRequestIDHeaderProvider.php +++ b/src/Client/Model/ConfigRequestIDHeaderProvider.php @@ -45,6 +45,8 @@ class ConfigRequestIDHeaderProvider */ public const DEFAULT_REQUEST_ID_HEADER = 'X-Convoy-Idempotency-Key'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -52,7 +54,8 @@ class ConfigRequestIDHeaderProvider public static function getAllowableEnumValues() { return [ - self::DEFAULT_REQUEST_ID_HEADER + self::DEFAULT_REQUEST_ID_HEADER, + self::EMPTY ]; } } diff --git a/src/Client/Model/ConfigSignatureHeaderProvider.php b/src/Client/Model/ConfigSignatureHeaderProvider.php index d6e0dd1..f4ca933 100644 --- a/src/Client/Model/ConfigSignatureHeaderProvider.php +++ b/src/Client/Model/ConfigSignatureHeaderProvider.php @@ -45,6 +45,8 @@ class ConfigSignatureHeaderProvider */ public const DEFAULT_SIGNATURE_HEADER = 'X-Convoy-Signature'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -52,7 +54,8 @@ class ConfigSignatureHeaderProvider public static function getAllowableEnumValues() { return [ - self::DEFAULT_SIGNATURE_HEADER + self::DEFAULT_SIGNATURE_HEADER, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreAPIKeyResponse.php b/src/Client/Model/DatastoreAPIKeyResponse.php index 39cc983..f35f8ed 100644 --- a/src/Client/Model/DatastoreAPIKeyResponse.php +++ b/src/Client/Model/DatastoreAPIKeyResponse.php @@ -93,7 +93,7 @@ class DatastoreAPIKeyResponse implements ModelInterface, ArrayAccess, \JsonSeria */ protected static array $openAPINullables = [ 'created_at' => false, - 'expires_at' => false, + 'expires_at' => true, 'key' => false, 'key_type' => false, 'name' => false, @@ -386,7 +386,14 @@ public function getExpiresAt() public function setExpiresAt($expires_at) { if (is_null($expires_at)) { - throw new \InvalidArgumentException('non-nullable expires_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'expires_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expires_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['expires_at'] = $expires_at; diff --git a/src/Client/Model/DatastoreAmqpPubSubConfig.php b/src/Client/Model/DatastoreAmqpPubSubConfig.php index a71d894..1912683 100644 --- a/src/Client/Model/DatastoreAmqpPubSubConfig.php +++ b/src/Client/Model/DatastoreAmqpPubSubConfig.php @@ -95,14 +95,14 @@ class DatastoreAmqpPubSubConfig implements ModelInterface, ArrayAccess, \JsonSer */ protected static array $openAPINullables = [ 'host' => false, - 'auth' => false, - 'binded_exchange' => false, - 'dead_letter_exchange' => false, + 'auth' => true, + 'binded_exchange' => true, + 'dead_letter_exchange' => true, 'port' => false, 'queue' => false, 'routing_key' => false, 'schema' => false, - 'vhost' => false + 'vhost' => true ]; /** @@ -393,7 +393,14 @@ public function getAuth() public function setAuth($auth) { if (is_null($auth)) { - throw new \InvalidArgumentException('non-nullable auth cannot be null'); + array_push($this->openAPINullablesSetToNull, 'auth'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('auth', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['auth'] = $auth; @@ -420,7 +427,14 @@ public function getBindedExchange() public function setBindedExchange($binded_exchange) { if (is_null($binded_exchange)) { - throw new \InvalidArgumentException('non-nullable binded_exchange cannot be null'); + array_push($this->openAPINullablesSetToNull, 'binded_exchange'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('binded_exchange', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['binded_exchange'] = $binded_exchange; @@ -447,7 +461,14 @@ public function getDeadLetterExchange() public function setDeadLetterExchange($dead_letter_exchange) { if (is_null($dead_letter_exchange)) { - throw new \InvalidArgumentException('non-nullable dead_letter_exchange cannot be null'); + array_push($this->openAPINullablesSetToNull, 'dead_letter_exchange'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('dead_letter_exchange', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['dead_letter_exchange'] = $dead_letter_exchange; @@ -582,7 +603,14 @@ public function getVhost() public function setVhost($vhost) { if (is_null($vhost)) { - throw new \InvalidArgumentException('non-nullable vhost cannot be null'); + array_push($this->openAPINullablesSetToNull, 'vhost'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('vhost', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['vhost'] = $vhost; diff --git a/src/Client/Model/DatastoreDeliveryAttempt.php b/src/Client/Model/DatastoreDeliveryAttempt.php index 1e209db..1563d4f 100644 --- a/src/Client/Model/DatastoreDeliveryAttempt.php +++ b/src/Client/Model/DatastoreDeliveryAttempt.php @@ -116,7 +116,7 @@ class DatastoreDeliveryAttempt implements ModelInterface, ArrayAccess, \JsonSeri protected static array $openAPINullables = [ 'api_version' => false, 'created_at' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'endpoint_id' => false, 'error' => false, 'http_status' => false, @@ -124,11 +124,11 @@ class DatastoreDeliveryAttempt implements ModelInterface, ArrayAccess, \JsonSeri 'method' => false, 'msg_id' => false, 'project_id' => false, - 'request_http_header' => false, - 'requested_at' => false, - 'responded_at' => false, + 'request_http_header' => true, + 'requested_at' => true, + 'responded_at' => true, 'response_data' => false, - 'response_http_header' => false, + 'response_http_header' => true, 'status' => false, 'uid' => false, 'updated_at' => false, @@ -490,7 +490,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -706,7 +713,14 @@ public function getRequestHttpHeader() public function setRequestHttpHeader($request_http_header) { if (is_null($request_http_header)) { - throw new \InvalidArgumentException('non-nullable request_http_header cannot be null'); + array_push($this->openAPINullablesSetToNull, 'request_http_header'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('request_http_header', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['request_http_header'] = $request_http_header; @@ -733,7 +747,14 @@ public function getRequestedAt() public function setRequestedAt($requested_at) { if (is_null($requested_at)) { - throw new \InvalidArgumentException('non-nullable requested_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'requested_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('requested_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['requested_at'] = $requested_at; @@ -760,7 +781,14 @@ public function getRespondedAt() public function setRespondedAt($responded_at) { if (is_null($responded_at)) { - throw new \InvalidArgumentException('non-nullable responded_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'responded_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('responded_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['responded_at'] = $responded_at; @@ -814,7 +842,14 @@ public function getResponseHttpHeader() public function setResponseHttpHeader($response_http_header) { if (is_null($response_http_header)) { - throw new \InvalidArgumentException('non-nullable response_http_header cannot be null'); + array_push($this->openAPINullablesSetToNull, 'response_http_header'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('response_http_header', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['response_http_header'] = $response_http_header; diff --git a/src/Client/Model/DatastoreDeliveryMode.php b/src/Client/Model/DatastoreDeliveryMode.php index 9ad52b6..26cffca 100644 --- a/src/Client/Model/DatastoreDeliveryMode.php +++ b/src/Client/Model/DatastoreDeliveryMode.php @@ -47,6 +47,8 @@ class DatastoreDeliveryMode public const AT_MOST_ONCE_DELIVERY_MODE = 'at_most_once'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,8 @@ public static function getAllowableEnumValues() { return [ self::AT_LEAST_ONCE_DELIVERY_MODE, - self::AT_MOST_ONCE_DELIVERY_MODE + self::AT_MOST_ONCE_DELIVERY_MODE, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreDevice.php b/src/Client/Model/DatastoreDevice.php index 628914c..251d26f 100644 --- a/src/Client/Model/DatastoreDevice.php +++ b/src/Client/Model/DatastoreDevice.php @@ -95,7 +95,7 @@ class DatastoreDevice implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'created_at' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'endpoint_id' => false, 'host_name' => false, 'last_seen_at' => false, @@ -393,7 +393,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; diff --git a/src/Client/Model/DatastoreDeviceStatus.php b/src/Client/Model/DatastoreDeviceStatus.php index d4b8440..9e2b022 100644 --- a/src/Client/Model/DatastoreDeviceStatus.php +++ b/src/Client/Model/DatastoreDeviceStatus.php @@ -49,6 +49,8 @@ class DatastoreDeviceStatus public const DEVICE_STATUS_DISABLED = 'disabled'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -58,7 +60,8 @@ public static function getAllowableEnumValues() return [ self::DEVICE_STATUS_OFFLINE, self::DEVICE_STATUS_ONLINE, - self::DEVICE_STATUS_DISABLED + self::DEVICE_STATUS_DISABLED, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreEncodingType.php b/src/Client/Model/DatastoreEncodingType.php index bd15221..6d495a5 100644 --- a/src/Client/Model/DatastoreEncodingType.php +++ b/src/Client/Model/DatastoreEncodingType.php @@ -47,6 +47,8 @@ class DatastoreEncodingType public const HEX_ENCODING = 'hex'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,8 @@ public static function getAllowableEnumValues() { return [ self::BASE64_ENCODING, - self::HEX_ENCODING + self::HEX_ENCODING, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreEndpoint.php b/src/Client/Model/DatastoreEndpoint.php index 3607ee6..0a4df25 100644 --- a/src/Client/Model/DatastoreEndpoint.php +++ b/src/Client/Model/DatastoreEndpoint.php @@ -131,28 +131,28 @@ class DatastoreEndpoint implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static array $openAPINullables = [ 'advanced_signatures' => false, - 'authentication' => false, - 'cb_state' => false, + 'authentication' => true, + 'cb_state' => true, 'content_type' => false, 'created_at' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'description' => false, 'events' => false, - 'failure_count' => false, - 'failure_rate' => false, + 'failure_count' => true, + 'failure_rate' => true, 'http_timeout' => false, - 'mtls_client_cert' => false, + 'mtls_client_cert' => true, 'name' => false, 'owner_id' => false, - 'period_failure_rate' => false, + 'period_failure_rate' => true, 'project_id' => false, 'rate_limit' => false, 'rate_limit_duration' => false, - 'retry_count' => false, + 'retry_count' => true, 'secrets' => false, 'slack_webhook_url' => false, 'status' => false, - 'success_count' => false, + 'success_count' => true, 'support_email' => false, 'uid' => false, 'updated_at' => false, @@ -519,7 +519,14 @@ public function getAuthentication() public function setAuthentication($authentication) { if (is_null($authentication)) { - throw new \InvalidArgumentException('non-nullable authentication cannot be null'); + array_push($this->openAPINullablesSetToNull, 'authentication'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('authentication', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['authentication'] = $authentication; @@ -546,7 +553,14 @@ public function getCbState() public function setCbState($cb_state) { if (is_null($cb_state)) { - throw new \InvalidArgumentException('non-nullable cb_state cannot be null'); + array_push($this->openAPINullablesSetToNull, 'cb_state'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cb_state', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['cb_state'] = $cb_state; @@ -627,7 +641,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -708,7 +729,14 @@ public function getFailureCount() public function setFailureCount($failure_count) { if (is_null($failure_count)) { - throw new \InvalidArgumentException('non-nullable failure_count cannot be null'); + array_push($this->openAPINullablesSetToNull, 'failure_count'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('failure_count', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['failure_count'] = $failure_count; @@ -735,7 +763,14 @@ public function getFailureRate() public function setFailureRate($failure_rate) { if (is_null($failure_rate)) { - throw new \InvalidArgumentException('non-nullable failure_rate cannot be null'); + array_push($this->openAPINullablesSetToNull, 'failure_rate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('failure_rate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['failure_rate'] = $failure_rate; @@ -789,7 +824,14 @@ public function getMtlsClientCert() public function setMtlsClientCert($mtls_client_cert) { if (is_null($mtls_client_cert)) { - throw new \InvalidArgumentException('non-nullable mtls_client_cert cannot be null'); + array_push($this->openAPINullablesSetToNull, 'mtls_client_cert'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('mtls_client_cert', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['mtls_client_cert'] = $mtls_client_cert; @@ -870,7 +912,14 @@ public function getPeriodFailureRate() public function setPeriodFailureRate($period_failure_rate) { if (is_null($period_failure_rate)) { - throw new \InvalidArgumentException('non-nullable period_failure_rate cannot be null'); + array_push($this->openAPINullablesSetToNull, 'period_failure_rate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('period_failure_rate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['period_failure_rate'] = $period_failure_rate; @@ -978,7 +1027,14 @@ public function getRetryCount() public function setRetryCount($retry_count) { if (is_null($retry_count)) { - throw new \InvalidArgumentException('non-nullable retry_count cannot be null'); + array_push($this->openAPINullablesSetToNull, 'retry_count'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('retry_count', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['retry_count'] = $retry_count; @@ -1086,7 +1142,14 @@ public function getSuccessCount() public function setSuccessCount($success_count) { if (is_null($success_count)) { - throw new \InvalidArgumentException('non-nullable success_count cannot be null'); + array_push($this->openAPINullablesSetToNull, 'success_count'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('success_count', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['success_count'] = $success_count; diff --git a/src/Client/Model/DatastoreEndpointAuthentication.php b/src/Client/Model/DatastoreEndpointAuthentication.php index 6ca29b3..1dd38c0 100644 --- a/src/Client/Model/DatastoreEndpointAuthentication.php +++ b/src/Client/Model/DatastoreEndpointAuthentication.php @@ -84,9 +84,9 @@ class DatastoreEndpointAuthentication implements ModelInterface, ArrayAccess, \J * @var boolean[] */ protected static array $openAPINullables = [ - 'api_key' => false, - 'basic_auth' => false, - 'oauth2' => false, + 'api_key' => true, + 'basic_auth' => true, + 'oauth2' => true, 'type' => false ]; @@ -331,7 +331,14 @@ public function getApiKey() public function setApiKey($api_key) { if (is_null($api_key)) { - throw new \InvalidArgumentException('non-nullable api_key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'api_key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('api_key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['api_key'] = $api_key; @@ -358,7 +365,14 @@ public function getBasicAuth() public function setBasicAuth($basic_auth) { if (is_null($basic_auth)) { - throw new \InvalidArgumentException('non-nullable basic_auth cannot be null'); + array_push($this->openAPINullablesSetToNull, 'basic_auth'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('basic_auth', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['basic_auth'] = $basic_auth; @@ -385,7 +399,14 @@ public function getOauth2() public function setOauth2($oauth2) { if (is_null($oauth2)) { - throw new \InvalidArgumentException('non-nullable oauth2 cannot be null'); + array_push($this->openAPINullablesSetToNull, 'oauth2'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('oauth2', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['oauth2'] = $oauth2; diff --git a/src/Client/Model/DatastoreEndpointAuthenticationType.php b/src/Client/Model/DatastoreEndpointAuthenticationType.php index 9e3f209..b74f5d3 100644 --- a/src/Client/Model/DatastoreEndpointAuthenticationType.php +++ b/src/Client/Model/DatastoreEndpointAuthenticationType.php @@ -49,6 +49,8 @@ class DatastoreEndpointAuthenticationType public const BASIC_AUTHENTICATION = 'basic_auth'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -58,7 +60,8 @@ public static function getAllowableEnumValues() return [ self::API_KEY_AUTHENTICATION, self::O_AUTH2_AUTHENTICATION, - self::BASIC_AUTHENTICATION + self::BASIC_AUTHENTICATION, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreEndpointStatus.php b/src/Client/Model/DatastoreEndpointStatus.php index 3a8487a..aab8e48 100644 --- a/src/Client/Model/DatastoreEndpointStatus.php +++ b/src/Client/Model/DatastoreEndpointStatus.php @@ -49,6 +49,8 @@ class DatastoreEndpointStatus public const PAUSED_ENDPOINT_STATUS = 'paused'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -58,7 +60,8 @@ public static function getAllowableEnumValues() return [ self::ACTIVE_ENDPOINT_STATUS, self::INACTIVE_ENDPOINT_STATUS, - self::PAUSED_ENDPOINT_STATUS + self::PAUSED_ENDPOINT_STATUS, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreEvent.php b/src/Client/Model/DatastoreEvent.php index afb79f6..e4a7853 100644 --- a/src/Client/Model/DatastoreEvent.php +++ b/src/Client/Model/DatastoreEvent.php @@ -118,22 +118,22 @@ class DatastoreEvent implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'acknowledged_at' => false, + 'acknowledged_at' => true, 'app_id' => false, 'created_at' => false, - 'data' => false, - 'deleted_at' => false, + 'data' => true, + 'deleted_at' => true, 'endpoint_metadata' => false, 'endpoints' => false, 'event_type' => false, - 'headers' => false, + 'headers' => true, 'idempotency_key' => false, 'is_duplicate_event' => false, 'metadata' => false, 'project_id' => false, 'raw' => false, 'source_id' => false, - 'source_metadata' => false, + 'source_metadata' => true, 'status' => false, 'uid' => false, 'updated_at' => false, @@ -450,7 +450,14 @@ public function getAcknowledgedAt() public function setAcknowledgedAt($acknowledged_at) { if (is_null($acknowledged_at)) { - throw new \InvalidArgumentException('non-nullable acknowledged_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'acknowledged_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('acknowledged_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['acknowledged_at'] = $acknowledged_at; @@ -531,7 +538,14 @@ public function getData() public function setData($data) { if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['data'] = $data; @@ -558,7 +572,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -666,7 +687,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -855,7 +883,14 @@ public function getSourceMetadata() public function setSourceMetadata($source_metadata) { if (is_null($source_metadata)) { - throw new \InvalidArgumentException('non-nullable source_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'source_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('source_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['source_metadata'] = $source_metadata; diff --git a/src/Client/Model/DatastoreEventDeliveryStatus.php b/src/Client/Model/DatastoreEventDeliveryStatus.php index eb72bea..6b64c1a 100644 --- a/src/Client/Model/DatastoreEventDeliveryStatus.php +++ b/src/Client/Model/DatastoreEventDeliveryStatus.php @@ -55,6 +55,8 @@ class DatastoreEventDeliveryStatus public const RETRY_EVENT_STATUS = 'Retry'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -67,7 +69,8 @@ public static function getAllowableEnumValues() self::DISCARDED_EVENT_STATUS, self::FAILURE_EVENT_STATUS, self::SUCCESS_EVENT_STATUS, - self::RETRY_EVENT_STATUS + self::RETRY_EVENT_STATUS, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreEventStatus.php b/src/Client/Model/DatastoreEventStatus.php index dd24c30..3359aa5 100644 --- a/src/Client/Model/DatastoreEventStatus.php +++ b/src/Client/Model/DatastoreEventStatus.php @@ -53,6 +53,8 @@ class DatastoreEventStatus public const PENDING_STATUS = 'Pending'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -64,7 +66,8 @@ public static function getAllowableEnumValues() self::FAILURE_STATUS, self::SUCCESS_STATUS, self::RETRY_STATUS, - self::PENDING_STATUS + self::PENDING_STATUS, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreFilterSchema.php b/src/Client/Model/DatastoreFilterSchema.php index 16c0cba..f59f937 100644 --- a/src/Client/Model/DatastoreFilterSchema.php +++ b/src/Client/Model/DatastoreFilterSchema.php @@ -86,11 +86,11 @@ class DatastoreFilterSchema implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static array $openAPINullables = [ - 'body' => false, - 'headers' => false, + 'body' => true, + 'headers' => true, 'is_flattened' => false, - 'path' => false, - 'query' => false + 'path' => true, + 'query' => true ]; /** @@ -338,7 +338,14 @@ public function getBody() public function setBody($body) { if (is_null($body)) { - throw new \InvalidArgumentException('non-nullable body cannot be null'); + array_push($this->openAPINullablesSetToNull, 'body'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['body'] = $body; @@ -365,7 +372,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -419,7 +433,14 @@ public function getPath() public function setPath($path) { if (is_null($path)) { - throw new \InvalidArgumentException('non-nullable path cannot be null'); + array_push($this->openAPINullablesSetToNull, 'path'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('path', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['path'] = $path; @@ -446,7 +467,14 @@ public function getQuery() public function setQuery($query) { if (is_null($query)) { - throw new \InvalidArgumentException('non-nullable query cannot be null'); + array_push($this->openAPINullablesSetToNull, 'query'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('query', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['query'] = $query; diff --git a/src/Client/Model/DatastoreKafkaPubSubConfig.php b/src/Client/Model/DatastoreKafkaPubSubConfig.php index 3a1396e..7746810 100644 --- a/src/Client/Model/DatastoreKafkaPubSubConfig.php +++ b/src/Client/Model/DatastoreKafkaPubSubConfig.php @@ -84,7 +84,7 @@ class DatastoreKafkaPubSubConfig implements ModelInterface, ArrayAccess, \JsonSe * @var boolean[] */ protected static array $openAPINullables = [ - 'auth' => false, + 'auth' => true, 'brokers' => false, 'consumer_group_id' => false, 'topic_name' => false @@ -331,7 +331,14 @@ public function getAuth() public function setAuth($auth) { if (is_null($auth)) { - throw new \InvalidArgumentException('non-nullable auth cannot be null'); + array_push($this->openAPINullablesSetToNull, 'auth'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('auth', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['auth'] = $auth; diff --git a/src/Client/Model/DatastoreMetaEventAttempt.php b/src/Client/Model/DatastoreMetaEventAttempt.php index a21e940..962043b 100644 --- a/src/Client/Model/DatastoreMetaEventAttempt.php +++ b/src/Client/Model/DatastoreMetaEventAttempt.php @@ -82,9 +82,9 @@ class DatastoreMetaEventAttempt implements ModelInterface, ArrayAccess, \JsonSer * @var boolean[] */ protected static array $openAPINullables = [ - 'request_http_header' => false, + 'request_http_header' => true, 'response_data' => false, - 'response_http_header' => false + 'response_http_header' => true ]; /** @@ -324,7 +324,14 @@ public function getRequestHttpHeader() public function setRequestHttpHeader($request_http_header) { if (is_null($request_http_header)) { - throw new \InvalidArgumentException('non-nullable request_http_header cannot be null'); + array_push($this->openAPINullablesSetToNull, 'request_http_header'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('request_http_header', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['request_http_header'] = $request_http_header; @@ -378,7 +385,14 @@ public function getResponseHttpHeader() public function setResponseHttpHeader($response_http_header) { if (is_null($response_http_header)) { - throw new \InvalidArgumentException('non-nullable response_http_header cannot be null'); + array_push($this->openAPINullablesSetToNull, 'response_http_header'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('response_http_header', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['response_http_header'] = $response_http_header; diff --git a/src/Client/Model/DatastoreMetaEventConfiguration.php b/src/Client/Model/DatastoreMetaEventConfiguration.php index ccd0a0e..a382a70 100644 --- a/src/Client/Model/DatastoreMetaEventConfiguration.php +++ b/src/Client/Model/DatastoreMetaEventConfiguration.php @@ -90,7 +90,7 @@ class DatastoreMetaEventConfiguration implements ModelInterface, ArrayAccess, \J protected static array $openAPINullables = [ 'event_type' => false, 'is_enabled' => false, - 'pub_sub' => false, + 'pub_sub' => true, 'secret' => false, 'type' => false, 'url' => false @@ -399,7 +399,14 @@ public function getPubSub() public function setPubSub($pub_sub) { if (is_null($pub_sub)) { - throw new \InvalidArgumentException('non-nullable pub_sub cannot be null'); + array_push($this->openAPINullablesSetToNull, 'pub_sub'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pub_sub', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['pub_sub'] = $pub_sub; diff --git a/src/Client/Model/DatastoreMetaEventType.php b/src/Client/Model/DatastoreMetaEventType.php index b63e651..5e7f780 100644 --- a/src/Client/Model/DatastoreMetaEventType.php +++ b/src/Client/Model/DatastoreMetaEventType.php @@ -47,6 +47,8 @@ class DatastoreMetaEventType public const PUB_SUB_META_EVENT = 'pub_sub'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,8 @@ public static function getAllowableEnumValues() { return [ self::HTTP_META_EVENT, - self::PUB_SUB_META_EVENT + self::PUB_SUB_META_EVENT, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreMetadata.php b/src/Client/Model/DatastoreMetadata.php index fa5bbab..f5bc20a 100644 --- a/src/Client/Model/DatastoreMetadata.php +++ b/src/Client/Model/DatastoreMetadata.php @@ -92,7 +92,7 @@ class DatastoreMetadata implements ModelInterface, ArrayAccess, \JsonSerializabl * @var boolean[] */ protected static array $openAPINullables = [ - 'data' => false, + 'data' => true, 'interval_seconds' => false, 'max_retry_seconds' => false, 'next_send_time' => false, @@ -359,7 +359,14 @@ public function getData() public function setData($data) { if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['data'] = $data; diff --git a/src/Client/Model/DatastoreOAuth2.php b/src/Client/Model/DatastoreOAuth2.php index d7c49a1..f90a3c8 100644 --- a/src/Client/Model/DatastoreOAuth2.php +++ b/src/Client/Model/DatastoreOAuth2.php @@ -107,12 +107,12 @@ class DatastoreOAuth2 implements ModelInterface, ArrayAccess, \JsonSerializable 'client_id' => false, 'client_secret' => false, 'expiry_time_unit' => false, - 'field_mapping' => false, + 'field_mapping' => true, 'grant_type' => false, 'issuer' => false, 'scope' => false, 'signing_algorithm' => false, - 'signing_key' => false, + 'signing_key' => true, 'subject' => false, 'url' => false ]; @@ -529,7 +529,14 @@ public function getFieldMapping() public function setFieldMapping($field_mapping) { if (is_null($field_mapping)) { - throw new \InvalidArgumentException('non-nullable field_mapping cannot be null'); + array_push($this->openAPINullablesSetToNull, 'field_mapping'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('field_mapping', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['field_mapping'] = $field_mapping; @@ -664,7 +671,14 @@ public function getSigningKey() public function setSigningKey($signing_key) { if (is_null($signing_key)) { - throw new \InvalidArgumentException('non-nullable signing_key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'signing_key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('signing_key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['signing_key'] = $signing_key; diff --git a/src/Client/Model/DatastoreOAuth2AuthenticationType.php b/src/Client/Model/DatastoreOAuth2AuthenticationType.php index 9f87c62..5e8a4ab 100644 --- a/src/Client/Model/DatastoreOAuth2AuthenticationType.php +++ b/src/Client/Model/DatastoreOAuth2AuthenticationType.php @@ -47,6 +47,8 @@ class DatastoreOAuth2AuthenticationType public const CLIENT_ASSERTION_AUTH = 'client_assertion'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,8 @@ public static function getAllowableEnumValues() { return [ self::SHARED_SECRET_AUTH, - self::CLIENT_ASSERTION_AUTH + self::CLIENT_ASSERTION_AUTH, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreOAuth2ExpiryTimeUnit.php b/src/Client/Model/DatastoreOAuth2ExpiryTimeUnit.php index 87d2bdf..f5e60e1 100644 --- a/src/Client/Model/DatastoreOAuth2ExpiryTimeUnit.php +++ b/src/Client/Model/DatastoreOAuth2ExpiryTimeUnit.php @@ -51,6 +51,8 @@ class DatastoreOAuth2ExpiryTimeUnit public const EXPIRY_TIME_UNIT_HOURS = 'hours'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -61,7 +63,8 @@ public static function getAllowableEnumValues() self::EXPIRY_TIME_UNIT_SECONDS, self::EXPIRY_TIME_UNIT_MILLISECONDS, self::EXPIRY_TIME_UNIT_MINUTES, - self::EXPIRY_TIME_UNIT_HOURS + self::EXPIRY_TIME_UNIT_HOURS, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastorePageDirection.php b/src/Client/Model/DatastorePageDirection.php index 30e869e..22a6e36 100644 --- a/src/Client/Model/DatastorePageDirection.php +++ b/src/Client/Model/DatastorePageDirection.php @@ -47,6 +47,8 @@ class DatastorePageDirection public const PREV = 'prev'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,8 @@ public static function getAllowableEnumValues() { return [ self::NEXT, - self::PREV + self::PREV, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastorePortalAuthType.php b/src/Client/Model/DatastorePortalAuthType.php index c7c4f73..fe854b6 100644 --- a/src/Client/Model/DatastorePortalAuthType.php +++ b/src/Client/Model/DatastorePortalAuthType.php @@ -47,6 +47,8 @@ class DatastorePortalAuthType public const PORTAL_AUTH_TYPE_STATIC_TOKEN = 'static_token'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,8 @@ public static function getAllowableEnumValues() { return [ self::PORTAL_AUTH_TYPE_REFRESH_TOKEN, - self::PORTAL_AUTH_TYPE_STATIC_TOKEN + self::PORTAL_AUTH_TYPE_STATIC_TOKEN, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastorePortalLinkResponse.php b/src/Client/Model/DatastorePortalLinkResponse.php index 3716ad4..fdd8755 100644 --- a/src/Client/Model/DatastorePortalLinkResponse.php +++ b/src/Client/Model/DatastorePortalLinkResponse.php @@ -110,7 +110,7 @@ class DatastorePortalLinkResponse implements ModelInterface, ArrayAccess, \JsonS 'auth_type' => false, 'can_manage_endpoint' => false, 'created_at' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'endpoint_count' => false, 'endpoints' => false, 'endpoints_metadata' => false, @@ -516,7 +516,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; diff --git a/src/Client/Model/DatastoreProjectConfig.php b/src/Client/Model/DatastoreProjectConfig.php index 52c2b82..5dc14fc 100644 --- a/src/Client/Model/DatastoreProjectConfig.php +++ b/src/Client/Model/DatastoreProjectConfig.php @@ -103,18 +103,18 @@ class DatastoreProjectConfig implements ModelInterface, ArrayAccess, \JsonSerial */ protected static array $openAPINullables = [ 'add_event_id_trace_headers' => false, - 'circuit_breaker' => false, + 'circuit_breaker' => true, 'disable_endpoint' => false, 'max_payload_read_size' => false, - 'meta_event' => false, + 'meta_event' => true, 'multiple_endpoint_subscriptions' => false, - 'ratelimit' => false, + 'ratelimit' => true, 'replay_attacks_prevention_enabled' => false, 'request_id_header' => false, 'search_policy' => false, - 'signature' => false, - 'ssl' => false, - 'strategy' => false + 'signature' => true, + 'ssl' => true, + 'strategy' => true ]; /** @@ -421,7 +421,14 @@ public function getCircuitBreaker() public function setCircuitBreaker($circuit_breaker) { if (is_null($circuit_breaker)) { - throw new \InvalidArgumentException('non-nullable circuit_breaker cannot be null'); + array_push($this->openAPINullablesSetToNull, 'circuit_breaker'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('circuit_breaker', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['circuit_breaker'] = $circuit_breaker; @@ -502,7 +509,14 @@ public function getMetaEvent() public function setMetaEvent($meta_event) { if (is_null($meta_event)) { - throw new \InvalidArgumentException('non-nullable meta_event cannot be null'); + array_push($this->openAPINullablesSetToNull, 'meta_event'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('meta_event', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['meta_event'] = $meta_event; @@ -556,7 +570,14 @@ public function getRatelimit() public function setRatelimit($ratelimit) { if (is_null($ratelimit)) { - throw new \InvalidArgumentException('non-nullable ratelimit cannot be null'); + array_push($this->openAPINullablesSetToNull, 'ratelimit'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('ratelimit', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['ratelimit'] = $ratelimit; @@ -664,7 +685,14 @@ public function getSignature() public function setSignature($signature) { if (is_null($signature)) { - throw new \InvalidArgumentException('non-nullable signature cannot be null'); + array_push($this->openAPINullablesSetToNull, 'signature'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('signature', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['signature'] = $signature; @@ -691,7 +719,14 @@ public function getSsl() public function setSsl($ssl) { if (is_null($ssl)) { - throw new \InvalidArgumentException('non-nullable ssl cannot be null'); + array_push($this->openAPINullablesSetToNull, 'ssl'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('ssl', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['ssl'] = $ssl; @@ -718,7 +753,14 @@ public function getStrategy() public function setStrategy($strategy) { if (is_null($strategy)) { - throw new \InvalidArgumentException('non-nullable strategy cannot be null'); + array_push($this->openAPINullablesSetToNull, 'strategy'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('strategy', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['strategy'] = $strategy; diff --git a/src/Client/Model/DatastoreProjectType.php b/src/Client/Model/DatastoreProjectType.php index 03a854c..f452757 100644 --- a/src/Client/Model/DatastoreProjectType.php +++ b/src/Client/Model/DatastoreProjectType.php @@ -47,6 +47,8 @@ class DatastoreProjectType public const INCOMING_PROJECT = 'incoming'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,8 @@ public static function getAllowableEnumValues() { return [ self::OUTGOING_PROJECT, - self::INCOMING_PROJECT + self::INCOMING_PROJECT, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreProviderConfig.php b/src/Client/Model/DatastoreProviderConfig.php index 4258612..9f6ba5d 100644 --- a/src/Client/Model/DatastoreProviderConfig.php +++ b/src/Client/Model/DatastoreProviderConfig.php @@ -78,7 +78,7 @@ class DatastoreProviderConfig implements ModelInterface, ArrayAccess, \JsonSeria * @var boolean[] */ protected static array $openAPINullables = [ - 'twitter' => false + 'twitter' => true ]; /** @@ -310,7 +310,14 @@ public function getTwitter() public function setTwitter($twitter) { if (is_null($twitter)) { - throw new \InvalidArgumentException('non-nullable twitter cannot be null'); + array_push($this->openAPINullablesSetToNull, 'twitter'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('twitter', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['twitter'] = $twitter; diff --git a/src/Client/Model/DatastorePubSubConfig.php b/src/Client/Model/DatastorePubSubConfig.php index 71e8246..991b8ff 100644 --- a/src/Client/Model/DatastorePubSubConfig.php +++ b/src/Client/Model/DatastorePubSubConfig.php @@ -88,10 +88,10 @@ class DatastorePubSubConfig implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static array $openAPINullables = [ - 'amqp' => false, - 'google' => false, - 'kafka' => false, - 'sqs' => false, + 'amqp' => true, + 'google' => true, + 'kafka' => true, + 'sqs' => true, 'type' => false, 'workers' => false ]; @@ -345,7 +345,14 @@ public function getAmqp() public function setAmqp($amqp) { if (is_null($amqp)) { - throw new \InvalidArgumentException('non-nullable amqp cannot be null'); + array_push($this->openAPINullablesSetToNull, 'amqp'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('amqp', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['amqp'] = $amqp; @@ -372,7 +379,14 @@ public function getGoogle() public function setGoogle($google) { if (is_null($google)) { - throw new \InvalidArgumentException('non-nullable google cannot be null'); + array_push($this->openAPINullablesSetToNull, 'google'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('google', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['google'] = $google; @@ -399,7 +413,14 @@ public function getKafka() public function setKafka($kafka) { if (is_null($kafka)) { - throw new \InvalidArgumentException('non-nullable kafka cannot be null'); + array_push($this->openAPINullablesSetToNull, 'kafka'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('kafka', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['kafka'] = $kafka; @@ -426,7 +447,14 @@ public function getSqs() public function setSqs($sqs) { if (is_null($sqs)) { - throw new \InvalidArgumentException('non-nullable sqs cannot be null'); + array_push($this->openAPINullablesSetToNull, 'sqs'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('sqs', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['sqs'] = $sqs; diff --git a/src/Client/Model/DatastorePubSubType.php b/src/Client/Model/DatastorePubSubType.php index f61abb9..8017012 100644 --- a/src/Client/Model/DatastorePubSubType.php +++ b/src/Client/Model/DatastorePubSubType.php @@ -51,6 +51,8 @@ class DatastorePubSubType public const AMQP_PUB_SUB = 'amqp'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -61,7 +63,8 @@ public static function getAllowableEnumValues() self::SQS_PUB_SUB, self::GOOGLE_PUB_SUB, self::KAFKA_PUB_SUB, - self::AMQP_PUB_SUB + self::AMQP_PUB_SUB, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreSecret.php b/src/Client/Model/DatastoreSecret.php index a8f5db4..d713476 100644 --- a/src/Client/Model/DatastoreSecret.php +++ b/src/Client/Model/DatastoreSecret.php @@ -89,8 +89,8 @@ class DatastoreSecret implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'created_at' => false, - 'deleted_at' => false, - 'expires_at' => false, + 'deleted_at' => true, + 'expires_at' => true, 'uid' => false, 'updated_at' => false, 'value' => false @@ -372,7 +372,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -399,7 +406,14 @@ public function getExpiresAt() public function setExpiresAt($expires_at) { if (is_null($expires_at)) { - throw new \InvalidArgumentException('non-nullable expires_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'expires_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('expires_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['expires_at'] = $expires_at; diff --git a/src/Client/Model/DatastoreSource.php b/src/Client/Model/DatastoreSource.php index bba8f61..79a5d11 100644 --- a/src/Client/Model/DatastoreSource.php +++ b/src/Client/Model/DatastoreSource.php @@ -116,26 +116,26 @@ class DatastoreSource implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'body_function' => false, + 'body_function' => true, 'created_at' => false, 'custom_response' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'event_type_location' => false, 'forward_headers' => false, - 'header_function' => false, + 'header_function' => true, 'idempotency_keys' => false, 'is_disabled' => false, 'mask_id' => false, 'name' => false, 'project_id' => false, 'provider' => false, - 'provider_config' => false, - 'pub_sub' => false, + 'provider_config' => true, + 'pub_sub' => true, 'type' => false, 'uid' => false, 'updated_at' => false, 'url' => false, - 'verifier' => false + 'verifier' => true ]; /** @@ -443,7 +443,14 @@ public function getBodyFunction() public function setBodyFunction($body_function) { if (is_null($body_function)) { - throw new \InvalidArgumentException('non-nullable body_function cannot be null'); + array_push($this->openAPINullablesSetToNull, 'body_function'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body_function', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['body_function'] = $body_function; @@ -524,7 +531,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -605,7 +619,14 @@ public function getHeaderFunction() public function setHeaderFunction($header_function) { if (is_null($header_function)) { - throw new \InvalidArgumentException('non-nullable header_function cannot be null'); + array_push($this->openAPINullablesSetToNull, 'header_function'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('header_function', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['header_function'] = $header_function; @@ -794,7 +815,14 @@ public function getProviderConfig() public function setProviderConfig($provider_config) { if (is_null($provider_config)) { - throw new \InvalidArgumentException('non-nullable provider_config cannot be null'); + array_push($this->openAPINullablesSetToNull, 'provider_config'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('provider_config', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['provider_config'] = $provider_config; @@ -821,7 +849,14 @@ public function getPubSub() public function setPubSub($pub_sub) { if (is_null($pub_sub)) { - throw new \InvalidArgumentException('non-nullable pub_sub cannot be null'); + array_push($this->openAPINullablesSetToNull, 'pub_sub'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pub_sub', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['pub_sub'] = $pub_sub; @@ -956,7 +991,14 @@ public function getVerifier() public function setVerifier($verifier) { if (is_null($verifier)) { - throw new \InvalidArgumentException('non-nullable verifier cannot be null'); + array_push($this->openAPINullablesSetToNull, 'verifier'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('verifier', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['verifier'] = $verifier; diff --git a/src/Client/Model/DatastoreSourceProvider.php b/src/Client/Model/DatastoreSourceProvider.php index c2fa9ff..abbd27e 100644 --- a/src/Client/Model/DatastoreSourceProvider.php +++ b/src/Client/Model/DatastoreSourceProvider.php @@ -49,6 +49,8 @@ class DatastoreSourceProvider public const SHOPIFY_SOURCE_PROVIDER = 'shopify'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -58,7 +60,8 @@ public static function getAllowableEnumValues() return [ self::GITHUB_SOURCE_PROVIDER, self::TWITTER_SOURCE_PROVIDER, - self::SHOPIFY_SOURCE_PROVIDER + self::SHOPIFY_SOURCE_PROVIDER, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreSourceType.php b/src/Client/Model/DatastoreSourceType.php index 00a2858..b386274 100644 --- a/src/Client/Model/DatastoreSourceType.php +++ b/src/Client/Model/DatastoreSourceType.php @@ -51,6 +51,8 @@ class DatastoreSourceType public const DB_CHANGE_STREAM = 'db_change_stream'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -61,7 +63,8 @@ public static function getAllowableEnumValues() self::HTTP_SOURCE, self::REST_API_SOURCE, self::PUB_SUB_SOURCE, - self::DB_CHANGE_STREAM + self::DB_CHANGE_STREAM, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreStrategyProvider.php b/src/Client/Model/DatastoreStrategyProvider.php index a81aba6..76aa6fe 100644 --- a/src/Client/Model/DatastoreStrategyProvider.php +++ b/src/Client/Model/DatastoreStrategyProvider.php @@ -47,6 +47,8 @@ class DatastoreStrategyProvider public const EXPONENTIAL_STRATEGY_PROVIDER = 'exponential'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,8 @@ public static function getAllowableEnumValues() { return [ self::LINEAR_STRATEGY_PROVIDER, - self::EXPONENTIAL_STRATEGY_PROVIDER + self::EXPONENTIAL_STRATEGY_PROVIDER, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreSubscriptionType.php b/src/Client/Model/DatastoreSubscriptionType.php index 7c85805..53e0eaf 100644 --- a/src/Client/Model/DatastoreSubscriptionType.php +++ b/src/Client/Model/DatastoreSubscriptionType.php @@ -47,6 +47,8 @@ class DatastoreSubscriptionType public const SUBSCRIPTION_TYPE_API = 'api'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -55,7 +57,8 @@ public static function getAllowableEnumValues() { return [ self::SUBSCRIPTION_TYPE_CLI, - self::SUBSCRIPTION_TYPE_API + self::SUBSCRIPTION_TYPE_API, + self::EMPTY ]; } } diff --git a/src/Client/Model/DatastoreTwitterProviderConfig.php b/src/Client/Model/DatastoreTwitterProviderConfig.php index a49fb9b..96a55ad 100644 --- a/src/Client/Model/DatastoreTwitterProviderConfig.php +++ b/src/Client/Model/DatastoreTwitterProviderConfig.php @@ -78,7 +78,7 @@ class DatastoreTwitterProviderConfig implements ModelInterface, ArrayAccess, \Js * @var boolean[] */ protected static array $openAPINullables = [ - 'crc_verified_at' => false + 'crc_verified_at' => true ]; /** @@ -310,7 +310,14 @@ public function getCrcVerifiedAt() public function setCrcVerifiedAt($crc_verified_at) { if (is_null($crc_verified_at)) { - throw new \InvalidArgumentException('non-nullable crc_verified_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'crc_verified_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('crc_verified_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['crc_verified_at'] = $crc_verified_at; diff --git a/src/Client/Model/DatastoreVerifierConfig.php b/src/Client/Model/DatastoreVerifierConfig.php index 1d0c3e5..74d670a 100644 --- a/src/Client/Model/DatastoreVerifierConfig.php +++ b/src/Client/Model/DatastoreVerifierConfig.php @@ -84,9 +84,9 @@ class DatastoreVerifierConfig implements ModelInterface, ArrayAccess, \JsonSeria * @var boolean[] */ protected static array $openAPINullables = [ - 'api_key' => false, - 'basic_auth' => false, - 'hmac' => false, + 'api_key' => true, + 'basic_auth' => true, + 'hmac' => true, 'type' => false ]; @@ -331,7 +331,14 @@ public function getApiKey() public function setApiKey($api_key) { if (is_null($api_key)) { - throw new \InvalidArgumentException('non-nullable api_key cannot be null'); + array_push($this->openAPINullablesSetToNull, 'api_key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('api_key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['api_key'] = $api_key; @@ -358,7 +365,14 @@ public function getBasicAuth() public function setBasicAuth($basic_auth) { if (is_null($basic_auth)) { - throw new \InvalidArgumentException('non-nullable basic_auth cannot be null'); + array_push($this->openAPINullablesSetToNull, 'basic_auth'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('basic_auth', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['basic_auth'] = $basic_auth; @@ -385,7 +399,14 @@ public function getHmac() public function setHmac($hmac) { if (is_null($hmac)) { - throw new \InvalidArgumentException('non-nullable hmac cannot be null'); + array_push($this->openAPINullablesSetToNull, 'hmac'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('hmac', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['hmac'] = $hmac; diff --git a/src/Client/Model/DatastoreVerifierType.php b/src/Client/Model/DatastoreVerifierType.php index 8f7fb3b..b4d92a8 100644 --- a/src/Client/Model/DatastoreVerifierType.php +++ b/src/Client/Model/DatastoreVerifierType.php @@ -51,6 +51,8 @@ class DatastoreVerifierType public const API_KEY_VERIFIER = 'api_key'; + public const EMPTY = ''; + /** * Gets allowable values of the enum * @return string[] @@ -61,7 +63,8 @@ public static function getAllowableEnumValues() self::NOOP_VERIFIER, self::H_MAC_VERIFIER, self::BASIC_AUTH_VERIFIER, - self::API_KEY_VERIFIER + self::API_KEY_VERIFIER, + self::EMPTY ]; } } diff --git a/src/Client/Model/GetProjects400Response.php b/src/Client/Model/GetProjects400Response.php index 2c10f8c..6ed6aac 100644 --- a/src/Client/Model/GetProjects400Response.php +++ b/src/Client/Model/GetProjects400Response.php @@ -60,7 +60,7 @@ class GetProjects400Response implements ModelInterface, ArrayAccess, \JsonSerial protected static $openAPITypes = [ 'message' => 'string', 'status' => 'bool', - 'data' => 'object' + 'data' => 'array' ]; /** @@ -84,7 +84,7 @@ class GetProjects400Response implements ModelInterface, ArrayAccess, \JsonSerial protected static array $openAPINullables = [ 'message' => false, 'status' => false, - 'data' => false + 'data' => true ]; /** @@ -361,7 +361,7 @@ public function setStatus($status) /** * Gets data * - * @return object|null + * @return array|null */ public function getData() { @@ -371,14 +371,21 @@ public function getData() /** * Sets data * - * @param object|null $data data + * @param array|null $data data * * @return self */ public function setData($data) { if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['data'] = $data; diff --git a/src/Client/Model/ModelsBroadcastEvent.php b/src/Client/Model/ModelsBroadcastEvent.php index 9e6bb3e..89d45bc 100644 --- a/src/Client/Model/ModelsBroadcastEvent.php +++ b/src/Client/Model/ModelsBroadcastEvent.php @@ -87,8 +87,8 @@ class ModelsBroadcastEvent implements ModelInterface, ArrayAccess, \JsonSerializ */ protected static array $openAPINullables = [ 'acknowledged_at' => false, - 'custom_headers' => false, - 'data' => false, + 'custom_headers' => true, + 'data' => true, 'event_type' => false, 'idempotency_key' => false ]; @@ -365,7 +365,14 @@ public function getCustomHeaders() public function setCustomHeaders($custom_headers) { if (is_null($custom_headers)) { - throw new \InvalidArgumentException('non-nullable custom_headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'custom_headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('custom_headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['custom_headers'] = $custom_headers; @@ -392,7 +399,14 @@ public function getData() public function setData($data) { if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['data'] = $data; diff --git a/src/Client/Model/ModelsBulkUpdateFilterRequest.php b/src/Client/Model/ModelsBulkUpdateFilterRequest.php index 3727604..1a7af01 100644 --- a/src/Client/Model/ModelsBulkUpdateFilterRequest.php +++ b/src/Client/Model/ModelsBulkUpdateFilterRequest.php @@ -90,12 +90,12 @@ class ModelsBulkUpdateFilterRequest implements ModelInterface, ArrayAccess, \Jso * @var boolean[] */ protected static array $openAPINullables = [ - 'body' => false, + 'body' => true, 'enabled_at' => false, 'event_type' => false, - 'headers' => false, - 'path' => false, - 'query' => false, + 'headers' => true, + 'path' => true, + 'query' => true, 'uid' => false ]; @@ -355,7 +355,14 @@ public function getBody() public function setBody($body) { if (is_null($body)) { - throw new \InvalidArgumentException('non-nullable body cannot be null'); + array_push($this->openAPINullablesSetToNull, 'body'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['body'] = $body; @@ -436,7 +443,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -463,7 +477,14 @@ public function getPath() public function setPath($path) { if (is_null($path)) { - throw new \InvalidArgumentException('non-nullable path cannot be null'); + array_push($this->openAPINullablesSetToNull, 'path'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('path', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['path'] = $path; @@ -490,7 +511,14 @@ public function getQuery() public function setQuery($query) { if (is_null($query)) { - throw new \InvalidArgumentException('non-nullable query cannot be null'); + array_push($this->openAPINullablesSetToNull, 'query'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('query', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['query'] = $query; diff --git a/src/Client/Model/ModelsCreateEvent.php b/src/Client/Model/ModelsCreateEvent.php index 93cc605..815b79a 100644 --- a/src/Client/Model/ModelsCreateEvent.php +++ b/src/Client/Model/ModelsCreateEvent.php @@ -89,8 +89,8 @@ class ModelsCreateEvent implements ModelInterface, ArrayAccess, \JsonSerializabl */ protected static array $openAPINullables = [ 'app_id' => false, - 'custom_headers' => false, - 'data' => false, + 'custom_headers' => true, + 'data' => true, 'endpoint_id' => false, 'event_type' => false, 'idempotency_key' => false @@ -372,7 +372,14 @@ public function getCustomHeaders() public function setCustomHeaders($custom_headers) { if (is_null($custom_headers)) { - throw new \InvalidArgumentException('non-nullable custom_headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'custom_headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('custom_headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['custom_headers'] = $custom_headers; @@ -399,7 +406,14 @@ public function getData() public function setData($data) { if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['data'] = $data; diff --git a/src/Client/Model/ModelsCreateEventType.php b/src/Client/Model/ModelsCreateEventType.php index b451099..cd8be01 100644 --- a/src/Client/Model/ModelsCreateEventType.php +++ b/src/Client/Model/ModelsCreateEventType.php @@ -86,7 +86,7 @@ class ModelsCreateEventType implements ModelInterface, ArrayAccess, \JsonSeriali protected static array $openAPINullables = [ 'category' => false, 'description' => false, - 'json_schema' => false, + 'json_schema' => true, 'name' => false ]; @@ -385,7 +385,14 @@ public function getJsonSchema() public function setJsonSchema($json_schema) { if (is_null($json_schema)) { - throw new \InvalidArgumentException('non-nullable json_schema cannot be null'); + array_push($this->openAPINullablesSetToNull, 'json_schema'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('json_schema', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['json_schema'] = $json_schema; diff --git a/src/Client/Model/ModelsCreateFilterRequest.php b/src/Client/Model/ModelsCreateFilterRequest.php index 5baa449..3f60931 100644 --- a/src/Client/Model/ModelsCreateFilterRequest.php +++ b/src/Client/Model/ModelsCreateFilterRequest.php @@ -88,12 +88,12 @@ class ModelsCreateFilterRequest implements ModelInterface, ArrayAccess, \JsonSer * @var boolean[] */ protected static array $openAPINullables = [ - 'body' => false, + 'body' => true, 'enabled_at' => false, 'event_type' => false, - 'headers' => false, - 'path' => false, - 'query' => false + 'headers' => true, + 'path' => true, + 'query' => true ]; /** @@ -348,7 +348,14 @@ public function getBody() public function setBody($body) { if (is_null($body)) { - throw new \InvalidArgumentException('non-nullable body cannot be null'); + array_push($this->openAPINullablesSetToNull, 'body'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['body'] = $body; @@ -429,7 +436,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -456,7 +470,14 @@ public function getPath() public function setPath($path) { if (is_null($path)) { - throw new \InvalidArgumentException('non-nullable path cannot be null'); + array_push($this->openAPINullablesSetToNull, 'path'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('path', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['path'] = $path; @@ -483,7 +504,14 @@ public function getQuery() public function setQuery($query) { if (is_null($query)) { - throw new \InvalidArgumentException('non-nullable query cannot be null'); + array_push($this->openAPINullablesSetToNull, 'query'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('query', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['query'] = $query; diff --git a/src/Client/Model/ModelsDynamicEvent.php b/src/Client/Model/ModelsDynamicEvent.php index 36f9ea2..2510e18 100644 --- a/src/Client/Model/ModelsDynamicEvent.php +++ b/src/Client/Model/ModelsDynamicEvent.php @@ -90,8 +90,8 @@ class ModelsDynamicEvent implements ModelInterface, ArrayAccess, \JsonSerializab * @var boolean[] */ protected static array $openAPINullables = [ - 'custom_headers' => false, - 'data' => false, + 'custom_headers' => true, + 'data' => true, 'event_type' => false, 'event_types' => false, 'idempotency_key' => false, @@ -352,7 +352,14 @@ public function getCustomHeaders() public function setCustomHeaders($custom_headers) { if (is_null($custom_headers)) { - throw new \InvalidArgumentException('non-nullable custom_headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'custom_headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('custom_headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['custom_headers'] = $custom_headers; @@ -379,7 +386,14 @@ public function getData() public function setData($data) { if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['data'] = $data; diff --git a/src/Client/Model/ModelsEndpointResponse.php b/src/Client/Model/ModelsEndpointResponse.php index 0c56242..792d75c 100644 --- a/src/Client/Model/ModelsEndpointResponse.php +++ b/src/Client/Model/ModelsEndpointResponse.php @@ -131,28 +131,28 @@ class ModelsEndpointResponse implements ModelInterface, ArrayAccess, \JsonSerial */ protected static array $openAPINullables = [ 'advanced_signatures' => false, - 'authentication' => false, - 'cb_state' => false, + 'authentication' => true, + 'cb_state' => true, 'content_type' => false, 'created_at' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'description' => false, 'events' => false, - 'failure_count' => false, - 'failure_rate' => false, + 'failure_count' => true, + 'failure_rate' => true, 'http_timeout' => false, - 'mtls_client_cert' => false, + 'mtls_client_cert' => true, 'name' => false, 'owner_id' => false, - 'period_failure_rate' => false, + 'period_failure_rate' => true, 'project_id' => false, 'rate_limit' => false, 'rate_limit_duration' => false, - 'retry_count' => false, + 'retry_count' => true, 'secrets' => false, 'slack_webhook_url' => false, 'status' => false, - 'success_count' => false, + 'success_count' => true, 'support_email' => false, 'uid' => false, 'updated_at' => false, @@ -519,7 +519,14 @@ public function getAuthentication() public function setAuthentication($authentication) { if (is_null($authentication)) { - throw new \InvalidArgumentException('non-nullable authentication cannot be null'); + array_push($this->openAPINullablesSetToNull, 'authentication'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('authentication', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['authentication'] = $authentication; @@ -546,7 +553,14 @@ public function getCbState() public function setCbState($cb_state) { if (is_null($cb_state)) { - throw new \InvalidArgumentException('non-nullable cb_state cannot be null'); + array_push($this->openAPINullablesSetToNull, 'cb_state'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cb_state', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['cb_state'] = $cb_state; @@ -627,7 +641,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -708,7 +729,14 @@ public function getFailureCount() public function setFailureCount($failure_count) { if (is_null($failure_count)) { - throw new \InvalidArgumentException('non-nullable failure_count cannot be null'); + array_push($this->openAPINullablesSetToNull, 'failure_count'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('failure_count', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['failure_count'] = $failure_count; @@ -735,7 +763,14 @@ public function getFailureRate() public function setFailureRate($failure_rate) { if (is_null($failure_rate)) { - throw new \InvalidArgumentException('non-nullable failure_rate cannot be null'); + array_push($this->openAPINullablesSetToNull, 'failure_rate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('failure_rate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['failure_rate'] = $failure_rate; @@ -789,7 +824,14 @@ public function getMtlsClientCert() public function setMtlsClientCert($mtls_client_cert) { if (is_null($mtls_client_cert)) { - throw new \InvalidArgumentException('non-nullable mtls_client_cert cannot be null'); + array_push($this->openAPINullablesSetToNull, 'mtls_client_cert'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('mtls_client_cert', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['mtls_client_cert'] = $mtls_client_cert; @@ -870,7 +912,14 @@ public function getPeriodFailureRate() public function setPeriodFailureRate($period_failure_rate) { if (is_null($period_failure_rate)) { - throw new \InvalidArgumentException('non-nullable period_failure_rate cannot be null'); + array_push($this->openAPINullablesSetToNull, 'period_failure_rate'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('period_failure_rate', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['period_failure_rate'] = $period_failure_rate; @@ -978,7 +1027,14 @@ public function getRetryCount() public function setRetryCount($retry_count) { if (is_null($retry_count)) { - throw new \InvalidArgumentException('non-nullable retry_count cannot be null'); + array_push($this->openAPINullablesSetToNull, 'retry_count'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('retry_count', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['retry_count'] = $retry_count; @@ -1086,7 +1142,14 @@ public function getSuccessCount() public function setSuccessCount($success_count) { if (is_null($success_count)) { - throw new \InvalidArgumentException('non-nullable success_count cannot be null'); + array_push($this->openAPINullablesSetToNull, 'success_count'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('success_count', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['success_count'] = $success_count; diff --git a/src/Client/Model/ModelsEventDeliveryResponse.php b/src/Client/Model/ModelsEventDeliveryResponse.php index 80f8aec..38b8ce5 100644 --- a/src/Client/Model/ModelsEventDeliveryResponse.php +++ b/src/Client/Model/ModelsEventDeliveryResponse.php @@ -128,26 +128,26 @@ class ModelsEventDeliveryResponse implements ModelInterface, ArrayAccess, \JsonS * @var boolean[] */ protected static array $openAPINullables = [ - 'acknowledged_at' => false, - 'cli_metadata' => false, + 'acknowledged_at' => true, + 'cli_metadata' => true, 'created_at' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'delivery_mode' => false, 'description' => false, 'device_id' => false, - 'device_metadata' => false, + 'device_metadata' => true, 'endpoint_id' => false, - 'endpoint_metadata' => false, + 'endpoint_metadata' => true, 'event_id' => false, - 'event_metadata' => false, + 'event_metadata' => true, 'event_type' => false, - 'headers' => false, + 'headers' => true, 'idempotency_key' => false, 'latency' => false, 'latency_seconds' => false, - 'metadata' => false, + 'metadata' => true, 'project_id' => false, - 'source_metadata' => false, + 'source_metadata' => true, 'status' => false, 'subscription_id' => false, 'target_url' => false, @@ -485,7 +485,14 @@ public function getAcknowledgedAt() public function setAcknowledgedAt($acknowledged_at) { if (is_null($acknowledged_at)) { - throw new \InvalidArgumentException('non-nullable acknowledged_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'acknowledged_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('acknowledged_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['acknowledged_at'] = $acknowledged_at; @@ -512,7 +519,14 @@ public function getCliMetadata() public function setCliMetadata($cli_metadata) { if (is_null($cli_metadata)) { - throw new \InvalidArgumentException('non-nullable cli_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'cli_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cli_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['cli_metadata'] = $cli_metadata; @@ -566,7 +580,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -674,7 +695,14 @@ public function getDeviceMetadata() public function setDeviceMetadata($device_metadata) { if (is_null($device_metadata)) { - throw new \InvalidArgumentException('non-nullable device_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'device_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('device_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['device_metadata'] = $device_metadata; @@ -728,7 +756,14 @@ public function getEndpointMetadata() public function setEndpointMetadata($endpoint_metadata) { if (is_null($endpoint_metadata)) { - throw new \InvalidArgumentException('non-nullable endpoint_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'endpoint_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endpoint_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['endpoint_metadata'] = $endpoint_metadata; @@ -782,7 +817,14 @@ public function getEventMetadata() public function setEventMetadata($event_metadata) { if (is_null($event_metadata)) { - throw new \InvalidArgumentException('non-nullable event_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'event_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('event_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['event_metadata'] = $event_metadata; @@ -836,7 +878,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -944,7 +993,14 @@ public function getMetadata() public function setMetadata($metadata) { if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['metadata'] = $metadata; @@ -998,7 +1054,14 @@ public function getSourceMetadata() public function setSourceMetadata($source_metadata) { if (is_null($source_metadata)) { - throw new \InvalidArgumentException('non-nullable source_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'source_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('source_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['source_metadata'] = $source_metadata; diff --git a/src/Client/Model/ModelsEventResponse.php b/src/Client/Model/ModelsEventResponse.php index a3fab09..d794982 100644 --- a/src/Client/Model/ModelsEventResponse.php +++ b/src/Client/Model/ModelsEventResponse.php @@ -118,22 +118,22 @@ class ModelsEventResponse implements ModelInterface, ArrayAccess, \JsonSerializa * @var boolean[] */ protected static array $openAPINullables = [ - 'acknowledged_at' => false, + 'acknowledged_at' => true, 'app_id' => false, 'created_at' => false, - 'data' => false, - 'deleted_at' => false, + 'data' => true, + 'deleted_at' => true, 'endpoint_metadata' => false, 'endpoints' => false, 'event_type' => false, - 'headers' => false, + 'headers' => true, 'idempotency_key' => false, 'is_duplicate_event' => false, 'metadata' => false, 'project_id' => false, 'raw' => false, 'source_id' => false, - 'source_metadata' => false, + 'source_metadata' => true, 'status' => false, 'uid' => false, 'updated_at' => false, @@ -450,7 +450,14 @@ public function getAcknowledgedAt() public function setAcknowledgedAt($acknowledged_at) { if (is_null($acknowledged_at)) { - throw new \InvalidArgumentException('non-nullable acknowledged_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'acknowledged_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('acknowledged_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['acknowledged_at'] = $acknowledged_at; @@ -531,7 +538,14 @@ public function getData() public function setData($data) { if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['data'] = $data; @@ -558,7 +572,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -666,7 +687,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -855,7 +883,14 @@ public function getSourceMetadata() public function setSourceMetadata($source_metadata) { if (is_null($source_metadata)) { - throw new \InvalidArgumentException('non-nullable source_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'source_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('source_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['source_metadata'] = $source_metadata; diff --git a/src/Client/Model/ModelsEventTypeResponse.php b/src/Client/Model/ModelsEventTypeResponse.php index 66f18c3..5b28239 100644 --- a/src/Client/Model/ModelsEventTypeResponse.php +++ b/src/Client/Model/ModelsEventTypeResponse.php @@ -89,9 +89,9 @@ class ModelsEventTypeResponse implements ModelInterface, ArrayAccess, \JsonSeria */ protected static array $openAPINullables = [ 'category' => false, - 'deprecated_at' => false, + 'deprecated_at' => true, 'description' => false, - 'json_schema' => false, + 'json_schema' => true, 'name' => false, 'uid' => false ]; @@ -372,7 +372,14 @@ public function getDeprecatedAt() public function setDeprecatedAt($deprecated_at) { if (is_null($deprecated_at)) { - throw new \InvalidArgumentException('non-nullable deprecated_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deprecated_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deprecated_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deprecated_at'] = $deprecated_at; @@ -426,7 +433,14 @@ public function getJsonSchema() public function setJsonSchema($json_schema) { if (is_null($json_schema)) { - throw new \InvalidArgumentException('non-nullable json_schema cannot be null'); + array_push($this->openAPINullablesSetToNull, 'json_schema'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('json_schema', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['json_schema'] = $json_schema; diff --git a/src/Client/Model/ModelsFS.php b/src/Client/Model/ModelsFS.php index 7894409..35d9922 100644 --- a/src/Client/Model/ModelsFS.php +++ b/src/Client/Model/ModelsFS.php @@ -84,10 +84,10 @@ class ModelsFS implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ - 'body' => false, - 'headers' => false, - 'path' => false, - 'query' => false + 'body' => true, + 'headers' => true, + 'path' => true, + 'query' => true ]; /** @@ -331,7 +331,14 @@ public function getBody() public function setBody($body) { if (is_null($body)) { - throw new \InvalidArgumentException('non-nullable body cannot be null'); + array_push($this->openAPINullablesSetToNull, 'body'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['body'] = $body; @@ -358,7 +365,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -385,7 +399,14 @@ public function getPath() public function setPath($path) { if (is_null($path)) { - throw new \InvalidArgumentException('non-nullable path cannot be null'); + array_push($this->openAPINullablesSetToNull, 'path'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('path', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['path'] = $path; @@ -412,7 +433,14 @@ public function getQuery() public function setQuery($query) { if (is_null($query)) { - throw new \InvalidArgumentException('non-nullable query cannot be null'); + array_push($this->openAPINullablesSetToNull, 'query'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('query', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['query'] = $query; diff --git a/src/Client/Model/ModelsFanoutEvent.php b/src/Client/Model/ModelsFanoutEvent.php index 5370a79..844364c 100644 --- a/src/Client/Model/ModelsFanoutEvent.php +++ b/src/Client/Model/ModelsFanoutEvent.php @@ -86,8 +86,8 @@ class ModelsFanoutEvent implements ModelInterface, ArrayAccess, \JsonSerializabl * @var boolean[] */ protected static array $openAPINullables = [ - 'custom_headers' => false, - 'data' => false, + 'custom_headers' => true, + 'data' => true, 'event_type' => false, 'idempotency_key' => false, 'owner_id' => false @@ -338,7 +338,14 @@ public function getCustomHeaders() public function setCustomHeaders($custom_headers) { if (is_null($custom_headers)) { - throw new \InvalidArgumentException('non-nullable custom_headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'custom_headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('custom_headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['custom_headers'] = $custom_headers; @@ -365,7 +372,14 @@ public function getData() public function setData($data) { if (is_null($data)) { - throw new \InvalidArgumentException('non-nullable data cannot be null'); + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['data'] = $data; diff --git a/src/Client/Model/ModelsFilterResponse.php b/src/Client/Model/ModelsFilterResponse.php index 3bd3d57..cc4acca 100644 --- a/src/Client/Model/ModelsFilterResponse.php +++ b/src/Client/Model/ModelsFilterResponse.php @@ -100,16 +100,16 @@ class ModelsFilterResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @var boolean[] */ protected static array $openAPINullables = [ - 'body' => false, - 'enabled_at' => false, + 'body' => true, + 'enabled_at' => true, 'event_type' => false, - 'headers' => false, - 'path' => false, - 'query' => false, - 'raw_body' => false, - 'raw_headers' => false, - 'raw_path' => false, - 'raw_query' => false, + 'headers' => true, + 'path' => true, + 'query' => true, + 'raw_body' => true, + 'raw_headers' => true, + 'raw_path' => true, + 'raw_query' => true, 'subscription_id' => false, 'uid' => false ]; @@ -387,7 +387,14 @@ public function getBody() public function setBody($body) { if (is_null($body)) { - throw new \InvalidArgumentException('non-nullable body cannot be null'); + array_push($this->openAPINullablesSetToNull, 'body'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['body'] = $body; @@ -414,7 +421,14 @@ public function getEnabledAt() public function setEnabledAt($enabled_at) { if (is_null($enabled_at)) { - throw new \InvalidArgumentException('non-nullable enabled_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'enabled_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enabled_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['enabled_at'] = $enabled_at; @@ -468,7 +482,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -495,7 +516,14 @@ public function getPath() public function setPath($path) { if (is_null($path)) { - throw new \InvalidArgumentException('non-nullable path cannot be null'); + array_push($this->openAPINullablesSetToNull, 'path'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('path', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['path'] = $path; @@ -522,7 +550,14 @@ public function getQuery() public function setQuery($query) { if (is_null($query)) { - throw new \InvalidArgumentException('non-nullable query cannot be null'); + array_push($this->openAPINullablesSetToNull, 'query'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('query', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['query'] = $query; @@ -549,7 +584,14 @@ public function getRawBody() public function setRawBody($raw_body) { if (is_null($raw_body)) { - throw new \InvalidArgumentException('non-nullable raw_body cannot be null'); + array_push($this->openAPINullablesSetToNull, 'raw_body'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('raw_body', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['raw_body'] = $raw_body; @@ -576,7 +618,14 @@ public function getRawHeaders() public function setRawHeaders($raw_headers) { if (is_null($raw_headers)) { - throw new \InvalidArgumentException('non-nullable raw_headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'raw_headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('raw_headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['raw_headers'] = $raw_headers; @@ -603,7 +652,14 @@ public function getRawPath() public function setRawPath($raw_path) { if (is_null($raw_path)) { - throw new \InvalidArgumentException('non-nullable raw_path cannot be null'); + array_push($this->openAPINullablesSetToNull, 'raw_path'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('raw_path', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['raw_path'] = $raw_path; @@ -630,7 +686,14 @@ public function getRawQuery() public function setRawQuery($raw_query) { if (is_null($raw_query)) { - throw new \InvalidArgumentException('non-nullable raw_query cannot be null'); + array_push($this->openAPINullablesSetToNull, 'raw_query'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('raw_query', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['raw_query'] = $raw_query; diff --git a/src/Client/Model/ModelsFunctionRequest.php b/src/Client/Model/ModelsFunctionRequest.php index 44813a6..068aaad 100644 --- a/src/Client/Model/ModelsFunctionRequest.php +++ b/src/Client/Model/ModelsFunctionRequest.php @@ -83,7 +83,7 @@ class ModelsFunctionRequest implements ModelInterface, ArrayAccess, \JsonSeriali */ protected static array $openAPINullables = [ 'function' => false, - 'payload' => false, + 'payload' => true, 'type' => false ]; @@ -351,7 +351,14 @@ public function getPayload() public function setPayload($payload) { if (is_null($payload)) { - throw new \InvalidArgumentException('non-nullable payload cannot be null'); + array_push($this->openAPINullablesSetToNull, 'payload'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('payload', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['payload'] = $payload; diff --git a/src/Client/Model/ModelsMetaEventResponse.php b/src/Client/Model/ModelsMetaEventResponse.php index 33ff7ba..2715d89 100644 --- a/src/Client/Model/ModelsMetaEventResponse.php +++ b/src/Client/Model/ModelsMetaEventResponse.php @@ -94,11 +94,11 @@ class ModelsMetaEventResponse implements ModelInterface, ArrayAccess, \JsonSeria * @var boolean[] */ protected static array $openAPINullables = [ - 'attempt' => false, + 'attempt' => true, 'created_at' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'event_type' => false, - 'metadata' => false, + 'metadata' => true, 'project_id' => false, 'status' => false, 'uid' => false, @@ -366,7 +366,14 @@ public function getAttempt() public function setAttempt($attempt) { if (is_null($attempt)) { - throw new \InvalidArgumentException('non-nullable attempt cannot be null'); + array_push($this->openAPINullablesSetToNull, 'attempt'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('attempt', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['attempt'] = $attempt; @@ -420,7 +427,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -474,7 +488,14 @@ public function getMetadata() public function setMetadata($metadata) { if (is_null($metadata)) { - throw new \InvalidArgumentException('non-nullable metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['metadata'] = $metadata; diff --git a/src/Client/Model/ModelsProjectResponse.php b/src/Client/Model/ModelsProjectResponse.php index f24f266..3137cec 100644 --- a/src/Client/Model/ModelsProjectResponse.php +++ b/src/Client/Model/ModelsProjectResponse.php @@ -98,14 +98,14 @@ class ModelsProjectResponse implements ModelInterface, ArrayAccess, \JsonSeriali * @var boolean[] */ protected static array $openAPINullables = [ - 'config' => false, + 'config' => true, 'created_at' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'logo_url' => false, 'name' => false, 'organisation_id' => false, 'retained_events' => false, - 'statistics' => false, + 'statistics' => true, 'type' => false, 'uid' => false, 'updated_at' => false @@ -380,7 +380,14 @@ public function getConfig() public function setConfig($config) { if (is_null($config)) { - throw new \InvalidArgumentException('non-nullable config cannot be null'); + array_push($this->openAPINullablesSetToNull, 'config'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('config', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['config'] = $config; @@ -434,7 +441,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -569,7 +583,14 @@ public function getStatistics() public function setStatistics($statistics) { if (is_null($statistics)) { - throw new \InvalidArgumentException('non-nullable statistics cannot be null'); + array_push($this->openAPINullablesSetToNull, 'statistics'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('statistics', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['statistics'] = $statistics; diff --git a/src/Client/Model/ModelsSourceResponse.php b/src/Client/Model/ModelsSourceResponse.php index 87268c8..94e3204 100644 --- a/src/Client/Model/ModelsSourceResponse.php +++ b/src/Client/Model/ModelsSourceResponse.php @@ -116,26 +116,26 @@ class ModelsSourceResponse implements ModelInterface, ArrayAccess, \JsonSerializ * @var boolean[] */ protected static array $openAPINullables = [ - 'body_function' => false, + 'body_function' => true, 'created_at' => false, 'custom_response' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'event_type_location' => false, 'forward_headers' => false, - 'header_function' => false, + 'header_function' => true, 'idempotency_keys' => false, 'is_disabled' => false, 'mask_id' => false, 'name' => false, 'project_id' => false, 'provider' => false, - 'provider_config' => false, - 'pub_sub' => false, + 'provider_config' => true, + 'pub_sub' => true, 'type' => false, 'uid' => false, 'updated_at' => false, 'url' => false, - 'verifier' => false + 'verifier' => true ]; /** @@ -443,7 +443,14 @@ public function getBodyFunction() public function setBodyFunction($body_function) { if (is_null($body_function)) { - throw new \InvalidArgumentException('non-nullable body_function cannot be null'); + array_push($this->openAPINullablesSetToNull, 'body_function'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body_function', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['body_function'] = $body_function; @@ -524,7 +531,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -605,7 +619,14 @@ public function getHeaderFunction() public function setHeaderFunction($header_function) { if (is_null($header_function)) { - throw new \InvalidArgumentException('non-nullable header_function cannot be null'); + array_push($this->openAPINullablesSetToNull, 'header_function'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('header_function', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['header_function'] = $header_function; @@ -794,7 +815,14 @@ public function getProviderConfig() public function setProviderConfig($provider_config) { if (is_null($provider_config)) { - throw new \InvalidArgumentException('non-nullable provider_config cannot be null'); + array_push($this->openAPINullablesSetToNull, 'provider_config'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('provider_config', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['provider_config'] = $provider_config; @@ -821,7 +849,14 @@ public function getPubSub() public function setPubSub($pub_sub) { if (is_null($pub_sub)) { - throw new \InvalidArgumentException('non-nullable pub_sub cannot be null'); + array_push($this->openAPINullablesSetToNull, 'pub_sub'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('pub_sub', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['pub_sub'] = $pub_sub; @@ -956,7 +991,14 @@ public function getVerifier() public function setVerifier($verifier) { if (is_null($verifier)) { - throw new \InvalidArgumentException('non-nullable verifier cannot be null'); + array_push($this->openAPINullablesSetToNull, 'verifier'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('verifier', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['verifier'] = $verifier; diff --git a/src/Client/Model/ModelsSubscriptionResponse.php b/src/Client/Model/ModelsSubscriptionResponse.php index 4da8889..63cabf5 100644 --- a/src/Client/Model/ModelsSubscriptionResponse.php +++ b/src/Client/Model/ModelsSubscriptionResponse.php @@ -108,19 +108,19 @@ class ModelsSubscriptionResponse implements ModelInterface, ArrayAccess, \JsonSe * @var boolean[] */ protected static array $openAPINullables = [ - 'alert_config' => false, + 'alert_config' => true, 'created_at' => false, - 'deleted_at' => false, + 'deleted_at' => true, 'delivery_mode' => false, - 'device_metadata' => false, - 'endpoint_metadata' => false, - 'filter_config' => false, - 'function' => false, + 'device_metadata' => true, + 'endpoint_metadata' => true, + 'filter_config' => true, + 'function' => true, 'name' => false, 'project_id' => false, - 'rate_limit_config' => false, - 'retry_config' => false, - 'source_metadata' => false, + 'rate_limit_config' => true, + 'retry_config' => true, + 'source_metadata' => true, 'type' => false, 'uid' => false, 'updated_at' => false @@ -415,7 +415,14 @@ public function getAlertConfig() public function setAlertConfig($alert_config) { if (is_null($alert_config)) { - throw new \InvalidArgumentException('non-nullable alert_config cannot be null'); + array_push($this->openAPINullablesSetToNull, 'alert_config'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('alert_config', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['alert_config'] = $alert_config; @@ -469,7 +476,14 @@ public function getDeletedAt() public function setDeletedAt($deleted_at) { if (is_null($deleted_at)) { - throw new \InvalidArgumentException('non-nullable deleted_at cannot be null'); + array_push($this->openAPINullablesSetToNull, 'deleted_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('deleted_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['deleted_at'] = $deleted_at; @@ -523,7 +537,14 @@ public function getDeviceMetadata() public function setDeviceMetadata($device_metadata) { if (is_null($device_metadata)) { - throw new \InvalidArgumentException('non-nullable device_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'device_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('device_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['device_metadata'] = $device_metadata; @@ -550,7 +571,14 @@ public function getEndpointMetadata() public function setEndpointMetadata($endpoint_metadata) { if (is_null($endpoint_metadata)) { - throw new \InvalidArgumentException('non-nullable endpoint_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'endpoint_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('endpoint_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['endpoint_metadata'] = $endpoint_metadata; @@ -577,7 +605,14 @@ public function getFilterConfig() public function setFilterConfig($filter_config) { if (is_null($filter_config)) { - throw new \InvalidArgumentException('non-nullable filter_config cannot be null'); + array_push($this->openAPINullablesSetToNull, 'filter_config'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('filter_config', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['filter_config'] = $filter_config; @@ -604,7 +639,14 @@ public function getFunction() public function setFunction($function) { if (is_null($function)) { - throw new \InvalidArgumentException('non-nullable function cannot be null'); + array_push($this->openAPINullablesSetToNull, 'function'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('function', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['function'] = $function; @@ -685,7 +727,14 @@ public function getRateLimitConfig() public function setRateLimitConfig($rate_limit_config) { if (is_null($rate_limit_config)) { - throw new \InvalidArgumentException('non-nullable rate_limit_config cannot be null'); + array_push($this->openAPINullablesSetToNull, 'rate_limit_config'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('rate_limit_config', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['rate_limit_config'] = $rate_limit_config; @@ -712,7 +761,14 @@ public function getRetryConfig() public function setRetryConfig($retry_config) { if (is_null($retry_config)) { - throw new \InvalidArgumentException('non-nullable retry_config cannot be null'); + array_push($this->openAPINullablesSetToNull, 'retry_config'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('retry_config', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['retry_config'] = $retry_config; @@ -739,7 +795,14 @@ public function getSourceMetadata() public function setSourceMetadata($source_metadata) { if (is_null($source_metadata)) { - throw new \InvalidArgumentException('non-nullable source_metadata cannot be null'); + array_push($this->openAPINullablesSetToNull, 'source_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('source_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['source_metadata'] = $source_metadata; diff --git a/src/Client/Model/ModelsTestFilterRequestScopes.php b/src/Client/Model/ModelsTestFilterRequestScopes.php index 328a4ad..1b07937 100644 --- a/src/Client/Model/ModelsTestFilterRequestScopes.php +++ b/src/Client/Model/ModelsTestFilterRequestScopes.php @@ -87,10 +87,10 @@ class ModelsTestFilterRequestScopes implements ModelInterface, ArrayAccess, \Jso */ protected static array $openAPINullables = [ 'body' => true, - 'header' => false, - 'headers' => false, - 'path' => false, - 'query' => false + 'header' => true, + 'headers' => true, + 'path' => true, + 'query' => true ]; /** @@ -372,7 +372,14 @@ public function getHeader() public function setHeader($header) { if (is_null($header)) { - throw new \InvalidArgumentException('non-nullable header cannot be null'); + array_push($this->openAPINullablesSetToNull, 'header'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('header', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['header'] = $header; @@ -399,7 +406,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -426,7 +440,14 @@ public function getPath() public function setPath($path) { if (is_null($path)) { - throw new \InvalidArgumentException('non-nullable path cannot be null'); + array_push($this->openAPINullablesSetToNull, 'path'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('path', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['path'] = $path; @@ -453,7 +474,14 @@ public function getQuery() public function setQuery($query) { if (is_null($query)) { - throw new \InvalidArgumentException('non-nullable query cannot be null'); + array_push($this->openAPINullablesSetToNull, 'query'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('query', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['query'] = $query; diff --git a/src/Client/Model/ModelsUpdateEventType.php b/src/Client/Model/ModelsUpdateEventType.php index d4bbc25..26f5a44 100644 --- a/src/Client/Model/ModelsUpdateEventType.php +++ b/src/Client/Model/ModelsUpdateEventType.php @@ -84,7 +84,7 @@ class ModelsUpdateEventType implements ModelInterface, ArrayAccess, \JsonSeriali protected static array $openAPINullables = [ 'category' => false, 'description' => false, - 'json_schema' => false + 'json_schema' => true ]; /** @@ -378,7 +378,14 @@ public function getJsonSchema() public function setJsonSchema($json_schema) { if (is_null($json_schema)) { - throw new \InvalidArgumentException('non-nullable json_schema cannot be null'); + array_push($this->openAPINullablesSetToNull, 'json_schema'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('json_schema', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['json_schema'] = $json_schema; diff --git a/src/Client/Model/ModelsUpdateFilterRequest.php b/src/Client/Model/ModelsUpdateFilterRequest.php index dec4538..4986110 100644 --- a/src/Client/Model/ModelsUpdateFilterRequest.php +++ b/src/Client/Model/ModelsUpdateFilterRequest.php @@ -90,13 +90,13 @@ class ModelsUpdateFilterRequest implements ModelInterface, ArrayAccess, \JsonSer * @var boolean[] */ protected static array $openAPINullables = [ - 'body' => false, + 'body' => true, 'enabled_at' => false, 'event_type' => false, - 'headers' => false, + 'headers' => true, 'is_flattened' => false, - 'path' => false, - 'query' => false + 'path' => true, + 'query' => true ]; /** @@ -352,7 +352,14 @@ public function getBody() public function setBody($body) { if (is_null($body)) { - throw new \InvalidArgumentException('non-nullable body cannot be null'); + array_push($this->openAPINullablesSetToNull, 'body'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('body', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['body'] = $body; @@ -433,7 +440,14 @@ public function getHeaders() public function setHeaders($headers) { if (is_null($headers)) { - throw new \InvalidArgumentException('non-nullable headers cannot be null'); + array_push($this->openAPINullablesSetToNull, 'headers'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('headers', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['headers'] = $headers; @@ -487,7 +501,14 @@ public function getPath() public function setPath($path) { if (is_null($path)) { - throw new \InvalidArgumentException('non-nullable path cannot be null'); + array_push($this->openAPINullablesSetToNull, 'path'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('path', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['path'] = $path; @@ -514,7 +535,14 @@ public function getQuery() public function setQuery($query) { if (is_null($query)) { - throw new \InvalidArgumentException('non-nullable query cannot be null'); + array_push($this->openAPINullablesSetToNull, 'query'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('query', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } } $this->container['query'] = $query; diff --git a/tests/ApiClientContractTest.php b/tests/ApiClientContractTest.php index 8e4a1af..9a080c9 100644 --- a/tests/ApiClientContractTest.php +++ b/tests/ApiClientContractTest.php @@ -25,8 +25,8 @@ $config = (new Configuration()) ->setHost('https://us.getconvoy.cloud/api') - ->setApiKeyPrefix('Authorization', 'Bearer') - ->setApiKey('Authorization', 'test-key'); + // spec now models auth as http bearer; the client adds the Bearer prefix + ->setAccessToken('test-key'); $event = (new ModelsCreateEvent()) ->setEndpointId('ep-1')