Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(generator): regenerate golden files post merge #163

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 31 additions & 27 deletions generator/testdata/rust/gclient/golden/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ impl SecretManagerService {
/// Lists [Secrets][google.cloud.secretmanager.v1.Secret].
pub async fn list_secrets(
&self,
req: model::ListSecretsRequest,
) -> Result<model::ListSecretsResponse, Box<dyn std::error::Error>> {
req: crate::model::ListSecretsRequest,
) -> Result<crate::model::ListSecretsResponse, Box<dyn std::error::Error>> {
let query_parameters = [
gax::query_parameter::format("pageSize", &req.page_size)?,
gax::query_parameter::format("pageToken", &req.page_token)?,
Expand All @@ -85,7 +85,7 @@ impl SecretManagerService {
"sorry the api you are looking for is not available, please try again".into(),
);
}
let response = res.json::<model::ListSecretsResponse>().await?;
let response = res.json::<crate::model::ListSecretsResponse>().await?;
Ok(response)
}

Expand Down Expand Up @@ -125,8 +125,8 @@ impl SecretManagerService {
/// [Secret][google.cloud.secretmanager.v1.Secret].
pub async fn add_secret_version(
&self,
req: model::AddSecretVersionRequest,
) -> Result<model::SecretVersion, Box<dyn std::error::Error>> {
req: crate::model::AddSecretVersionRequest,
) -> Result<crate::model::SecretVersion, Box<dyn std::error::Error>> {
let query_parameters = [None::<(&str, String)>; 0];
let client = self.client.inner.clone();
let res = client
Expand All @@ -148,7 +148,7 @@ impl SecretManagerService {
"sorry the api you are looking for is not available, please try again".into(),
);
}
let response = res.json::<model::SecretVersion>().await?;
let response = res.json::<crate::model::SecretVersion>().await?;
Ok(response)
}

Expand Down Expand Up @@ -185,8 +185,8 @@ impl SecretManagerService {
/// [Secret][google.cloud.secretmanager.v1.Secret].
pub async fn update_secret(
&self,
req: model::UpdateSecretRequest,
) -> Result<model::Secret, Box<dyn std::error::Error>> {
req: crate::model::UpdateSecretRequest,
) -> Result<crate::model::Secret, Box<dyn std::error::Error>> {
let query_parameters = [gax::query_parameter::format(
"updateMask",
&req.update_mask,
Expand Down Expand Up @@ -215,16 +215,16 @@ impl SecretManagerService {
"sorry the api you are looking for is not available, please try again".into(),
);
}
let response = res.json::<model::Secret>().await?;
let response = res.json::<crate::model::Secret>().await?;
Ok(response)
}

/// Lists [SecretVersions][google.cloud.secretmanager.v1.SecretVersion]. This
/// call does not return secret data.
pub async fn list_secret_versions(
&self,
req: model::ListSecretVersionsRequest,
) -> Result<model::ListSecretVersionsResponse, Box<dyn std::error::Error>> {
req: crate::model::ListSecretVersionsRequest,
) -> Result<crate::model::ListSecretVersionsResponse, Box<dyn std::error::Error>> {
let query_parameters = [
gax::query_parameter::format("pageSize", &req.page_size)?,
gax::query_parameter::format("pageToken", &req.page_token)?,
Expand All @@ -249,7 +249,9 @@ impl SecretManagerService {
"sorry the api you are looking for is not available, please try again".into(),
);
}
let response = res.json::<model::ListSecretVersionsResponse>().await?;
let response = res
.json::<crate::model::ListSecretVersionsResponse>()
.await?;
Ok(response)
}

Expand All @@ -260,8 +262,8 @@ impl SecretManagerService {
/// created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
pub async fn get_secret_version(
&self,
req: model::GetSecretVersionRequest,
) -> Result<model::SecretVersion, Box<dyn std::error::Error>> {
req: crate::model::GetSecretVersionRequest,
) -> Result<crate::model::SecretVersion, Box<dyn std::error::Error>> {
let query_parameters = [None::<(&str, String)>; 0];
let client = self.client.inner.clone();
let res = client
Expand All @@ -282,7 +284,7 @@ impl SecretManagerService {
"sorry the api you are looking for is not available, please try again".into(),
);
}
let response = res.json::<model::SecretVersion>().await?;
let response = res.json::<crate::model::SecretVersion>().await?;
Ok(response)
}

Expand All @@ -293,8 +295,8 @@ impl SecretManagerService {
/// created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
pub async fn access_secret_version(
&self,
req: model::AccessSecretVersionRequest,
) -> Result<model::AccessSecretVersionResponse, Box<dyn std::error::Error>> {
req: crate::model::AccessSecretVersionRequest,
) -> Result<crate::model::AccessSecretVersionResponse, Box<dyn std::error::Error>> {
let query_parameters = [None::<(&str, String)>; 0];
let client = self.client.inner.clone();
let res = client
Expand All @@ -315,7 +317,9 @@ impl SecretManagerService {
"sorry the api you are looking for is not available, please try again".into(),
);
}
let response = res.json::<model::AccessSecretVersionResponse>().await?;
let response = res
.json::<crate::model::AccessSecretVersionResponse>()
.await?;
Ok(response)
}

Expand All @@ -326,8 +330,8 @@ impl SecretManagerService {
/// [DISABLED][google.cloud.secretmanager.v1.SecretVersion.State.DISABLED].
pub async fn disable_secret_version(
&self,
req: model::DisableSecretVersionRequest,
) -> Result<model::SecretVersion, Box<dyn std::error::Error>> {
req: crate::model::DisableSecretVersionRequest,
) -> Result<crate::model::SecretVersion, Box<dyn std::error::Error>> {
let query_parameters = [None::<(&str, String)>; 0];
let client = self.client.inner.clone();
let res = client
Expand All @@ -349,7 +353,7 @@ impl SecretManagerService {
"sorry the api you are looking for is not available, please try again".into(),
);
}
let response = res.json::<model::SecretVersion>().await?;
let response = res.json::<crate::model::SecretVersion>().await?;
Ok(response)
}

Expand All @@ -360,8 +364,8 @@ impl SecretManagerService {
/// [ENABLED][google.cloud.secretmanager.v1.SecretVersion.State.ENABLED].
pub async fn enable_secret_version(
&self,
req: model::EnableSecretVersionRequest,
) -> Result<model::SecretVersion, Box<dyn std::error::Error>> {
req: crate::model::EnableSecretVersionRequest,
) -> Result<crate::model::SecretVersion, Box<dyn std::error::Error>> {
let query_parameters = [None::<(&str, String)>; 0];
let client = self.client.inner.clone();
let res = client
Expand All @@ -383,7 +387,7 @@ impl SecretManagerService {
"sorry the api you are looking for is not available, please try again".into(),
);
}
let response = res.json::<model::SecretVersion>().await?;
let response = res.json::<crate::model::SecretVersion>().await?;
Ok(response)
}

Expand All @@ -395,8 +399,8 @@ impl SecretManagerService {
/// and irrevocably destroys the secret data.
pub async fn destroy_secret_version(
&self,
req: model::DestroySecretVersionRequest,
) -> Result<model::SecretVersion, Box<dyn std::error::Error>> {
req: crate::model::DestroySecretVersionRequest,
) -> Result<crate::model::SecretVersion, Box<dyn std::error::Error>> {
let query_parameters = [None::<(&str, String)>; 0];
let client = self.client.inner.clone();
let res = client
Expand All @@ -418,7 +422,7 @@ impl SecretManagerService {
"sorry the api you are looking for is not available, please try again".into(),
);
}
let response = res.json::<model::SecretVersion>().await?;
let response = res.json::<crate::model::SecretVersion>().await?;
Ok(response)
}
}
Loading