示例#1
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()]);
 }
示例#2
0
 /**
  * @return Schema
  */
 protected static function defineSchema()
 {
     return new Schema('pbj:gdbots:contexts::user-agent:1-0-0', __CLASS__, [Fb::create('br_family', T\StringType::create())->pattern('^[\\w\\s\\(\\)\\[\\]\\{\\}\\/\\.:;-]+$')->build(), Fb::create('br_major', T\SmallIntType::create())->build(), Fb::create('br_minor', T\SmallIntType::create())->build(), Fb::create('br_patch', T\SmallIntType::create())->build(), Fb::create('os_family', T\StringType::create())->pattern('^[\\w\\s\\(\\)\\[\\]\\{\\}\\/\\.:;-]+$')->build(), Fb::create('os_major', T\SmallIntType::create())->build(), Fb::create('os_minor', T\SmallIntType::create())->build(), Fb::create('os_patch', T\SmallIntType::create())->build(), Fb::create('os_patch_minor', T\SmallIntType::create())->build(), Fb::create('dvce_family', T\StringType::create())->pattern('^[\\w\\s\\(\\)\\[\\]\\{\\}\\/\\.:;-]+$')->build()]);
 }
示例#3
0
 /**
  * @return Schema
  */
 protected static function defineSchema()
 {
     return new Schema('pbj:gdbots:pbjx:event:event-execution-failed:1-0-0', __CLASS__, [Fb::create('event', T\MessageType::create())->className('Gdbots\\Schemas\\Pbjx\\Mixin\\Event\\Event')->build(), Fb::create('error_code', T\SmallIntType::create())->withDefault(Code::OK)->build(), Fb::create('error_name', T\StringType::create())->pattern('^[\\w\\/\\.:-]+$')->build(), Fb::create('error_message', T\TextType::create())->build()], [EventV1Mixin::create()]);
 }