Skip to content

Commit 683c038

Browse files
authored
Merge pull request #92 from Logofile/sync
This update:
2 parents 680af46 + 33f6aa1 commit 683c038

File tree

3 files changed

+33
-16
lines changed

3 files changed

+33
-16
lines changed

content/programming-guides/proto3.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This guide describes how to use the protocol buffer language to structure your
99
protocol buffer data, including `.proto` file syntax and how to generate data
1010
access classes from your `.proto` files. It covers the **proto3** version of the
1111
protocol buffers language: for information on the **proto2** syntax, see the
12-
[Proto2 Language Guide](/programming-guides/proto).
12+
[Proto2 Language Guide](/programming-guides/proto2).
1313

1414
This is a reference guide – for a step by step example that uses many of the
1515
features described in this document, see the
@@ -34,8 +34,8 @@ message SearchRequest {
3434

3535
* The first line of the file specifies that you're using `proto3` syntax: if
3636
you don't do this the protocol buffer compiler will assume you are using
37-
[proto2](/programming-guides/proto). This must be the
38-
first non-empty, non-comment line of the file.
37+
[proto2](/programming-guides/proto2). This must be
38+
the first non-empty, non-comment line of the file.
3939
* The `SearchRequest` message definition specifies three fields (name/value
4040
pairs), one for each piece of data that you want to include in this type of
4141
message. Each field has a name and a type.
@@ -753,7 +753,7 @@ This is because:
753753
* There must be a zero value, so that we can use 0 as a numeric
754754
[default value](#default).
755755
* The zero value needs to be the first element, for compatibility with the
756-
[proto2](/programming-guides/proto) semantics where
756+
[proto2](/programming-guides/proto2) semantics where
757757
the first enum value is always the default.
758758

759759
You can define aliases by assigning the same value to different enum constants.
@@ -912,9 +912,9 @@ project and use fully qualified names for all imports.
912912
### Using proto2 Message Types
913913

914914
It's possible to import
915-
[proto2](/programming-guides/proto) message types and use
916-
them in your proto3 messages, and vice versa. However, proto2 enums cannot be
917-
used directly in proto3 syntax (it's okay if an imported proto2 message uses
915+
[proto2](/programming-guides/proto2) message types and
916+
use them in your proto3 messages, and vice versa. However, proto2 enums cannot
917+
be used directly in proto3 syntax (it's okay if an imported proto2 message uses
918918
them).
919919

920920
## Nested Types {#nested}
@@ -1091,9 +1091,9 @@ for (const google::protobuf::Any& detail : status.details()) {
10911091
development**.
10921092
10931093
If you are already familiar with
1094-
[proto2 syntax](/programming-guides/proto), the `Any` can
1095-
hold arbitrary proto3 messages, similar to proto2 messages which can allow
1096-
[extensions](/programming-guides/proto#extensions).
1094+
[proto2 syntax](/programming-guides/proto2), the `Any`
1095+
can hold arbitrary proto3 messages, similar to proto2 messages which can allow
1096+
[extensions](/programming-guides/proto2#extensions).
10971097
10981098
## Oneof {#oneof}
10991099
@@ -1334,7 +1334,7 @@ special protocol buffer compiler plugin.
13341334

13351335
If you don't want to use gRPC, it's also possible to use protocol buffers with
13361336
your own RPC implementation. You can find out more about this in the
1337-
[Proto2 Language Guide](/programming-guides/proto#services).
1337+
[Proto2 Language Guide](/programming-guides/proto2#services).
13381338

13391339
There are also a number of ongoing third-party projects to develop RPC
13401340
implementations for Protocol Buffers. For a list of links to projects we know
@@ -1695,10 +1695,10 @@ apply custom options to enum values and to fields.
16951695
Protocol Buffers also allows you to define and use your own options. This is an
16961696
**advanced feature** which most people don't need. If you do think you need to
16971697
create your own options, see the
1698-
[Proto2 Language Guide](/programming-guides/proto#customoptions)
1698+
[Proto2 Language Guide](/programming-guides/proto2#customoptions)
16991699
for details. Note that creating custom options uses
1700-
[extensions](/programming-guides/proto#extensions), which
1701-
are permitted only for custom options in proto3.
1700+
[extensions](/programming-guides/proto2#extensions),
1701+
which are permitted only for custom options in proto3.
17021702

17031703
### Option Retention {#option-retention}
17041704

content/reference/java/java-generated.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,9 @@ For example, if the `.proto` file contains:
117117
package foo.bar;
118118
```
119119

120-
Then the resulting Java class will be placed in Java package `foo.bar`. However,
121-
if the `.proto` file also contains a `java_package` option, like so:
120+
Then the resulting Java class will be placed in Java package
121+
`foo.bar`. However, if the `.proto` file also
122+
contains a `java_package` option, like so:
122123

123124
```proto
124125
package foo.bar;
@@ -630,6 +631,16 @@ The compiler will generate the following methods only in the message's builder:
630631
instances. The returned map reference may be invalidated by any subsequent
631632
method calls to the Builder.
632633

634+
#### Message Value Map Fields {#message-value-map-fields}
635+
636+
For maps with message types as values, the compiler will generate an additional
637+
method in the message's builder:
638+
639+
- `Foo.Builder putFooBuilderIfAbsent(int key);`: Ensures that `key` is present
640+
in the mapping, and inserts a new `Foo.Builder` if one does not already
641+
exist. Changes to the returned `Foo.Builder` will be reflected in the final
642+
message.
643+
633644
## Any {#any-fields}
634645

635646
Given an [`Any`](/programming-guides/proto3#any) field

content/support/version-support.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,12 @@ The C# 3.24.x runtime was first released in 2023 Q3.
305305
</tr>
306306
</table>
307307

308+
### C&#35; Platform and Library Support {#csharp-support}
309+
310+
Protobuf is committed to following the platform and library support policy
311+
described in
312+
[.NET Support Policy](https://opensource.google/documentation/policies/dotnet-support).
313+
308314
## Java {#java}
309315

310316
<table>

0 commit comments

Comments
 (0)