Skip to content

Commit bc80666

Browse files
authored
fix(secretmanager)!: regenerate with EnableManagedRotationRequest changes (#9818)
Follow-up to #9817, which held back `google-cloud-secretmanager` with `skip_generate: true`. This PR removes `skip_generate` (and its `comment`) from `google-cloud-secretmanager` in `librarian.yaml` and regenerates the package with the googleapis commit already on main (`librarian generate google-cloud-secretmanager` + `librarian tidy`, librarian v0.51.0). Only `librarian.yaml` and 7 files under `packages/google-cloud-secretmanager/` change. The regeneration includes googleapis googleapis/googleapis@e99a085652: - `feat`: add top-level `CloudSqlSingleUserCredentials` message in `resources.proto`. - `fix!`: `EnableManagedRotationRequest` references the top-level `CloudSqlSingleUserCredentials` (the nested `CloudSQLSingleUserCredentials` message is removed), and `oneof credentials` is renamed to `oneof credential`. The field `cloud_sql_single_user_credentials` (number 2) and the message fields are unchanged, so the wire format and plain-object requests are unchanged. TypeScript code that names `EnableManagedRotationRequest.ICloudSQLSingleUserCredentials` or reads the `credentials` oneof property needs updating. The `!` in the title releases `@google-cloud/secret-manager` as a new major version (8.0.0). BREAKING CHANGE: `EnableManagedRotationRequest` now references the top-level `CloudSqlSingleUserCredentials` message, and its oneof `credentials` is renamed to `credential`. 🤖 _Opened by an AI agent on behalf of zhumin._
1 parent 3097189 commit bc80666

8 files changed

Lines changed: 161 additions & 166 deletions

File tree

‎librarian.yaml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,12 +1491,10 @@ libraries:
14911491
main_service: scheduler
14921492
- name: google-cloud-secretmanager
14931493
version: 7.2.0
1494-
comment: Generation is skipped temporarily so the EnableManagedRotationRequest change (oneof credentials renamed to credential, top-level CloudSqlSingleUserCredentials) is regenerated in a separate pull request, which removes skip_generate before the next release.
14951494
apis:
14961495
- path: google/cloud/secretmanager/v1
14971496
- path: google/cloud/secretmanager/v1beta2
14981497
copyright_year: "2026"
1499-
skip_generate: true
15001498
nodejs:
15011499
default_version: v1
15021500
dependencies:

‎packages/google-cloud-secretmanager/protos/google/cloud/secretmanager/v1/resources.proto‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,3 +575,17 @@ message SecretPayload {
575575
// https://cloud.google.com/apis/design/design_patterns#integer_types
576576
optional int64 data_crc32c = 2 [(google.api.field_behavior) = OPTIONAL];
577577
}
578+
579+
// These are the credentials required for Cloud SQL DB for Single user
580+
// Managed Rotation.
581+
message CloudSqlSingleUserCredentials {
582+
// Required. Instance ID of the Cloud SQL instance.
583+
string instance_id = 1 [(google.api.field_behavior) = REQUIRED];
584+
585+
// Required. Username of the Cloud SQL instance.
586+
string username = 2 [(google.api.field_behavior) = REQUIRED];
587+
588+
// Optional. Password of the Cloud SQL instance. If this is not provided,
589+
// a random password will be generated.
590+
string password = 3 [(google.api.field_behavior) = OPTIONAL];
591+
}

‎packages/google-cloud-secretmanager/protos/google/cloud/secretmanager/v1/service.proto‎

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -398,20 +398,6 @@ message AddSecretVersionRequest {
398398
// Request message for
399399
// [SecretManagerService.EnableManagedRotation][google.cloud.secretmanager.v1.SecretManagerService.EnableManagedRotation].
400400
message EnableManagedRotationRequest {
401-
// These are the credentials required for Cloud SQL DB for Single user
402-
// Managed Rotation.
403-
message CloudSQLSingleUserCredentials {
404-
// Required. Instance ID of the Cloud SQL instance.
405-
string instance_id = 1 [(google.api.field_behavior) = REQUIRED];
406-
407-
// Required. Username of the Cloud SQL instance.
408-
string username = 2 [(google.api.field_behavior) = REQUIRED];
409-
410-
// Optional. Password of the Cloud SQL instance. If this is not provided,
411-
// a random password will be generated.
412-
string password = 3 [(google.api.field_behavior) = OPTIONAL];
413-
}
414-
415401
// Required. The resource name of the
416402
// [Secret][google.cloud.secretmanager.v1.Secret] to associate with the
417403
// [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
@@ -423,11 +409,11 @@ message EnableManagedRotationRequest {
423409
}
424410
];
425411

426-
// The credentials required for Managed Rotation.
412+
// The credential required for Managed Rotation.
427413
// Right now, only Cloud SQL Single User credentials are supported.
428-
oneof credentials {
414+
oneof credential {
429415
// Credentials required for Cloud SQL DB for Single user Managed Rotation.
430-
CloudSQLSingleUserCredentials cloud_sql_single_user_credentials = 2;
416+
CloudSqlSingleUserCredentials cloud_sql_single_user_credentials = 2;
431417
}
432418
}
433419

‎packages/google-cloud-secretmanager/protos/protos.d.ts‎

Lines changed: 113 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,6 +1822,115 @@ export namespace google {
18221822
public static getTypeUrl(typeUrlPrefix?: string): string;
18231823
}
18241824

1825+
/** Properties of a CloudSqlSingleUserCredentials. */
1826+
interface ICloudSqlSingleUserCredentials {
1827+
1828+
/** CloudSqlSingleUserCredentials instanceId */
1829+
instanceId?: (string|null);
1830+
1831+
/** CloudSqlSingleUserCredentials username */
1832+
username?: (string|null);
1833+
1834+
/** CloudSqlSingleUserCredentials password */
1835+
password?: (string|null);
1836+
}
1837+
1838+
/** Represents a CloudSqlSingleUserCredentials. */
1839+
class CloudSqlSingleUserCredentials implements ICloudSqlSingleUserCredentials {
1840+
1841+
/**
1842+
* Constructs a new CloudSqlSingleUserCredentials.
1843+
* @param [properties] Properties to set
1844+
*/
1845+
constructor(properties?: google.cloud.secretmanager.v1.ICloudSqlSingleUserCredentials);
1846+
1847+
/** CloudSqlSingleUserCredentials instanceId. */
1848+
public instanceId: string;
1849+
1850+
/** CloudSqlSingleUserCredentials username. */
1851+
public username: string;
1852+
1853+
/** CloudSqlSingleUserCredentials password. */
1854+
public password: string;
1855+
1856+
/**
1857+
* Creates a new CloudSqlSingleUserCredentials instance using the specified properties.
1858+
* @param [properties] Properties to set
1859+
* @returns CloudSqlSingleUserCredentials instance
1860+
*/
1861+
public static create(properties?: google.cloud.secretmanager.v1.ICloudSqlSingleUserCredentials): google.cloud.secretmanager.v1.CloudSqlSingleUserCredentials;
1862+
1863+
/**
1864+
* Encodes the specified CloudSqlSingleUserCredentials message. Does not implicitly {@link google.cloud.secretmanager.v1.CloudSqlSingleUserCredentials.verify|verify} messages.
1865+
* @param message CloudSqlSingleUserCredentials message or plain object to encode
1866+
* @param [writer] Writer to encode to
1867+
* @returns Writer
1868+
*/
1869+
public static encode(message: google.cloud.secretmanager.v1.ICloudSqlSingleUserCredentials, writer?: $protobuf.Writer): $protobuf.Writer;
1870+
1871+
/**
1872+
* Encodes the specified CloudSqlSingleUserCredentials message, length delimited. Does not implicitly {@link google.cloud.secretmanager.v1.CloudSqlSingleUserCredentials.verify|verify} messages.
1873+
* @param message CloudSqlSingleUserCredentials message or plain object to encode
1874+
* @param [writer] Writer to encode to
1875+
* @returns Writer
1876+
*/
1877+
public static encodeDelimited(message: google.cloud.secretmanager.v1.ICloudSqlSingleUserCredentials, writer?: $protobuf.Writer): $protobuf.Writer;
1878+
1879+
/**
1880+
* Decodes a CloudSqlSingleUserCredentials message from the specified reader or buffer.
1881+
* @param reader Reader or buffer to decode from
1882+
* @param [length] Message length if known beforehand
1883+
* @returns CloudSqlSingleUserCredentials
1884+
* @throws {Error} If the payload is not a reader or valid buffer
1885+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
1886+
*/
1887+
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.secretmanager.v1.CloudSqlSingleUserCredentials;
1888+
1889+
/**
1890+
* Decodes a CloudSqlSingleUserCredentials message from the specified reader or buffer, length delimited.
1891+
* @param reader Reader or buffer to decode from
1892+
* @returns CloudSqlSingleUserCredentials
1893+
* @throws {Error} If the payload is not a reader or valid buffer
1894+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
1895+
*/
1896+
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.secretmanager.v1.CloudSqlSingleUserCredentials;
1897+
1898+
/**
1899+
* Verifies a CloudSqlSingleUserCredentials message.
1900+
* @param message Plain object to verify
1901+
* @returns `null` if valid, otherwise the reason why it is not
1902+
*/
1903+
public static verify(message: { [k: string]: any }): (string|null);
1904+
1905+
/**
1906+
* Creates a CloudSqlSingleUserCredentials message from a plain object. Also converts values to their respective internal types.
1907+
* @param object Plain object
1908+
* @returns CloudSqlSingleUserCredentials
1909+
*/
1910+
public static fromObject(object: { [k: string]: any }): google.cloud.secretmanager.v1.CloudSqlSingleUserCredentials;
1911+
1912+
/**
1913+
* Creates a plain object from a CloudSqlSingleUserCredentials message. Also converts values to other types if specified.
1914+
* @param message CloudSqlSingleUserCredentials
1915+
* @param [options] Conversion options
1916+
* @returns Plain object
1917+
*/
1918+
public static toObject(message: google.cloud.secretmanager.v1.CloudSqlSingleUserCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any };
1919+
1920+
/**
1921+
* Converts this CloudSqlSingleUserCredentials to JSON.
1922+
* @returns JSON object
1923+
*/
1924+
public toJSON(): { [k: string]: any };
1925+
1926+
/**
1927+
* Gets the default type url for CloudSqlSingleUserCredentials
1928+
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
1929+
* @returns The default type url
1930+
*/
1931+
public static getTypeUrl(typeUrlPrefix?: string): string;
1932+
}
1933+
18251934
/** Represents a SecretManagerService */
18261935
class SecretManagerService extends $protobuf.rpc.Service {
18271936

@@ -2646,7 +2755,7 @@ export namespace google {
26462755
parent?: (string|null);
26472756

26482757
/** EnableManagedRotationRequest cloudSqlSingleUserCredentials */
2649-
cloudSqlSingleUserCredentials?: (google.cloud.secretmanager.v1.EnableManagedRotationRequest.ICloudSQLSingleUserCredentials|null);
2758+
cloudSqlSingleUserCredentials?: (google.cloud.secretmanager.v1.ICloudSqlSingleUserCredentials|null);
26502759
}
26512760

26522761
/** Represents an EnableManagedRotationRequest. */
@@ -2662,10 +2771,10 @@ export namespace google {
26622771
public parent: string;
26632772

26642773
/** EnableManagedRotationRequest cloudSqlSingleUserCredentials. */
2665-
public cloudSqlSingleUserCredentials?: (google.cloud.secretmanager.v1.EnableManagedRotationRequest.ICloudSQLSingleUserCredentials|null);
2774+
public cloudSqlSingleUserCredentials?: (google.cloud.secretmanager.v1.ICloudSqlSingleUserCredentials|null);
26662775

2667-
/** EnableManagedRotationRequest credentials. */
2668-
public credentials?: "cloudSqlSingleUserCredentials";
2776+
/** EnableManagedRotationRequest credential. */
2777+
public credential?: "cloudSqlSingleUserCredentials";
26692778

26702779
/**
26712780
* Creates a new EnableManagedRotationRequest instance using the specified properties.
@@ -2745,118 +2854,6 @@ export namespace google {
27452854
public static getTypeUrl(typeUrlPrefix?: string): string;
27462855
}
27472856

2748-
namespace EnableManagedRotationRequest {
2749-
2750-
/** Properties of a CloudSQLSingleUserCredentials. */
2751-
interface ICloudSQLSingleUserCredentials {
2752-
2753-
/** CloudSQLSingleUserCredentials instanceId */
2754-
instanceId?: (string|null);
2755-
2756-
/** CloudSQLSingleUserCredentials username */
2757-
username?: (string|null);
2758-
2759-
/** CloudSQLSingleUserCredentials password */
2760-
password?: (string|null);
2761-
}
2762-
2763-
/** Represents a CloudSQLSingleUserCredentials. */
2764-
class CloudSQLSingleUserCredentials implements ICloudSQLSingleUserCredentials {
2765-
2766-
/**
2767-
* Constructs a new CloudSQLSingleUserCredentials.
2768-
* @param [properties] Properties to set
2769-
*/
2770-
constructor(properties?: google.cloud.secretmanager.v1.EnableManagedRotationRequest.ICloudSQLSingleUserCredentials);
2771-
2772-
/** CloudSQLSingleUserCredentials instanceId. */
2773-
public instanceId: string;
2774-
2775-
/** CloudSQLSingleUserCredentials username. */
2776-
public username: string;
2777-
2778-
/** CloudSQLSingleUserCredentials password. */
2779-
public password: string;
2780-
2781-
/**
2782-
* Creates a new CloudSQLSingleUserCredentials instance using the specified properties.
2783-
* @param [properties] Properties to set
2784-
* @returns CloudSQLSingleUserCredentials instance
2785-
*/
2786-
public static create(properties?: google.cloud.secretmanager.v1.EnableManagedRotationRequest.ICloudSQLSingleUserCredentials): google.cloud.secretmanager.v1.EnableManagedRotationRequest.CloudSQLSingleUserCredentials;
2787-
2788-
/**
2789-
* Encodes the specified CloudSQLSingleUserCredentials message. Does not implicitly {@link google.cloud.secretmanager.v1.EnableManagedRotationRequest.CloudSQLSingleUserCredentials.verify|verify} messages.
2790-
* @param message CloudSQLSingleUserCredentials message or plain object to encode
2791-
* @param [writer] Writer to encode to
2792-
* @returns Writer
2793-
*/
2794-
public static encode(message: google.cloud.secretmanager.v1.EnableManagedRotationRequest.ICloudSQLSingleUserCredentials, writer?: $protobuf.Writer): $protobuf.Writer;
2795-
2796-
/**
2797-
* Encodes the specified CloudSQLSingleUserCredentials message, length delimited. Does not implicitly {@link google.cloud.secretmanager.v1.EnableManagedRotationRequest.CloudSQLSingleUserCredentials.verify|verify} messages.
2798-
* @param message CloudSQLSingleUserCredentials message or plain object to encode
2799-
* @param [writer] Writer to encode to
2800-
* @returns Writer
2801-
*/
2802-
public static encodeDelimited(message: google.cloud.secretmanager.v1.EnableManagedRotationRequest.ICloudSQLSingleUserCredentials, writer?: $protobuf.Writer): $protobuf.Writer;
2803-
2804-
/**
2805-
* Decodes a CloudSQLSingleUserCredentials message from the specified reader or buffer.
2806-
* @param reader Reader or buffer to decode from
2807-
* @param [length] Message length if known beforehand
2808-
* @returns CloudSQLSingleUserCredentials
2809-
* @throws {Error} If the payload is not a reader or valid buffer
2810-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
2811-
*/
2812-
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.secretmanager.v1.EnableManagedRotationRequest.CloudSQLSingleUserCredentials;
2813-
2814-
/**
2815-
* Decodes a CloudSQLSingleUserCredentials message from the specified reader or buffer, length delimited.
2816-
* @param reader Reader or buffer to decode from
2817-
* @returns CloudSQLSingleUserCredentials
2818-
* @throws {Error} If the payload is not a reader or valid buffer
2819-
* @throws {$protobuf.util.ProtocolError} If required fields are missing
2820-
*/
2821-
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.secretmanager.v1.EnableManagedRotationRequest.CloudSQLSingleUserCredentials;
2822-
2823-
/**
2824-
* Verifies a CloudSQLSingleUserCredentials message.
2825-
* @param message Plain object to verify
2826-
* @returns `null` if valid, otherwise the reason why it is not
2827-
*/
2828-
public static verify(message: { [k: string]: any }): (string|null);
2829-
2830-
/**
2831-
* Creates a CloudSQLSingleUserCredentials message from a plain object. Also converts values to their respective internal types.
2832-
* @param object Plain object
2833-
* @returns CloudSQLSingleUserCredentials
2834-
*/
2835-
public static fromObject(object: { [k: string]: any }): google.cloud.secretmanager.v1.EnableManagedRotationRequest.CloudSQLSingleUserCredentials;
2836-
2837-
/**
2838-
* Creates a plain object from a CloudSQLSingleUserCredentials message. Also converts values to other types if specified.
2839-
* @param message CloudSQLSingleUserCredentials
2840-
* @param [options] Conversion options
2841-
* @returns Plain object
2842-
*/
2843-
public static toObject(message: google.cloud.secretmanager.v1.EnableManagedRotationRequest.CloudSQLSingleUserCredentials, options?: $protobuf.IConversionOptions): { [k: string]: any };
2844-
2845-
/**
2846-
* Converts this CloudSQLSingleUserCredentials to JSON.
2847-
* @returns JSON object
2848-
*/
2849-
public toJSON(): { [k: string]: any };
2850-
2851-
/**
2852-
* Gets the default type url for CloudSQLSingleUserCredentials
2853-
* @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2854-
* @returns The default type url
2855-
*/
2856-
public static getTypeUrl(typeUrlPrefix?: string): string;
2857-
}
2858-
}
2859-
28602857
/** Properties of a RotateSecretRequest. */
28612858
interface IRotateSecretRequest {
28622859

‎packages/google-cloud-secretmanager/protos/protos.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)