Skip to content

docs: Single value setter samples for Secret Manager and Workflows#3369

Merged
amanda-tarafa merged 2 commits intogoogleapis:mainfrom
amanda-tarafa:setter-samples
Sep 24, 2025
Merged

docs: Single value setter samples for Secret Manager and Workflows#3369
amanda-tarafa merged 2 commits intogoogleapis:mainfrom
amanda-tarafa:setter-samples

Conversation

@amanda-tarafa
Copy link
Copy Markdown
Collaborator

No description provided.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Sep 20, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.19%. Comparing base (2fbd614) to head (ab88be6).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@amanda-tarafa
Copy link
Copy Markdown
Collaborator Author

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.

Comment on lines +376 to +377
/// # use wkt::Duration;
/// let x = Secret::new().set_or_clear_version_destroy_ttl(Some(Duration::default()/* use setters */));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a future pass: Duration is ambiguous, it may be std::time::Duration or wkt::Duration. We should make the # use wkt::Duration; visible.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted, for Timestamp as well.

/// # Example
/// ```
/// # use google_cloud_secretmanager_v1::model::Secret;
/// # use wkt::Duration;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separately: wkt is convenient to type, but makes the clients harder to grok, we should avoid these crate aliases (in a backwards compatible way).

Comment on lines +642 to +643
/// # use wkt::Timestamp;
/// let x = SecretVersion::new().set_create_time(Timestamp::default()/* use setters */);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comments as with Duration (I think).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked.

/// # Example
/// ```
/// # use google_cloud_secretmanager_v1::model::AddSecretVersionRequest;
/// let x = AddSecretVersionRequest::new().set_parent("example");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the last item to resolve, show resource names format for all samples. See #2696

@amanda-tarafa amanda-tarafa marked this pull request as ready for review September 24, 2025 23:16
@amanda-tarafa amanda-tarafa requested a review from a team September 24, 2025 23:16
@amanda-tarafa amanda-tarafa merged commit 656cf0f into googleapis:main Sep 24, 2025
25 checks passed
@amanda-tarafa amanda-tarafa deleted the setter-samples branch September 24, 2025 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants