@@ -797,6 +797,225 @@ impl FromStr for ScanCursor {
797797 Err ( "Invalid cursor, must have 'layer/cursor' format" . to_string ( ) )
798798 }
799799 }
800+ <<<<<<< HEAD
801+ ||||||| parent of f66678cfc ( further cleanups )
802+ }
803+
804+ #[ derive ( Clone , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
805+ #[ cfg_attr ( feature = "full" , derive ( poem_openapi:: Object ) ) ]
806+ #[ cfg_attr ( feature = "full" , oai( rename_all = "camelCase" ) ) ]
807+ #[ serde ( rename_all = "camelCase" ) ]
808+ #[ wit ( name = "queued-card-event-card" , owner = "golem:api@1.5.0/oplog" ) ]
809+ #[ cfg_attr ( feature = "full" , derive ( desert_rust:: BinaryCodec ) ) ]
810+ #[ cfg_attr ( feature = "full" , desert ( evolution ( ) ) ) ]
811+ pub struct QueuedCardEventCard {
812+ pub card_id : CardId ,
813+ #[ cfg_attr ( feature = "full" , oai ( skip ) ) ]
814+ pub card : Option < StoredCard > ,
815+ }
816+
817+ #[ derive ( Clone , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
818+ #[ cfg_attr ( feature = "full" , derive ( poem_openapi:: Object ) ) ]
819+ #[ cfg_attr ( feature = "full" , oai( rename_all = "camelCase" ) ) ]
820+ #[ serde ( rename_all = "camelCase" ) ]
821+ #[ wit (
822+ name = "public-queued-card-event-card" ,
823+ owner = "golem:api@1.5.0/oplog"
824+ ) ]
825+ #[ cfg_attr ( feature = "full" , derive ( desert_rust:: BinaryCodec ) ) ]
826+ #[ cfg_attr ( feature = "full" , desert ( evolution ( ) ) ) ]
827+ pub struct PublicQueuedCardEventCard {
828+ pub card_id : CardId ,
829+ }
830+
831+ #[ derive ( Clone , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
832+ #[ cfg_attr ( feature = "full" , derive ( poem_openapi:: Union ) ) ]
833+ #[ cfg_attr ( feature = "full" , oai( discriminator_name = "type" , one_of = true) ) ]
834+ #[ serde ( tag = "type" ) ]
835+ #[ wit ( name = "queued-card-event" , owner = "golem:api@1.5.0/oplog" ) ]
836+ #[ cfg_attr ( feature = "full" , derive ( desert_rust:: BinaryCodec ) ) ]
837+ #[ cfg_attr ( feature = "full" , desert ( evolution ( ) ) ) ]
838+ pub enum QueuedCardEvent {
839+ Install ( QueuedCardEventCard ) ,
840+ Revoke ( QueuedCardEventCard ) ,
841+ }
842+
843+ impl QueuedCardEvent {
844+ pub fn card_id ( & self ) -> CardId {
845+ match self {
846+ Self :: Install ( event ) | Self :: Revoke ( event ) => event. card_id,
847+ }
848+ }
849+
850+ pub fn install( card: impl Into <StoredCard >) -> Self {
851+ let card = card. into( ) ;
852+ Self :: Install ( QueuedCardEventCard {
853+ card_id : card. card_id( ) ,
854+ card : Some ( card) ,
855+ } )
856+ }
857+
858+ pub fn revoke ( card_id : CardId ) -> Self {
859+ Self :: Revoke ( QueuedCardEventCard {
860+ card_id,
861+ card : None ,
862+ } )
863+ }
864+ }
865+
866+ #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
867+ #[ cfg_attr( feature = "full" , derive( poem_openapi:: Union ) ) ]
868+ #[ cfg_attr( feature = "full" , oai( discriminator_name = "type" , one_of = true ) ) ]
869+ #[ serde( tag = "type" ) ]
870+ #[ wit( name = "public-queued-card-event" , owner = "golem:api@1.5.0/oplog" ) ]
871+ #[ cfg_attr( feature = "full" , derive( desert_rust:: BinaryCodec ) ) ]
872+ #[ cfg_attr( feature = "full" , desert( evolution( ) ) ) ]
873+ pub enum PublicQueuedCardEvent {
874+ Install ( PublicQueuedCardEventCard ) ,
875+ Revoke ( PublicQueuedCardEventCard ) ,
876+ }
877+
878+ impl PublicQueuedCardEvent {
879+ pub fn card_id ( & self ) -> CardId {
880+ match self {
881+ Self :: Install ( event) | Self :: Revoke ( event) => event. card_id ,
882+ }
883+ }
884+ }
885+
886+ impl From < QueuedCardEvent > for PublicQueuedCardEvent {
887+ fn from ( value : QueuedCardEvent ) -> Self {
888+ match value {
889+ QueuedCardEvent : : Install ( event) => Self :: Install ( PublicQueuedCardEventCard {
890+ card_id : event. card_id,
891+ } ) ,
892+ QueuedCardEvent : : Revoke ( event) => Self :: Revoke ( PublicQueuedCardEventCard {
893+ card_id : event. card_id,
894+ } ) ,
895+ }
896+ }
897+ }
898+
899+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
900+ #[ cfg_attr( feature = "full" , derive( poem_openapi:: Enum ) ) ]
901+ #[ serde( rename_all = "camelCase" ) ]
902+ #[ wit( name = "card-install-failure" , owner = "golem:api@1.5.0/oplog" ) ]
903+ #[ cfg_attr( feature = "full" , derive( desert_rust:: BinaryCodec ) ) ]
904+ #[ cfg_attr( feature = "full" , desert( evolution( ) ) ) ]
905+ pub enum CardInstallFailure {
906+ CardRevoked,
907+ NotFound,
908+ RecipientMismatch,
909+ NotPermitted,
910+ =======
911+ }
912+
913+ #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
914+ #[ cfg_attr( feature = "full" , derive( poem_openapi:: Object ) ) ]
915+ #[ cfg_attr( feature = "full" , oai( rename_all = "camelCase" ) ) ]
916+ #[ serde( rename_all = "camelCase" ) ]
917+ #[ wit( name = "queued-card-event-card" , owner = "golem:api@1.5.0/oplog" ) ]
918+ #[ cfg_attr( feature = "full" , derive( desert_rust:: BinaryCodec ) ) ]
919+ #[ cfg_attr( feature = "full" , desert( evolution( ) ) ) ]
920+ pub struct QueuedCardEventCard {
921+ pub card_id : CardId ,
922+ #[ cfg_attr( feature = "full" , oai( skip) ) ]
923+ pub card : Option < StoredCard > ,
924+ }
925+
926+ #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
927+ #[ cfg_attr( feature = "full" , derive( poem_openapi:: Object ) ) ]
928+ #[ cfg_attr( feature = "full" , oai( rename_all = "camelCase" ) ) ]
929+ #[ serde( rename_all = "camelCase" ) ]
930+ #[ wit(
931+ name = "public-queued-card-event-card" ,
932+ owner = "golem:api@1.5.0/oplog"
933+ ) ]
934+ #[ cfg_attr( feature = "full" , derive( desert_rust:: BinaryCodec ) ) ]
935+ #[ cfg_attr( feature = "full" , desert( evolution( ) ) ) ]
936+ pub struct PublicQueuedCardEventCard {
937+ pub card_id : CardId ,
938+ }
939+
940+ #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
941+ #[ cfg_attr( feature = "full" , derive( poem_openapi:: Union ) ) ]
942+ #[ cfg_attr( feature = "full" , oai( discriminator_name = "type" , one_of = true) ) ]
943+ #[ serde( tag = "type" ) ]
944+ #[ wit( name = "queued-card-event" , owner = "golem:api@1.5.0/oplog" ) ]
945+ #[ cfg_attr( feature = "full" , derive( desert_rust:: BinaryCodec ) ) ]
946+ #[ cfg_attr( feature = "full" , desert( evolution( ) ) ) ]
947+ pub enum QueuedCardEvent {
948+ Install ( QueuedCardEventCard ) ,
949+ Revoke ( QueuedCardEventCard ) ,
950+ }
951+
952+ impl QueuedCardEvent {
953+ pub fn card_id ( & self ) -> CardId {
954+ match self {
955+ Self :: Install ( event) | Self :: Revoke ( event) => event. card_id ,
956+ }
957+ }
958+
959+ pub fn install ( card : impl Into < StoredCard > ) -> Self {
960+ let card = card. into( ) ;
961+ Self :: Install ( QueuedCardEventCard {
962+ card_id : card. card_id( ) ,
963+ card : Some ( card) ,
964+ } )
965+ }
966+
967+ pub fn revoke ( card_id : CardId ) -> Self {
968+ Self :: Revoke ( QueuedCardEventCard {
969+ card_id,
970+ card : None ,
971+ } )
972+ }
973+ }
974+
975+ #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
976+ #[ cfg_attr( feature = "full" , derive( poem_openapi:: Union ) ) ]
977+ #[ cfg_attr( feature = "full" , oai( discriminator_name = "type" , one_of = true ) ) ]
978+ #[ serde( tag = "type" ) ]
979+ #[ wit( name = "public-queued-card-event" , owner = "golem:api@1.5.0/oplog" ) ]
980+ #[ cfg_attr( feature = "full" , derive( desert_rust:: BinaryCodec ) ) ]
981+ #[ cfg_attr( feature = "full" , desert( evolution( ) ) ) ]
982+ pub enum PublicQueuedCardEvent {
983+ Install ( PublicQueuedCardEventCard ) ,
984+ Revoke ( PublicQueuedCardEventCard ) ,
985+ }
986+
987+ impl PublicQueuedCardEvent {
988+ pub fn card_id ( & self ) -> CardId {
989+ match self {
990+ Self :: Install ( event) | Self :: Revoke ( event) => event. card_id ,
991+ }
992+ }
993+ }
994+
995+ impl From < QueuedCardEvent > for PublicQueuedCardEvent {
996+ fn from ( value : QueuedCardEvent ) -> Self {
997+ match value {
998+ QueuedCardEvent : : Install ( event) => Self :: Install ( PublicQueuedCardEventCard {
999+ card_id : event. card_id,
1000+ } ) ,
1001+ QueuedCardEvent : : Revoke ( event) => Self :: Revoke ( PublicQueuedCardEventCard {
1002+ card_id : event. card_id,
1003+ } ) ,
1004+ }
1005+ }
1006+ }
1007+
1008+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Serialize , Deserialize , IntoValue , FromValue ) ]
1009+ #[ cfg_attr( feature = "full" , derive( poem_openapi:: Enum ) ) ]
1010+ #[ serde( rename_all = "camelCase" ) ]
1011+ #[ wit( name = "card-install-failure" , owner = "golem:api@1.5.0/oplog" ) ]
1012+ #[ cfg_attr( feature = "full" , derive( desert_rust:: BinaryCodec ) ) ]
1013+ #[ cfg_attr( feature = "full" , desert( evolution( ) ) ) ]
1014+ pub enum CardInstallFailure {
1015+ NotFound,
1016+ RecipientMismatch,
1017+ NotPermitted,
1018+ >>>>>>> f66678cfc ( further cleanups)
8001019}
8011020
8021021#[ cfg( feature = "full" ) ]
0 commit comments