3 declare(strict_types=1);
33 private static $discriminatorClasses = [
34 'AzureServiceBus' => AzureServiceBusDestinationModel::class,
35 'ConfluentCloud' => ConfluentCloudDestinationModel::class,
36 'EventBridge' => EventBridgeDestinationModel::class,
37 'EventGrid' => AzureEventGridDestinationModel::class,
38 'GoogleCloudPubSub' => GoogleCloudPubSubDestinationModel::class,
39 'SNS' => SnsDestinationModel::class,
40 'SQS' => SqsDestinationModel::class,
58 if (is_null($this->type)) {
60 $data = $this->
raw(self::FIELD_TYPE);
64 $this->type = (string) $data;
81 if (is_object($value) && isset($value->$fieldName)) {
83 $discriminatorValue = $value->$fieldName;
84 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
85 return self::$discriminatorClasses[$discriminatorValue];
88 if (is_array($value) && isset($value[$fieldName])) {
90 $discriminatorValue = $value[$fieldName];
91 if (isset(self::$discriminatorClasses[$discriminatorValue])) {
92 return self::$discriminatorClasses[$discriminatorValue];
97 $type = DestinationModel::class;