Skip to content

Commit 9e1450d

Browse files
authored
feat(sidekick/rust): change README for GA clients (#1889)
1 parent 9063240 commit 9e1450d

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

internal/sidekick/internal/rust/annotate.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ func (m *modelAnnotations) IsGaxiCrate() bool {
7474
return m.PackageName == "google-cloud-gax-internal"
7575
}
7676

77+
// ReleaseLevelIsGA returns true if the ReleaseLevel attribute indicates this
78+
// is a GA library.
79+
func (m *modelAnnotations) ReleaseLevelIsGA() bool {
80+
return m.ReleaseLevel == "GA"
81+
}
82+
7783
type serviceAnnotations struct {
7884
// The name of the service. The Rust naming conventions requires this to be
7985
// in `PascalCase`. Notably, names like `IAM` *must* become `Iam`, but

internal/sidekick/internal/rust/templates/common/README.md.mustache

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ limitations under the License.
1717

1818
<!-- Code generated by sidekick. DO NOT EDIT. -->
1919

20+
{{^Codec.ReleaseLevelIsGA}}
2021
**FEEDBACK WANTED:** We believe the APIs in this crate are stable, and
2122
do not anticipate any breaking changes are needed. We are looking for
2223
feedback before labeling the APIs "1.0". Changes (even breaking changes)
2324
are still possible, but not expected.
2425

2526
We also believe the implementation is ready for production, bugs are
2627
still possible, but not expected.
28+
{{/Codec.ReleaseLevelIsGA}}
2729
{{#Codec.Incomplete}}
2830

2931
**WARNING:** some RPCs have no corresponding Rust function to call them.
@@ -37,6 +39,14 @@ GitHub repository.
3739

3840
{{{.}}}
3941
{{/Description}}
42+
{{#Codec.ReleaseLevelIsGA}}
43+
44+
The client library types and functions are stable and not expected to change.
45+
Please note that Google Cloud services do change from time to time. The client
46+
libraries are designed to preserve backwards compatibility when the service
47+
changes in compatible ways. For example, adding RPCs, or fields to messages
48+
should not introduce breaking changes to the client libraries.
49+
{{/Codec.ReleaseLevelIsGA}}
4050
{{#Codec.HasServices}}
4151

4252
## Quickstart

internal/sidekick/internal/rust/templates/crate/src/lib.rs.mustache

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ limitations under the License.
1919
{{/Codec.BoilerPlate}}
2020

2121
//! Google Cloud Client Libraries for Rust - {{{Title}}}
22+
//! {{^Codec.ReleaseLevelIsGA}}
2223
//!
2324
//! **FEEDBACK WANTED:** We believe the APIs in this crate are stable, and
2425
//! do not anticipate any breaking changes are needed. We are looking for
@@ -27,6 +28,7 @@ limitations under the License.
2728
//!
2829
//! We also believe the implementation is ready for production, bugs are
2930
//! still possible, but not expected.
31+
//! {{/Codec.ReleaseLevelIsGA}}
3032
//! {{#Codec.Incomplete}}
3133
//!
3234
//! **WARNING:** some RPCs have no corresponding Rust function to call them.
@@ -39,7 +41,16 @@ limitations under the License.
3941
//!
4042
//! This crate contains traits, types, and functions to interact with {{{Title}}}
4143
//! Most applications will use the structs defined in the [client] module.
42-
//! More specifically:
44+
//! {{#Codec.ReleaseLevelIsGA}}
45+
//!
46+
//! The client library types and functions are stable and not expected to change.
47+
//! Please note that Google Cloud services do change from time to time. The client
48+
//! libraries are designed to preserve backwards compatibility when the service
49+
//! changes in compatible ways. For example, adding RPCs, or fields to messages
50+
//! should not introduce breaking changes to the client libraries.
51+
//! {{/Codec.ReleaseLevelIsGA}}
52+
//!
53+
//! # Available Clients
4354
//!
4455
{{#Codec.Services}}
4556
//! * [{{Codec.Name}}](client/struct.{{Codec.Name}}.html)

0 commit comments

Comments
 (0)