/** * {@inheritdoc} */ public function getFields() { return [Fb::create('node_ref', T\MessageRefType::create())->build(), Fb::create('_id', T\StringType::create())->pattern('^[\\w\\/\\.:-]+$')->build(), Fb::create('slug', T\StringType::create())->format(Format::SLUG())->build()]; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('node_ref', T\MessageRefType::create())->build(), Fb::create('new_node', T\MessageType::create())->className('Gdbots\\Schemas\\Ncr\\Mixin\\Node\\Node')->build(), Fb::create('old_node', T\MessageType::create())->className('Gdbots\\Schemas\\Ncr\\Mixin\\Node\\Node')->build()]; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('request_id', T\UuidType::create())->required()->build(), Fb::create('occurred_at', T\MicrotimeType::create())->build(), Fb::create('ctx_retries', T\TinyIntType::create())->build(), Fb::create('ctx_causator_ref', T\MessageRefType::create())->build(), Fb::create('ctx_correlator_ref', T\MessageRefType::create())->build(), Fb::create('ctx_user_ref', T\MessageRefType::create())->build(), Fb::create('ctx_app', T\MessageType::create())->className('Gdbots\\Schemas\\Contexts\\App')->build(), Fb::create('ctx_cloud', T\MessageType::create())->className('Gdbots\\Schemas\\Contexts\\Cloud')->build(), Fb::create('ctx_ip', T\StringType::create())->format(Format::IPV4())->overridable(true)->build(), Fb::create('ctx_ua', T\TextType::create())->overridable(true)->build()]; }
/** * @return Schema */ protected static function defineSchema() { return new Schema('pbj:eme:solicits:command:import-submission:1-0-0', __CLASS__, [Fb::create('solicit_id', T\IdentifierType::create())->required()->className('Eme\\Schemas\\Solicits\\SolicitId')->build(), Fb::create('first_name', T\StringType::create())->build(), Fb::create('last_name', T\StringType::create())->build(), Fb::create('email', T\StringType::create())->format(Format::EMAIL())->build(), Fb::create('email_domain', T\StringType::create())->format(Format::HOSTNAME())->build(), Fb::create('address', T\MessageType::create())->className('Gdbots\\Schemas\\Geo\\Address')->build(), Fb::create('phone', T\StringType::create())->asAMap()->maxLength(20)->pattern('^\\+?[1-9]\\d{1,14}$')->build(), Fb::create('dob', T\DateType::create())->build(), Fb::create('age', T\TinyIntType::create())->max(120)->build(), Fb::create('gender', T\IntEnumType::create())->className('Gdbots\\Schemas\\Common\\Enum\\Gender')->build(), Fb::create('story', T\TextType::create())->build(), Fb::create('file_ids', T\IdentifierType::create())->asASet()->className('Gdbots\\Schemas\\Files\\FileId')->build(), Fb::create('photo_urls', T\StringType::create())->asAList()->format(Format::URL())->build(), Fb::create('video_urls', T\StringType::create())->asAList()->format(Format::URL())->build(), Fb::create('networks', T\StringType::create())->asAMap()->maxLength(50)->pattern('^[\\w\\.-]+$')->build(), Fb::create('ppid', T\StringType::create())->pattern('^[\\w\\/\\.:-]+$')->build(), Fb::create('cf', T\DynamicFieldType::create())->asAList()->build(), Fb::create('hashtags', T\StringType::create())->asASet()->format(Format::HASHTAG())->build(), Fb::create('tags', T\StringType::create())->asAMap()->pattern('^[\\w\\/\\.:-]+$')->build(), Fb::create('is_blocked', T\BooleanType::create())->build(), Fb::create('is_read', T\BooleanType::create())->build(), Fb::create('last_read_at', T\MicrotimeType::create())->useTypeDefault(false)->build(), Fb::create('last_read_by_ref', T\MessageRefType::create())->build(), Fb::create('is_verified', T\BooleanType::create())->build(), Fb::create('verified_at', T\MicrotimeType::create())->useTypeDefault(false)->build()], [AccountRefV1Mixin::create(), CommandV1Mixin::create(), CollectableV1Mixin::create(), TimePartingV1Mixin::create(), TimeSamplingV1Mixin::create(), UtmV1Mixin::create()]); }
/** * @return Schema */ protected static function defineSchema() { return new Schema('pbj:gdbots:pbjx::envelope:1-0-0', __CLASS__, [Fb::create('envelope_id', T\UuidType::create())->required()->build(), Fb::create('ok', T\BooleanType::create())->withDefault(true)->build(), Fb::create('code', T\SmallIntType::create())->withDefault(Code::OK)->build(), Fb::create('http_code', T\IntEnumType::create())->withDefault(HttpCode::HTTP_OK())->className('Gdbots\\Schemas\\Pbjx\\Enum\\HttpCode')->build(), Fb::create('etag', T\StringType::create())->maxLength(100)->pattern('^[\\w\\.:-]+$')->build(), Fb::create('error_name', T\StringType::create())->pattern('^[\\w\\/\\.:-]+$')->build(), Fb::create('error_message', T\TextType::create())->build(), Fb::create('message_ref', T\MessageRefType::create())->build(), Fb::create('message', T\MessageType::create())->className('Gdbots\\Pbj\\Message')->build()]); }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('node_ref', T\MessageRefType::create())->build(), Fb::create('node_status', T\StringEnumType::create())->className('Gdbots\\Schemas\\Ncr\\Enum\\NodeStatus')->build(), Fb::create('new_slug', T\StringType::create())->format(Format::SLUG())->build(), Fb::create('old_slug', T\StringType::create())->format(Format::SLUG())->build()]; }
/** * @return Schema */ protected static function defineSchema() { $schema = new Schema('pbj:gdbots:tests.pbj:fixtures:nested-message:1-0-0', __CLASS__, [Fb::create('test1', T\StringType::create())->build(), Fb::create('test2', T\IntType::create())->asASet()->build(), Fb::create('location', T\GeoPointType::create())->build(), Fb::create('refs', T\MessageRefType::create())->asASet()->build()]); MessageResolver::registerSchema($schema); return $schema; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('_id', T\IdentifierType::create())->required()->withDefault(function () { return UuidIdentifier::generate(); })->className('Gdbots\\Identifiers\\UuidIdentifier')->overridable(true)->build(), Fb::create('status', T\StringEnumType::create())->withDefault(NodeStatus::DRAFT())->className('Gdbots\\Schemas\\Ncr\\Enum\\NodeStatus')->build(), Fb::create('etag', T\StringType::create())->maxLength(100)->pattern('^[\\w\\.:-]+$')->build(), Fb::create('created_at', T\MicrotimeType::create())->build(), Fb::create('creator_ref', T\MessageRefType::create())->build(), Fb::create('updated_at', T\MicrotimeType::create())->useTypeDefault(false)->build(), Fb::create('updater_ref', T\MessageRefType::create())->build(), Fb::create('last_event_ref', T\MessageRefType::create())->build(), Fb::create('title', T\StringType::create())->build()]; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('from_ref', T\MessageRefType::create())->build(), Fb::create('to_ref', T\MessageRefType::create())->build(), Fb::create('multiplicity', T\StringEnumType::create())->withDefault(EdgeMultiplicity::MULTI())->className('Gdbots\\Schemas\\Ncr\\Enum\\EdgeMultiplicity')->overridable(true)->build(), Fb::create('created_at', T\MicrotimeType::create())->build()]; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('command_id', T\TimeUuidType::create())->required()->build(), Fb::create('occurred_at', T\MicrotimeType::create())->build(), Fb::create('expected_etag', T\StringType::create())->maxLength(100)->pattern('^[\\w\\.:-]+$')->build(), Fb::create('ctx_retries', T\TinyIntType::create())->build(), Fb::create('ctx_causator_ref', T\MessageRefType::create())->build(), Fb::create('ctx_correlator_ref', T\MessageRefType::create())->build(), Fb::create('ctx_user_ref', T\MessageRefType::create())->build(), Fb::create('ctx_app', T\MessageType::create())->className('Gdbots\\Schemas\\Contexts\\App')->build(), Fb::create('ctx_cloud', T\MessageType::create())->className('Gdbots\\Schemas\\Contexts\\Cloud')->build(), Fb::create('ctx_ip', T\StringType::create())->format(Format::IPV4())->overridable(true)->build(), Fb::create('ctx_ua', T\TextType::create())->overridable(true)->build()]; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('response_id', T\UuidType::create())->required()->build(), Fb::create('created_at', T\MicrotimeType::create())->build(), Fb::create('ctx_request_ref', T\MessageRefType::create())->build(), Fb::create('ctx_correlator_ref', T\MessageRefType::create())->build()]; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('node_ref', T\MessageRefType::create())->build(), Fb::create('publish_at', T\DateTimeType::create())->useTypeDefault(false)->build()]; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('node_ref', T\MessageRefType::create())->build(), Fb::create('slug', T\StringType::create())->format(Format::SLUG())->build(), Fb::create('new_etag', T\StringType::create())->maxLength(100)->pattern('^[\\w\\.:-]+$')->build(), Fb::create('old_etag', T\StringType::create())->maxLength(100)->pattern('^[\\w\\.:-]+$')->build(), Fb::create('new_node', T\MessageType::create())->className('Gdbots\\Schemas\\Ncr\\Mixin\\Node\\Node')->build(), Fb::create('old_node', T\MessageType::create())->className('Gdbots\\Schemas\\Ncr\\Mixin\\Node\\Node')->build()]; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('node_ref', T\MessageRefType::create())->build()]; }
/** * @return Schema */ protected static function defineSchema() { return new Schema('pbj:eme:solicits:request:search-submissions-request:1-0-0', __CLASS__, [Fb::create('solicit_id', T\IdentifierType::create())->className('Eme\\Schemas\\Solicits\\SolicitId')->build(), Fb::create('first_name', T\StringType::create())->build(), Fb::create('last_name', T\StringType::create())->build(), Fb::create('email', T\StringType::create())->format(Format::EMAIL())->build(), Fb::create('email_domain', T\StringType::create())->format(Format::HOSTNAME())->build(), Fb::create('address', T\MessageType::create())->className('Gdbots\\Schemas\\Geo\\Address')->build(), Fb::create('age_min', T\TinyIntType::create())->max(120)->build(), Fb::create('age_max', T\TinyIntType::create())->max(120)->build(), Fb::create('is_blocked', T\TrinaryType::create())->build(), Fb::create('is_read', T\TrinaryType::create())->build(), Fb::create('last_read_after', T\DateTimeType::create())->build(), Fb::create('last_read_before', T\DateTimeType::create())->build(), Fb::create('last_read_by_ref', T\MessageRefType::create())->build(), Fb::create('is_verified', T\TrinaryType::create())->build()], [AccountRefV1Mixin::create(), RequestV1Mixin::create(), SearchEventsRequestV1Mixin::create(), TrackedMessageV1Mixin::create()]); }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('node_ref', T\MessageRefType::create())->build(), Fb::create('slug', T\StringType::create())->format(Format::SLUG())->build(), Fb::create('publish_at', T\DateTimeType::create())->useTypeDefault(false)->build()]; }
/** * {@inheritdoc} */ public function getFields() { return [Fb::create('node_ref', T\MessageRefType::create())->build(), Fb::create('slug', T\StringType::create())->format(Format::SLUG())->build()]; }