Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
Protocol Buffer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tammam.alsoleman
Protocol Buffer
Commits
60107f26
Commit
60107f26
authored
Nov 05, 2025
by
tammam.alsoleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit book.proto & pom.xml
parent
d466693f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
book.proto
src/main/proto/book.proto
+27
-5
No files found.
src/main/proto/book.proto
View file @
60107f26
syntax
=
"proto3"
;
syntax
=
"proto3"
;
option
java_multiple_files
=
true
;
option
java_multiple_files
=
true
;
option
java_package
=
"org.example"
;
option
java_package
=
"org.ds.proto"
;
// enum جديد
enum
BookType
{
UNKNOWN
=
0
;
FICTION
=
1
;
SCIENCE
=
2
;
TECHNICAL
=
3
;
}
// رسالة متداخلة (Nested Message)
message
Author
{
string
name
=
1
;
string
country
=
2
;
}
// الرسالة الرئيسية
message
Book
{
message
Book
{
string
title
=
1
;
string
title
=
1
;
string
author
=
2
;
Author
author
=
2
;
// nested message
int32
year
=
3
;
string
isbn
=
3
;
string
isbn
=
4
;
int32
year
=
4
;
BookType
type
=
5
;
// enum
repeated
string
categories
=
6
;
// repeated field
bool
available
=
7
;
}
// مجموعة كتب
message
Library
{
repeated
Book
books
=
1
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment