docs: Single value setter samples for Secret Manager and Workflows#3369
docs: Single value setter samples for Secret Manager and Workflows#3369amanda-tarafa merged 2 commits intogoogleapis:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3369 +/- ##
=======================================
Coverage 96.19% 96.19%
=======================================
Files 115 115
Lines 4573 4573
=======================================
Hits 4399 4399
Misses 174 174 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
908d705 to
67d10ae
Compare
|
This is the counterpart to googleapis/librarian#2263. Failure of this PR is expected until sidekick is updated here to a version that supports the setter sample generation flag. |
For SecretManager and Workflows.
67d10ae to
ab88be6
Compare
| /// # use wkt::Duration; | ||
| /// let x = Secret::new().set_or_clear_version_destroy_ttl(Some(Duration::default()/* use setters */)); |
There was a problem hiding this comment.
For a future pass: Duration is ambiguous, it may be std::time::Duration or wkt::Duration. We should make the # use wkt::Duration; visible.
There was a problem hiding this comment.
Noted, for Timestamp as well.
| /// # Example | ||
| /// ``` | ||
| /// # use google_cloud_secretmanager_v1::model::Secret; | ||
| /// # use wkt::Duration; |
There was a problem hiding this comment.
Separately: wkt is convenient to type, but makes the clients harder to grok, we should avoid these crate aliases (in a backwards compatible way).
| /// # use wkt::Timestamp; | ||
| /// let x = SecretVersion::new().set_create_time(Timestamp::default()/* use setters */); |
There was a problem hiding this comment.
Same comments as with Duration (I think).
| /// # Example | ||
| /// ``` | ||
| /// # use google_cloud_secretmanager_v1::model::AddSecretVersionRequest; | ||
| /// let x = AddSecretVersionRequest::new().set_parent("example"); |
There was a problem hiding this comment.
No action needed: I am sure you have thought about this: somewhere in the Protobuf specification there is information saying what is the format of this particular string. We should try to show that here.
There was a problem hiding this comment.
Yes, that's the last item to resolve, show resource names format for all samples. See #2696
No description provided.