Example #1
0
 /**
  * {@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()];
 }
Example #2
0
 /**
  * @return Schema
  */
 protected static function defineSchema()
 {
     return new Schema('pbj:gdbots:contexts::app:1-0-0', __CLASS__, [Fb::create('_id', T\UuidType::create())->useTypeDefault(false)->build(), Fb::create('vendor', T\StringType::create())->maxLength(50)->pattern('^[a-z0-9-]+$')->build(), Fb::create('name', T\StringType::create())->maxLength(50)->pattern('^[a-z0-9\\.-]+$')->build(), Fb::create('version', T\StringType::create())->maxLength(10)->pattern('^[\\w\\.-]+$')->build(), Fb::create('build', T\StringType::create())->maxLength(50)->pattern('^[\\w\\.-]+$')->build(), Fb::create('variant', T\StringType::create())->maxLength(10)->pattern('^[\\w\\.-]+$')->build()]);
 }
Example #3
0
 /**
  * @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()]);
 }
Example #4
0
 /**
  * {@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()];
 }