Skip to content

Commit

Permalink
feat(lib): generate code from braze-specification
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored and github-actions[bot] committed Jul 30, 2024
1 parent 08f6ae0 commit 582ab9c
Show file tree
Hide file tree
Showing 107 changed files with 440 additions and 224 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleCreatePostBodyAudience::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleCreatePostBodyAudience::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -107,7 +107,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleCreatePostBodyAudience::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleCreatePostBodyAudience::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleCreatePostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleCreatePostBody::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -157,7 +157,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleCreatePostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleCreatePostBody::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleCreatePostBodyRecipientsItem::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleCreatePostBodyRecipientsItem::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -121,7 +121,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleCreatePostBodyRecipientsItem::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleCreatePostBodyRecipientsItem::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleCreatePostBodySchedule::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleCreatePostBodySchedule::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -113,7 +113,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleCreatePostBodySchedule::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleCreatePostBodySchedule::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleDeletePostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleDeletePostBody::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -106,7 +106,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleDeletePostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleDeletePostBody::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleUpdatePostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleUpdatePostBody::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -113,7 +113,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleUpdatePostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleUpdatePostBody::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleUpdatePostBodySchedule::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleUpdatePostBodySchedule::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -72,7 +72,7 @@ public function normalize(mixed $object, ?string $format = null, array $context
{
$data = [];
if ($object->isInitialized('time') && null !== $object->getTime()) {
$data['time'] = $object->getTime()->format('Y-m-d\TH:i:sP');
$data['time'] = $object->getTime()?->format('Y-m-d\TH:i:sP');
}
if ($object->isInitialized('inLocalTime') && null !== $object->getInLocalTime()) {
$data['in_local_time'] = $object->getInLocalTime();
Expand Down Expand Up @@ -106,7 +106,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerScheduleUpdatePostBodySchedule::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerScheduleUpdatePostBodySchedule::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down Expand Up @@ -145,7 +145,7 @@ public function normalize($object, $format = null, array $context = [])
{
$data = [];
if ($object->isInitialized('time') && null !== $object->getTime()) {
$data['time'] = $object->getTime()->format('Y-m-d\TH:i:sP');
$data['time'] = $object->getTime()?->format('Y-m-d\TH:i:sP');
}
if ($object->isInitialized('inLocalTime') && null !== $object->getInLocalTime()) {
$data['in_local_time'] = $object->getInLocalTime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBodyAudience::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBodyAudience::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -107,7 +107,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBodyAudience::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBodyAudience::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
4 changes: 2 additions & 2 deletions lib/Normalizer/CampaignsTriggerSendPostBodyNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBody::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -150,7 +150,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBody::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBodyRecipientsItemAttributes::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBodyRecipientsItemAttributes::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -99,7 +99,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBodyRecipientsItemAttributes::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBodyRecipientsItemAttributes::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBodyRecipientsItem::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBodyRecipientsItem::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -135,7 +135,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBodyRecipientsItem::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBodyRecipientsItem::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBodyRecipientsItemUserAlias::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBodyRecipientsItemUserAlias::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -106,7 +106,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CampaignsTriggerSendPostBodyRecipientsItemUserAlias::class;
return is_object($data) && get_class($data) === \Braze\Model\CampaignsTriggerSendPostBodyRecipientsItemUserAlias::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CanvasTriggerScheduleCreatePostBodyAudience::class;
return is_object($data) && get_class($data) === \Braze\Model\CanvasTriggerScheduleCreatePostBodyAudience::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -107,7 +107,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CanvasTriggerScheduleCreatePostBodyAudience::class;
return is_object($data) && get_class($data) === \Braze\Model\CanvasTriggerScheduleCreatePostBodyAudience::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CanvasTriggerScheduleCreatePostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CanvasTriggerScheduleCreatePostBody::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -150,7 +150,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CanvasTriggerScheduleCreatePostBody::class;
return is_object($data) && get_class($data) === \Braze\Model\CanvasTriggerScheduleCreatePostBody::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CanvasTriggerScheduleCreatePostBodyRecipientsItem::class;
return is_object($data) && get_class($data) === \Braze\Model\CanvasTriggerScheduleCreatePostBodyRecipientsItem::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -136,7 +136,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CanvasTriggerScheduleCreatePostBodyRecipientsItem::class;
return is_object($data) && get_class($data) === \Braze\Model\CanvasTriggerScheduleCreatePostBodyRecipientsItem::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function supportsDenormalization(mixed $data, string $type, ?string $form

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CanvasTriggerScheduleCreatePostBodySchedule::class;
return is_object($data) && get_class($data) === \Braze\Model\CanvasTriggerScheduleCreatePostBodySchedule::class;
}

public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
Expand Down Expand Up @@ -113,7 +113,7 @@ public function supportsDenormalization($data, $type, ?string $format = null, ar

public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
return is_object($data) && get_class($data) === Braze\Model\CanvasTriggerScheduleCreatePostBodySchedule::class;
return is_object($data) && get_class($data) === \Braze\Model\CanvasTriggerScheduleCreatePostBodySchedule::class;
}

public function denormalize($data, $type, $format = null, array $context = [])
Expand Down
Loading

0 comments on commit 582ab9c

Please sign in to comment.