From f2f2d22cf7dc6904306ca941ef8c6994a573a383 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 31 Jan 2024 00:24:14 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2388) --- .../v1/accesscontextmanager-api.json | 8 +- .../v1/accesscontextmanager-gen.go | 14 +- alertcenter/v1beta1/alertcenter-api.json | 37 +- alertcenter/v1beta1/alertcenter-gen.go | 47 + .../v1/cloudresourcemanager-api.json | 4 +- .../v1/cloudresourcemanager-gen.go | 6 +- .../v1beta1/cloudresourcemanager-api.json | 4 +- .../v1beta1/cloudresourcemanager-gen.go | 6 +- .../v2/cloudresourcemanager-api.json | 4 +- .../v2/cloudresourcemanager-gen.go | 6 +- .../v2beta1/cloudresourcemanager-api.json | 4 +- .../v2beta1/cloudresourcemanager-gen.go | 6 +- .../v3/cloudresourcemanager-api.json | 4 +- .../v3/cloudresourcemanager-gen.go | 6 +- cloudsupport/v2beta/cloudsupport-api.json | 22 +- cloudsupport/v2beta/cloudsupport-gen.go | 41 + dataform/v1beta1/dataform-api.json | 6 +- dataform/v1beta1/dataform-gen.go | 12 +- metastore/v1/metastore-api.json | 4 +- metastore/v1/metastore-gen.go | 6 +- metastore/v1alpha/metastore-api.json | 4 +- metastore/v1alpha/metastore-gen.go | 6 +- metastore/v1beta/metastore-api.json | 4 +- metastore/v1beta/metastore-gen.go | 6 +- pubsub/v1/pubsub-api.json | 90 +- pubsub/v1/pubsub-gen.go | 183 +- pubsub/v1beta2/pubsub-api.json | 4 +- pubsub/v1beta2/pubsub-gen.go | 6 +- secretmanager/v1/secretmanager-api.json | 495 +++- secretmanager/v1/secretmanager-gen.go | 2567 ++++++++++++++++- secretmanager/v1beta1/secretmanager-api.json | 4 +- secretmanager/v1beta1/secretmanager-gen.go | 6 +- sqladmin/v1/sqladmin-api.json | 7 +- sqladmin/v1/sqladmin-gen.go | 14 +- sqladmin/v1beta4/sqladmin-api.json | 7 +- sqladmin/v1beta4/sqladmin-gen.go | 14 +- workloadmanager/v1/workloadmanager-api.json | 13 +- workloadmanager/v1/workloadmanager-gen.go | 6 + 38 files changed, 3486 insertions(+), 197 deletions(-) diff --git a/accesscontextmanager/v1/accesscontextmanager-api.json b/accesscontextmanager/v1/accesscontextmanager-api.json index 6385b391bfa..8c513180db5 100644 --- a/accesscontextmanager/v1/accesscontextmanager-api.json +++ b/accesscontextmanager/v1/accesscontextmanager-api.json @@ -1290,7 +1290,7 @@ } } }, - "revision": "20240102", + "revision": "20240126", "rootUrl": "https://accesscontextmanager.googleapis.com/", "schemas": { "AccessContextManagerOperationMetadata": { @@ -1522,7 +1522,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, @@ -1689,7 +1689,7 @@ "id": "EgressFrom", "properties": { "identities": { - "description": "A list of identities that are allowed access through this [EgressPolicy]. Should be in the format of email address. The email address should represent individual user or service account only.", + "description": "A list of identities that are allowed access through this [EgressPolicy], in the format of `user:{email_id}` or `serviceAccount:{email_id}`.", "items": { "type": "string" }, @@ -1881,7 +1881,7 @@ "id": "IngressFrom", "properties": { "identities": { - "description": "A list of identities that are allowed access through this ingress policy. Should be in the format of email address. The email address should represent individual user or service account only.", + "description": "A list of identities that are allowed access through this ingress policy, in the format of `user:{email_id}` or `serviceAccount:{email_id}`.", "items": { "type": "string" }, diff --git a/accesscontextmanager/v1/accesscontextmanager-gen.go b/accesscontextmanager/v1/accesscontextmanager-gen.go index bae46d54255..d4f43d664b5 100644 --- a/accesscontextmanager/v1/accesscontextmanager-gen.go +++ b/accesscontextmanager/v1/accesscontextmanager-gen.go @@ -714,7 +714,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to @@ -1003,8 +1007,8 @@ func (s *DevicePolicy) MarshalJSON() ([]byte, error) { // succeed. type EgressFrom struct { // Identities: A list of identities that are allowed access through this - // [EgressPolicy]. Should be in the format of email address. The email - // address should represent individual user or service account only. + // [EgressPolicy], in the format of `user:{email_id}` or + // `serviceAccount:{email_id}`. Identities []string `json:"identities,omitempty"` // IdentityType: Specifies the type of identities that are allowed @@ -1416,8 +1420,8 @@ func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) { // `sources` AND identity related fields in order to match. type IngressFrom struct { // Identities: A list of identities that are allowed access through this - // ingress policy. Should be in the format of email address. The email - // address should represent individual user or service account only. + // ingress policy, in the format of `user:{email_id}` or + // `serviceAccount:{email_id}`. Identities []string `json:"identities,omitempty"` // IdentityType: Specifies the type of identities that are allowed diff --git a/alertcenter/v1beta1/alertcenter-api.json b/alertcenter/v1beta1/alertcenter-api.json index b804c74d3f5..9658439983a 100644 --- a/alertcenter/v1beta1/alertcenter-api.json +++ b/alertcenter/v1beta1/alertcenter-api.json @@ -423,7 +423,7 @@ } } }, - "revision": "20230904", + "revision": "20240129", "rootUrl": "https://alertcenter.googleapis.com/", "schemas": { "AbuseDetected": { @@ -1157,6 +1157,41 @@ }, "type": "object" }, + "DeviceManagementRule": { + "description": "Alerts from Device Management Rules configured by Admin.", + "id": "DeviceManagementRule", + "properties": { + "deviceId": { + "description": "Required. The device ID.", + "type": "string" + }, + "deviceModel": { + "description": "The model of the device.", + "type": "string" + }, + "deviceType": { + "description": "The type of the device.", + "type": "string" + }, + "email": { + "description": "The email of the user this alert was created for.", + "type": "string" + }, + "iosVendorId": { + "description": "Required for iOS, empty for others.", + "type": "string" + }, + "resourceId": { + "description": "The device resource ID.", + "type": "string" + }, + "serialNumber": { + "description": "The serial number of the device.", + "type": "string" + } + }, + "type": "object" + }, "DlpRuleViolation": { "description": "Alerts that get triggered on violations of Data Loss Prevention (DLP) rules.", "id": "DlpRuleViolation", diff --git a/alertcenter/v1beta1/alertcenter-gen.go b/alertcenter/v1beta1/alertcenter-gen.go index d028f004586..86f7bd4157c 100644 --- a/alertcenter/v1beta1/alertcenter-gen.go +++ b/alertcenter/v1beta1/alertcenter-gen.go @@ -1282,6 +1282,53 @@ func (s *DeviceCompromisedSecurityDetail) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DeviceManagementRule: Alerts from Device Management Rules configured +// by Admin. +type DeviceManagementRule struct { + // DeviceId: Required. The device ID. + DeviceId string `json:"deviceId,omitempty"` + + // DeviceModel: The model of the device. + DeviceModel string `json:"deviceModel,omitempty"` + + // DeviceType: The type of the device. + DeviceType string `json:"deviceType,omitempty"` + + // Email: The email of the user this alert was created for. + Email string `json:"email,omitempty"` + + // IosVendorId: Required for iOS, empty for others. + IosVendorId string `json:"iosVendorId,omitempty"` + + // ResourceId: The device resource ID. + ResourceId string `json:"resourceId,omitempty"` + + // SerialNumber: The serial number of the device. + SerialNumber string `json:"serialNumber,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DeviceManagementRule) MarshalJSON() ([]byte, error) { + type NoMethod DeviceManagementRule + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // DlpRuleViolation: Alerts that get triggered on violations of Data // Loss Prevention (DLP) rules. type DlpRuleViolation struct { diff --git a/cloudresourcemanager/v1/cloudresourcemanager-api.json b/cloudresourcemanager/v1/cloudresourcemanager-api.json index 7dd2b85fe52..ad3bc08bf2e 100644 --- a/cloudresourcemanager/v1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v1/cloudresourcemanager-api.json @@ -1171,7 +1171,7 @@ } } }, - "revision": "20240109", + "revision": "20240128", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -1249,7 +1249,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/cloudresourcemanager/v1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1/cloudresourcemanager-gen.go index 6495a544a45..dc4717a78b2 100644 --- a/cloudresourcemanager/v1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1/cloudresourcemanager-gen.go @@ -427,7 +427,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json index 08a1e5a56c8..c69e31675bc 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-api.json @@ -568,7 +568,7 @@ } } }, - "revision": "20240109", + "revision": "20240128", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "Ancestor": { @@ -646,7 +646,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go index 3b7a82f802f..0da819572f5 100644 --- a/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v1beta1/cloudresourcemanager-gen.go @@ -391,7 +391,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/cloudresourcemanager/v2/cloudresourcemanager-api.json b/cloudresourcemanager/v2/cloudresourcemanager-api.json index b699c26f6ec..f25726bcd73 100644 --- a/cloudresourcemanager/v2/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v2/cloudresourcemanager-api.json @@ -450,7 +450,7 @@ } } }, - "revision": "20240109", + "revision": "20240128", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -517,7 +517,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/cloudresourcemanager/v2/cloudresourcemanager-gen.go b/cloudresourcemanager/v2/cloudresourcemanager-gen.go index 51dafc24bc6..d4d081186bf 100644 --- a/cloudresourcemanager/v2/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v2/cloudresourcemanager-gen.go @@ -363,7 +363,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json b/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json index 8184603285b..803bbfe9237 100644 --- a/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v2beta1/cloudresourcemanager-api.json @@ -450,7 +450,7 @@ } } }, - "revision": "20240109", + "revision": "20240128", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -517,7 +517,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go b/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go index 71db549d5f6..91e9cbdcaab 100644 --- a/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v2beta1/cloudresourcemanager-gen.go @@ -363,7 +363,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/cloudresourcemanager/v3/cloudresourcemanager-api.json b/cloudresourcemanager/v3/cloudresourcemanager-api.json index 998f3bd8d59..603fb32be42 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-api.json +++ b/cloudresourcemanager/v3/cloudresourcemanager-api.json @@ -1805,7 +1805,7 @@ } } }, - "revision": "20240109", + "revision": "20240128", "rootUrl": "https://cloudresourcemanager.googleapis.com/", "schemas": { "AuditConfig": { @@ -1872,7 +1872,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/cloudresourcemanager/v3/cloudresourcemanager-gen.go b/cloudresourcemanager/v3/cloudresourcemanager-gen.go index 9ff6796ea84..1dacbd7c332 100644 --- a/cloudresourcemanager/v3/cloudresourcemanager-gen.go +++ b/cloudresourcemanager/v3/cloudresourcemanager-gen.go @@ -459,7 +459,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/cloudsupport/v2beta/cloudsupport-api.json b/cloudsupport/v2beta/cloudsupport-api.json index 0a39e2cf1f3..95eb4e57001 100644 --- a/cloudsupport/v2beta/cloudsupport-api.json +++ b/cloudsupport/v2beta/cloudsupport-api.json @@ -125,6 +125,26 @@ "location": "query", "type": "string" }, + "product.productLine": { + "description": "The Product Line of the Product.", + "enum": [ + "PRODUCT_LINE_UNSPECIFIED", + "GOOGLE_CLOUD", + "GOOGLE_MAPS" + ], + "enumDescriptions": [ + "Unknown product type.", + "Google Cloud", + "Google Maps" + ], + "location": "query", + "type": "string" + }, + "product.productSubline": { + "description": "The Product Subline of the Product, such as \"Maps Billing\".", + "location": "query", + "type": "string" + }, "query": { "description": "An expression used to filter case classifications. If it's an empty string, then no filtering happens. Otherwise, case classifications will be returned that match the filter.", "location": "query", @@ -563,7 +583,7 @@ } } }, - "revision": "20240120", + "revision": "20240129", "rootUrl": "https://cloudsupport.googleapis.com/", "schemas": { "Actor": { diff --git a/cloudsupport/v2beta/cloudsupport-gen.go b/cloudsupport/v2beta/cloudsupport-gen.go index aab34163885..646caafb65d 100644 --- a/cloudsupport/v2beta/cloudsupport-gen.go +++ b/cloudsupport/v2beta/cloudsupport-gen.go @@ -1553,6 +1553,27 @@ func (c *CaseClassificationsSearchCall) PageToken(pageToken string) *CaseClassif return c } +// ProductProductLine sets the optional parameter "product.productLine": +// The Product Line of the Product. +// +// Possible values: +// +// "PRODUCT_LINE_UNSPECIFIED" - Unknown product type. +// "GOOGLE_CLOUD" - Google Cloud +// "GOOGLE_MAPS" - Google Maps +func (c *CaseClassificationsSearchCall) ProductProductLine(productProductLine string) *CaseClassificationsSearchCall { + c.urlParams_.Set("product.productLine", productProductLine) + return c +} + +// ProductProductSubline sets the optional parameter +// "product.productSubline": The Product Subline of the Product, such as +// "Maps Billing". +func (c *CaseClassificationsSearchCall) ProductProductSubline(productProductSubline string) *CaseClassificationsSearchCall { + c.urlParams_.Set("product.productSubline", productProductSubline) + return c +} + // Query sets the optional parameter "query": An expression used to // filter case classifications. If it's an empty string, then no // filtering happens. Otherwise, case classifications will be returned @@ -1676,6 +1697,26 @@ func (c *CaseClassificationsSearchCall) Do(opts ...googleapi.CallOption) (*Searc // "location": "query", // "type": "string" // }, + // "product.productLine": { + // "description": "The Product Line of the Product.", + // "enum": [ + // "PRODUCT_LINE_UNSPECIFIED", + // "GOOGLE_CLOUD", + // "GOOGLE_MAPS" + // ], + // "enumDescriptions": [ + // "Unknown product type.", + // "Google Cloud", + // "Google Maps" + // ], + // "location": "query", + // "type": "string" + // }, + // "product.productSubline": { + // "description": "The Product Subline of the Product, such as \"Maps Billing\".", + // "location": "query", + // "type": "string" + // }, // "query": { // "description": "An expression used to filter case classifications. If it's an empty string, then no filtering happens. Otherwise, case classifications will be returned that match the filter.", // "location": "query", diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index 480e0b91457..a22ce943585 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -2103,7 +2103,7 @@ } } }, - "revision": "20240121", + "revision": "20240127", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { @@ -2406,7 +2406,7 @@ "type": "string" }, "releaseConfig": { - "description": "Immutable. The name of the release config to compile. The release config's 'current_compilation_result' field will be updated to this compilation result. Must be in the format `projects/*/locations/*/repositories/*/releaseConfigs/*`.", + "description": "Immutable. The name of the release config to compile. Must be in the format `projects/*/locations/*/repositories/*/releaseConfigs/*`.", "type": "string" }, "resolvedGitCommitSha": { @@ -3444,7 +3444,7 @@ "type": "array" }, "releaseCompilationResult": { - "description": "Optional. The name of the currently released compilation result for this release config. This value is updated when a compilation result is created from this release config, or when this resource is updated by API call (perhaps to roll back to an earlier release). The compilation result must have been created using this release config. Must be in the format `projects/*/locations/*/repositories/*/compilationResults/*`.", + "description": "Optional. The name of the currently released compilation result for this release config. This value is updated when a compilation result is automatically created from this release config (using cron_schedule), or when this resource is updated by API call (perhaps to roll back to an earlier release). The compilation result must have been created using this release config. Must be in the format `projects/*/locations/*/repositories/*/compilationResults/*`.", "type": "string" }, "timeZone": { diff --git a/dataform/v1beta1/dataform-gen.go b/dataform/v1beta1/dataform-gen.go index 6e9870c0518..dfb0ecde0d1 100644 --- a/dataform/v1beta1/dataform-gen.go +++ b/dataform/v1beta1/dataform-gen.go @@ -790,8 +790,7 @@ type CompilationResult struct { Name string `json:"name,omitempty"` // ReleaseConfig: Immutable. The name of the release config to compile. - // The release config's 'current_compilation_result' field will be - // updated to this compilation result. Must be in the format + // Must be in the format // `projects/*/locations/*/repositories/*/releaseConfigs/*`. ReleaseConfig string `json:"releaseConfig,omitempty"` @@ -2629,10 +2628,11 @@ type ReleaseConfig struct { // ReleaseCompilationResult: Optional. The name of the currently // released compilation result for this release config. This value is - // updated when a compilation result is created from this release - // config, or when this resource is updated by API call (perhaps to roll - // back to an earlier release). The compilation result must have been - // created using this release config. Must be in the format + // updated when a compilation result is automatically created from this + // release config (using cron_schedule), or when this resource is + // updated by API call (perhaps to roll back to an earlier release). The + // compilation result must have been created using this release config. + // Must be in the format // `projects/*/locations/*/repositories/*/compilationResults/*`. ReleaseCompilationResult string `json:"releaseCompilationResult,omitempty"` diff --git a/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json index 7577b420341..47445a176e7 100644 --- a/metastore/v1/metastore-api.json +++ b/metastore/v1/metastore-api.json @@ -1367,7 +1367,7 @@ } } }, - "revision": "20240111", + "revision": "20240123", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1587,7 +1587,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.", + "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.For an overview of the IAM roles and permissions, see the IAM documentation (https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see here (https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index dd9920ae62d..809ad5bcdd5 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -646,7 +646,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of members, or principals. - // For example, roles/viewer, roles/editor, or roles/owner. + // For example, roles/viewer, roles/editor, or roles/owner.For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/metastore/v1alpha/metastore-api.json b/metastore/v1alpha/metastore-api.json index c9d6159f237..0021a819873 100644 --- a/metastore/v1alpha/metastore-api.json +++ b/metastore/v1alpha/metastore-api.json @@ -1607,7 +1607,7 @@ } } }, - "revision": "20240111", + "revision": "20240123", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1829,7 +1829,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.", + "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.For an overview of the IAM roles and permissions, see the IAM documentation (https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see here (https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index 1fdaec07751..83b3329477e 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -671,7 +671,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of members, or principals. - // For example, roles/viewer, roles/editor, or roles/owner. + // For example, roles/viewer, roles/editor, or roles/owner.For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/metastore/v1beta/metastore-api.json b/metastore/v1beta/metastore-api.json index eb545bcffa3..9bcdf6ab28f 100644 --- a/metastore/v1beta/metastore-api.json +++ b/metastore/v1beta/metastore-api.json @@ -1607,7 +1607,7 @@ } } }, - "revision": "20240111", + "revision": "20240123", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -1829,7 +1829,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.", + "description": "Role that is assigned to the list of members, or principals. For example, roles/viewer, roles/editor, or roles/owner.For an overview of the IAM roles and permissions, see the IAM documentation (https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see here (https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index 2856990673b..98ee72a97c0 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -671,7 +671,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of members, or principals. - // For example, roles/viewer, roles/editor, or roles/owner. + // For example, roles/viewer, roles/editor, or roles/owner.For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/pubsub/v1/pubsub-api.json b/pubsub/v1/pubsub-api.json index 4e215cce112..cca8c46ea94 100644 --- a/pubsub/v1/pubsub-api.json +++ b/pubsub/v1/pubsub-api.json @@ -716,7 +716,7 @@ ] }, "patch": { - "description": "Updates an existing snapshot. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.", + "description": "Updates an existing snapshot by updating the fields specified in the update mask. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.", "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", "httpMethod": "PATCH", "id": "pubsub.projects.snapshots.patch", @@ -1070,7 +1070,7 @@ ] }, "patch": { - "description": "Updates an existing subscription. Note that certain properties of a subscription, such as its topic, are not modifiable.", + "description": "Updates an existing subscription by updating the fields specified in the update mask. Note that certain properties of a subscription, such as its topic, are not modifiable.", "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", "httpMethod": "PATCH", "id": "pubsub.projects.subscriptions.patch", @@ -1369,7 +1369,7 @@ ] }, "patch": { - "description": "Updates an existing topic. Note that certain properties of a topic are not modifiable.", + "description": "Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable.", "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", "httpMethod": "PATCH", "id": "pubsub.projects.topics.patch", @@ -1573,7 +1573,7 @@ } } }, - "revision": "20231212", + "revision": "20240126", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -1601,6 +1601,50 @@ }, "type": "object" }, + "AwsKinesis": { + "description": "Ingestion settings for Amazon Kinesis Data Streams.", + "id": "AwsKinesis", + "properties": { + "awsRoleArn": { + "description": "Required. AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.", + "type": "string" + }, + "consumerArn": { + "description": "Required. The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.", + "type": "string" + }, + "gcpServiceAccount": { + "description": "Required. The GCP service account to be used for Federated Identity authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for the provided role). The `aws_role_arn` must be set up with `accounts.google.com:sub` equals to this service account number.", + "type": "string" + }, + "state": { + "description": "Output only. An output-only field that indicates the state of the Kinesis ingestion source.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "KINESIS_PERMISSION_DENIED", + "PUBLISH_PERMISSION_DENIED", + "STREAM_NOT_FOUND", + "CONSUMER_NOT_FOUND" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "Ingestion is active.", + "Permission denied encountered while consuming data from Kinesis. This can happen if: - The provided `aws_role_arn` does not exist or does not have the appropriate permissions attached. - The provided `aws_role_arn` is not set up properly for Identity Federation using `gcp_service_account`. - The Pub/Sub SA is not granted the `iam.serviceAccounts.getOpenIdToken` permission on `gcp_service_account`.", + "Permission denied encountered while publishing to the topic. This can happen due to Pub/Sub SA has not been granted the [appropriate publish permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)", + "The Kinesis stream does not exist.", + "The Kinesis consumer does not exist." + ], + "readOnly": true, + "type": "string" + }, + "streamArn": { + "description": "Required. The Kinesis stream ARN to ingest data from.", + "type": "string" + } + }, + "type": "object" + }, "BigQueryConfig": { "description": "Configuration for a BigQuery subscription.", "id": "BigQueryConfig", @@ -1665,7 +1709,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, @@ -1819,6 +1863,17 @@ }, "type": "object" }, + "IngestionDataSourceSettings": { + "description": "Settings for an ingestion data source on a topic.", + "id": "IngestionDataSourceSettings", + "properties": { + "awsKinesis": { + "$ref": "AwsKinesis", + "description": "Optional. Amazon Kinesis Data Streams." + } + }, + "type": "object" + }, "ListSchemaRevisionsResponse": { "description": "Response for the `ListSchemaRevisions` method.", "id": "ListSchemaRevisionsResponse", @@ -1968,7 +2023,7 @@ "id": "ModifyAckDeadlineRequest", "properties": { "ackDeadlineSeconds": { - "description": "Required. The new ack deadline with respect to the time this request was sent to the Pub/Sub system. For example, if the value is 10, the new ack deadline will expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero might immediately make the message available for delivery to another subscriber client. This typically results in an increase in the rate of message redeliveries (that is, duplicates). The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify is 600 seconds (10 minutes).", + "description": "Required. The new ack deadline with respect to the time this request was sent to the Pub/Sub system. For example, if the value is 10, the new ack deadline will expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero might immediately make the message available for delivery to another subscriber client. This typically results in an increase in the rate of message redeliveries (that is, duplicates). The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify in a single request is 600 seconds (10 minutes).", "format": "int32", "type": "integer" }, @@ -2088,7 +2143,7 @@ "type": "string" }, "messageId": { - "description": "Optional. ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.", + "description": "ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.", "type": "string" }, "orderingKey": { @@ -2096,7 +2151,7 @@ "type": "string" }, "publishTime": { - "description": "Optional. The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.", + "description": "The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.", "format": "google-datetime", "type": "string" } @@ -2486,6 +2541,10 @@ "description": "A topic resource.", "id": "Topic", "properties": { + "ingestionDataSourceSettings": { + "$ref": "IngestionDataSourceSettings", + "description": "Optional. Settings for managed ingestion from a data source into this topic." + }, "kmsKeyName": { "description": "Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", "type": "string" @@ -2517,6 +2576,21 @@ "schemaSettings": { "$ref": "SchemaSettings", "description": "Optional. Settings for validating messages published against a schema." + }, + "state": { + "description": "Output only. An output-only field indicating the state of the topic.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "INGESTION_RESOURCE_ERROR" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The topic does not have any persistent errors.", + "Ingestion from the data source has encountered a permanent error. See the more detailed error state in the corresponding ingestion source configuration." + ], + "readOnly": true, + "type": "string" } }, "type": "object" diff --git a/pubsub/v1/pubsub-gen.go b/pubsub/v1/pubsub-gen.go index b998f06d4cb..d8465f0c508 100644 --- a/pubsub/v1/pubsub-gen.go +++ b/pubsub/v1/pubsub-gen.go @@ -312,6 +312,74 @@ func (s *AvroConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// AwsKinesis: Ingestion settings for Amazon Kinesis Data Streams. +type AwsKinesis struct { + // AwsRoleArn: Required. AWS role ARN to be used for Federated Identity + // authentication with Kinesis. Check the Pub/Sub docs for how to set up + // this role and the required permissions that need to be attached to + // it. + AwsRoleArn string `json:"awsRoleArn,omitempty"` + + // ConsumerArn: Required. The Kinesis consumer ARN to used for ingestion + // in Enhanced Fan-Out mode. The consumer must be already created and + // ready to be used. + ConsumerArn string `json:"consumerArn,omitempty"` + + // GcpServiceAccount: Required. The GCP service account to be used for + // Federated Identity authentication with Kinesis (via a + // `AssumeRoleWithWebIdentity` call for the provided role). The + // `aws_role_arn` must be set up with `accounts.google.com:sub` equals + // to this service account number. + GcpServiceAccount string `json:"gcpServiceAccount,omitempty"` + + // State: Output only. An output-only field that indicates the state of + // the Kinesis ingestion source. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "ACTIVE" - Ingestion is active. + // "KINESIS_PERMISSION_DENIED" - Permission denied encountered while + // consuming data from Kinesis. This can happen if: - The provided + // `aws_role_arn` does not exist or does not have the appropriate + // permissions attached. - The provided `aws_role_arn` is not set up + // properly for Identity Federation using `gcp_service_account`. - The + // Pub/Sub SA is not granted the `iam.serviceAccounts.getOpenIdToken` + // permission on `gcp_service_account`. + // "PUBLISH_PERMISSION_DENIED" - Permission denied encountered while + // publishing to the topic. This can happen due to Pub/Sub SA has not + // been granted the [appropriate publish + // permissions](https://cloud.google.com/pubsub/docs/access-control#pubsu + // b.publisher) + // "STREAM_NOT_FOUND" - The Kinesis stream does not exist. + // "CONSUMER_NOT_FOUND" - The Kinesis consumer does not exist. + State string `json:"state,omitempty"` + + // StreamArn: Required. The Kinesis stream ARN to ingest data from. + StreamArn string `json:"streamArn,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AwsRoleArn") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AwsRoleArn") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *AwsKinesis) MarshalJSON() ([]byte, error) { + type NoMethod AwsKinesis + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // BigQueryConfig: Configuration for a BigQuery subscription. type BigQueryConfig struct { // DropUnknownFields: Optional. When true and use_topic_schema is true, @@ -471,7 +539,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to @@ -805,6 +877,35 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// IngestionDataSourceSettings: Settings for an ingestion data source on +// a topic. +type IngestionDataSourceSettings struct { + // AwsKinesis: Optional. Amazon Kinesis Data Streams. + AwsKinesis *AwsKinesis `json:"awsKinesis,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AwsKinesis") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AwsKinesis") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *IngestionDataSourceSettings) MarshalJSON() ([]byte, error) { + type NoMethod IngestionDataSourceSettings + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ListSchemaRevisionsResponse: Response for the `ListSchemaRevisions` // method. type ListSchemaRevisionsResponse struct { @@ -1123,8 +1224,8 @@ type ModifyAckDeadlineRequest struct { // immediately make the message available for delivery to another // subscriber client. This typically results in an increase in the rate // of message redeliveries (that is, duplicates). The minimum deadline - // you can specify is 0 seconds. The maximum deadline you can specify is - // 600 seconds (10 minutes). + // you can specify is 0 seconds. The maximum deadline you can specify in + // a single request is 600 seconds (10 minutes). AckDeadlineSeconds int64 `json:"ackDeadlineSeconds,omitempty"` // AckIds: Required. List of acknowledgment IDs. @@ -1446,11 +1547,11 @@ type PubsubMessage struct { // message must contain at least one attribute. Data string `json:"data,omitempty"` - // MessageId: Optional. ID of this message, assigned by the server when - // the message is published. Guaranteed to be unique within the topic. - // This value may be read by a subscriber that receives a - // `PubsubMessage` via a `Pull` call or a push delivery. It must not be - // populated by the publisher in a `Publish` call. + // MessageId: ID of this message, assigned by the server when the + // message is published. Guaranteed to be unique within the topic. This + // value may be read by a subscriber that receives a `PubsubMessage` via + // a `Pull` call or a push delivery. It must not be populated by the + // publisher in a `Publish` call. MessageId string `json:"messageId,omitempty"` // OrderingKey: Optional. If non-empty, identifies related messages for @@ -1463,9 +1564,9 @@ type PubsubMessage struct { // messages (https://cloud.google.com/pubsub/docs/ordering). OrderingKey string `json:"orderingKey,omitempty"` - // PublishTime: Optional. The time at which the message was published, - // populated by the server when it receives the `Publish` call. It must - // not be populated by the publisher in a `Publish` call. + // PublishTime: The time at which the message was published, populated + // by the server when it receives the `Publish` call. It must not be + // populated by the publisher in a `Publish` call. PublishTime string `json:"publishTime,omitempty"` // ForceSendFields is a list of field names (e.g. "Attributes") to @@ -2250,6 +2351,10 @@ type TextConfig struct { // Topic: A topic resource. type Topic struct { + // IngestionDataSourceSettings: Optional. Settings for managed ingestion + // from a data source into this topic. + IngestionDataSourceSettings *IngestionDataSourceSettings `json:"ingestionDataSourceSettings,omitempty"` + // KmsKeyName: Optional. The resource name of the Cloud KMS CryptoKey to // be used to protect access to messages published on this topic. The // expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`. @@ -2292,24 +2397,37 @@ type Topic struct { // against a schema. SchemaSettings *SchemaSettings `json:"schemaSettings,omitempty"` + // State: Output only. An output-only field indicating the state of the + // topic. + // + // Possible values: + // "STATE_UNSPECIFIED" - Default value. This value is unused. + // "ACTIVE" - The topic does not have any persistent errors. + // "INGESTION_RESOURCE_ERROR" - Ingestion from the data source has + // encountered a permanent error. See the more detailed error state in + // the corresponding ingestion source configuration. + State string `json:"state,omitempty"` + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "KmsKeyName") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "IngestionDataSourceSettings") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "KmsKeyName") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "IngestionDataSourceSettings") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } @@ -5490,7 +5608,8 @@ type ProjectsSnapshotsPatchCall struct { header_ http.Header } -// Patch: Updates an existing snapshot. Snapshots are used in Seek +// Patch: Updates an existing snapshot by updating the fields specified +// in the update mask. Snapshots are used in Seek // (https://cloud.google.com/pubsub/docs/replay-overview) operations, // which allow you to manage message acknowledgments in bulk. That is, // you can set the acknowledgment state of messages in an existing @@ -5595,7 +5714,7 @@ func (c *ProjectsSnapshotsPatchCall) Do(opts ...googleapi.CallOption) (*Snapshot } return ret, nil // { - // "description": "Updates an existing snapshot. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.", + // "description": "Updates an existing snapshot by updating the fields specified in the update mask. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.", // "flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", // "httpMethod": "PATCH", // "id": "pubsub.projects.snapshots.patch", @@ -7340,8 +7459,9 @@ type ProjectsSubscriptionsPatchCall struct { header_ http.Header } -// Patch: Updates an existing subscription. Note that certain properties -// of a subscription, such as its topic, are not modifiable. +// Patch: Updates an existing subscription by updating the fields +// specified in the update mask. Note that certain properties of a +// subscription, such as its topic, are not modifiable. // // - name: The name of the subscription. It must have the format // "projects/{project}/subscriptions/{subscription}". @@ -7448,7 +7568,7 @@ func (c *ProjectsSubscriptionsPatchCall) Do(opts ...googleapi.CallOption) (*Subs } return ret, nil // { - // "description": "Updates an existing subscription. Note that certain properties of a subscription, such as its topic, are not modifiable.", + // "description": "Updates an existing subscription by updating the fields specified in the update mask. Note that certain properties of a subscription, such as its topic, are not modifiable.", // "flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", // "httpMethod": "PATCH", // "id": "pubsub.projects.subscriptions.patch", @@ -8891,8 +9011,9 @@ type ProjectsTopicsPatchCall struct { header_ http.Header } -// Patch: Updates an existing topic. Note that certain properties of a -// topic are not modifiable. +// Patch: Updates an existing topic by updating the fields specified in +// the update mask. Note that certain properties of a topic are not +// modifiable. // // - name: The name of the topic. It must have the format // "projects/{project}/topics/{topic}". `{topic}` must start with a @@ -8998,7 +9119,7 @@ func (c *ProjectsTopicsPatchCall) Do(opts ...googleapi.CallOption) (*Topic, erro } return ret, nil // { - // "description": "Updates an existing topic. Note that certain properties of a topic are not modifiable.", + // "description": "Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable.", // "flatPath": "v1/projects/{projectsId}/topics/{topicsId}", // "httpMethod": "PATCH", // "id": "pubsub.projects.topics.patch", diff --git a/pubsub/v1beta2/pubsub-api.json b/pubsub/v1beta2/pubsub-api.json index f0b9575dca9..22d0f8ff4e2 100644 --- a/pubsub/v1beta2/pubsub-api.json +++ b/pubsub/v1beta2/pubsub-api.json @@ -731,7 +731,7 @@ } } }, - "revision": "20231212", + "revision": "20240126", "rootUrl": "https://pubsub.googleapis.com/", "schemas": { "AcknowledgeRequest": { @@ -764,7 +764,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/pubsub/v1beta2/pubsub-gen.go b/pubsub/v1beta2/pubsub-gen.go index c6781e7e482..98d61d74325 100644 --- a/pubsub/v1beta2/pubsub-gen.go +++ b/pubsub/v1beta2/pubsub-gen.go @@ -321,7 +321,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/secretmanager/v1/secretmanager-api.json b/secretmanager/v1/secretmanager-api.json index 3295621600b..0fe34f8fe66 100644 --- a/secretmanager/v1/secretmanager-api.json +++ b/secretmanager/v1/secretmanager-api.json @@ -175,6 +175,471 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "secrets": { + "methods": { + "addVersion": { + "description": "Creates a new SecretVersion containing secret data and attaches it to an existing Secret.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:addVersion", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.addVersion", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}:addVersion", + "request": { + "$ref": "AddSecretVersionRequest" + }, + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a new Secret containing no SecretVersions.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "secretId": { + "description": "Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/secrets", + "request": { + "$ref": "Secret" + }, + "response": { + "$ref": "Secret" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Secret.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", + "httpMethod": "DELETE", + "id": "secretmanager.projects.locations.secrets.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "etag": { + "description": "Optional. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets metadata for a given Secret.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Secret" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getIamPolicy": { + "description": "Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:getIamPolicy", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "options.requestedPolicyVersion": { + "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:getIamPolicy", + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists Secrets.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/secrets", + "response": { + "$ref": "ListSecretsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates metadata of an existing Secret.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", + "httpMethod": "PATCH", + "id": "secretmanager.projects.locations.secrets.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Specifies the fields to be updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Secret" + }, + "response": { + "$ref": "Secret" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:setIamPolicy", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:testIamPermissions", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.testIamPermissions", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+resource}:testIamPermissions", + "request": { + "$ref": "TestIamPermissionsRequest" + }, + "response": { + "$ref": "TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "versions": { + "methods": { + "access": { + "description": "Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:access", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.versions.access", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:access", + "response": { + "$ref": "AccessSecretVersionResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "destroy": { + "description": "Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:destroy", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.versions.destroy", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:destroy", + "request": { + "$ref": "DestroySecretVersionRequest" + }, + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "disable": { + "description": "Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:disable", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.versions.disable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:disable", + "request": { + "$ref": "DisableSecretVersionRequest" + }, + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "enable": { + "description": "Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:enable", + "httpMethod": "POST", + "id": "secretmanager.projects.locations.secrets.versions.enable", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:enable", + "request": { + "$ref": "EnableSecretVersionRequest" + }, + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.versions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "SecretVersion" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists SecretVersions. This call does not return secret data.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions", + "httpMethod": "GET", + "id": "secretmanager.projects.locations.secrets.versions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/versions", + "response": { + "$ref": "ListSecretVersionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } } }, "secrets": { @@ -189,7 +654,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*`.", + "description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+$", "required": true, @@ -217,7 +682,7 @@ ], "parameters": { "parent": { - "description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*`.", + "description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -280,7 +745,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*`.", + "description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+$", "required": true, @@ -352,7 +817,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*`.", + "description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", "location": "path", "pattern": "^projects/[^/]+$", "required": true, @@ -471,7 +936,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -496,7 +961,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*`.", + "description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -524,7 +989,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*`.", + "description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -552,7 +1017,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*`.", + "description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -580,7 +1045,7 @@ ], "parameters": { "name": { - "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", "required": true, @@ -621,7 +1086,7 @@ "type": "string" }, "parent": { - "description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*`.", + "description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", "location": "path", "pattern": "^projects/[^/]+/secrets/[^/]+$", "required": true, @@ -643,7 +1108,7 @@ } } }, - "revision": "20231215", + "revision": "20240126", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -651,7 +1116,7 @@ "id": "AccessSecretVersionResponse", "properties": { "name": { - "description": "The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`.", + "description": "The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", "type": "string" }, "payload": { @@ -759,7 +1224,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, @@ -1097,7 +1562,7 @@ }, "replication": { "$ref": "Replication", - "description": "Required. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created." + "description": "Optional. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created." }, "rotation": { "$ref": "Rotation", @@ -1120,7 +1585,7 @@ "format": "int64", "type": "string" }, - "description": "Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. At launch Access by Allias will only be supported on GetSecretVersion and AccessSecretVersion.", + "description": "Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.", "type": "object" } }, diff --git a/secretmanager/v1/secretmanager-gen.go b/secretmanager/v1/secretmanager-gen.go index b45e8e20fbc..c94f3e87a2b 100644 --- a/secretmanager/v1/secretmanager-gen.go +++ b/secretmanager/v1/secretmanager-gen.go @@ -172,11 +172,35 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.Secrets = NewProjectsLocationsSecretsService(s) return rs } type ProjectsLocationsService struct { s *Service + + Secrets *ProjectsLocationsSecretsService +} + +func NewProjectsLocationsSecretsService(s *Service) *ProjectsLocationsSecretsService { + rs := &ProjectsLocationsSecretsService{s: s} + rs.Versions = NewProjectsLocationsSecretsVersionsService(s) + return rs +} + +type ProjectsLocationsSecretsService struct { + s *Service + + Versions *ProjectsLocationsSecretsVersionsService +} + +func NewProjectsLocationsSecretsVersionsService(s *Service) *ProjectsLocationsSecretsVersionsService { + rs := &ProjectsLocationsSecretsVersionsService{s: s} + return rs +} + +type ProjectsLocationsSecretsVersionsService struct { + s *Service } func NewProjectsSecretsService(s *Service) *ProjectsSecretsService { @@ -204,7 +228,8 @@ type ProjectsSecretsVersionsService struct { // SecretManagerService.AccessSecretVersion. type AccessSecretVersionResponse struct { // Name: The resource name of the SecretVersion in the format - // `projects/*/secrets/*/versions/*`. + // `projects/*/secrets/*/versions/*` or + // `projects/*/locations/*/secrets/*/versions/*`. Name string `json:"name,omitempty"` // Payload: Secret payload @@ -513,7 +538,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to @@ -1280,7 +1309,7 @@ type Secret struct { // `projects/*/secrets/*`. Name string `json:"name,omitempty"` - // Replication: Required. Immutable. The replication policy of the + // Replication: Optional. Immutable. The replication policy of the // secret data attached to the Secret. The replication policy cannot be // changed after the Secret has been created. Replication *Replication `json:"replication,omitempty"` @@ -1304,8 +1333,8 @@ type Secret struct { // start with a letter and cannot be the string 'latest' or 'NEW'. No // more than 50 aliases can be assigned to a given secret. Version-Alias // pairs will be viewable via GetSecret and modifiable via UpdateSecret. - // At launch Access by Allias will only be supported on GetSecretVersion - // and AccessSecretVersion. + // Access by alias is only be supported on GetSecretVersion and + // AccessSecretVersion. VersionAliases map[string]string `json:"versionAliases,omitempty"` // ServerResponse contains the HTTP response code and headers from the @@ -1999,9 +2028,9 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } -// method id "secretmanager.projects.secrets.addVersion": +// method id "secretmanager.projects.locations.secrets.addVersion": -type ProjectsSecretsAddVersionCall struct { +type ProjectsLocationsSecretsAddVersionCall struct { s *Service parent string addsecretversionrequest *AddSecretVersionRequest @@ -2014,9 +2043,10 @@ type ProjectsSecretsAddVersionCall struct { // attaches it to an existing Secret. // // - parent: The resource name of the Secret to associate with the -// SecretVersion in the format `projects/*/secrets/*`. -func (r *ProjectsSecretsService) AddVersion(parent string, addsecretversionrequest *AddSecretVersionRequest) *ProjectsSecretsAddVersionCall { - c := &ProjectsSecretsAddVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// SecretVersion in the format `projects/*/secrets/*` or +// `projects/*/locations/*/secrets/*`. +func (r *ProjectsLocationsSecretsService) AddVersion(parent string, addsecretversionrequest *AddSecretVersionRequest) *ProjectsLocationsSecretsAddVersionCall { + c := &ProjectsLocationsSecretsAddVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent c.addsecretversionrequest = addsecretversionrequest return c @@ -2025,7 +2055,7 @@ func (r *ProjectsSecretsService) AddVersion(parent string, addsecretversionreque // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsSecretsAddVersionCall) Fields(s ...googleapi.Field) *ProjectsSecretsAddVersionCall { +func (c *ProjectsLocationsSecretsAddVersionCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsAddVersionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2033,21 +2063,21 @@ func (c *ProjectsSecretsAddVersionCall) Fields(s ...googleapi.Field) *ProjectsSe // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsSecretsAddVersionCall) Context(ctx context.Context) *ProjectsSecretsAddVersionCall { +func (c *ProjectsLocationsSecretsAddVersionCall) Context(ctx context.Context) *ProjectsLocationsSecretsAddVersionCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsSecretsAddVersionCall) Header() http.Header { +func (c *ProjectsLocationsSecretsAddVersionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsSecretsAddVersionCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecretsAddVersionCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2075,14 +2105,14 @@ func (c *ProjectsSecretsAddVersionCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "secretmanager.projects.secrets.addVersion" call. +// Do executes the "secretmanager.projects.locations.secrets.addVersion" call. // Exactly one of *SecretVersion or error will be non-nil. Any non-2xx // status code is an error. Response headers are in either // *SecretVersion.ServerResponse.Header or (if a response was returned // at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsSecretsAddVersionCall) Do(opts ...googleapi.CallOption) (*SecretVersion, error) { +func (c *ProjectsLocationsSecretsAddVersionCall) Do(opts ...googleapi.CallOption) (*SecretVersion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2114,17 +2144,17 @@ func (c *ProjectsSecretsAddVersionCall) Do(opts ...googleapi.CallOption) (*Secre return ret, nil // { // "description": "Creates a new SecretVersion containing secret data and attaches it to an existing Secret.", - // "flatPath": "v1/projects/{projectsId}/secrets/{secretsId}:addVersion", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:addVersion", // "httpMethod": "POST", - // "id": "secretmanager.projects.secrets.addVersion", + // "id": "secretmanager.projects.locations.secrets.addVersion", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*`.", + // "description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/secrets/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", // "required": true, // "type": "string" // } @@ -2143,9 +2173,9 @@ func (c *ProjectsSecretsAddVersionCall) Do(opts ...googleapi.CallOption) (*Secre } -// method id "secretmanager.projects.secrets.create": +// method id "secretmanager.projects.locations.secrets.create": -type ProjectsSecretsCreateCall struct { +type ProjectsLocationsSecretsCreateCall struct { s *Service parent string secret *Secret @@ -2157,9 +2187,9 @@ type ProjectsSecretsCreateCall struct { // Create: Creates a new Secret containing no SecretVersions. // // - parent: The resource name of the project to associate with the -// Secret, in the format `projects/*`. -func (r *ProjectsSecretsService) Create(parent string, secret *Secret) *ProjectsSecretsCreateCall { - c := &ProjectsSecretsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Secret, in the format `projects/*` or `projects/*/locations/*`. +func (r *ProjectsLocationsSecretsService) Create(parent string, secret *Secret) *ProjectsLocationsSecretsCreateCall { + c := &ProjectsLocationsSecretsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent c.secret = secret return c @@ -2170,7 +2200,7 @@ func (r *ProjectsSecretsService) Create(parent string, secret *Secret) *Projects // length of 255 characters and can contain uppercase and lowercase // letters, numerals, and the hyphen (`-`) and underscore (`_`) // characters. -func (c *ProjectsSecretsCreateCall) SecretId(secretId string) *ProjectsSecretsCreateCall { +func (c *ProjectsLocationsSecretsCreateCall) SecretId(secretId string) *ProjectsLocationsSecretsCreateCall { c.urlParams_.Set("secretId", secretId) return c } @@ -2178,7 +2208,7 @@ func (c *ProjectsSecretsCreateCall) SecretId(secretId string) *ProjectsSecretsCr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsSecretsCreateCall) Fields(s ...googleapi.Field) *ProjectsSecretsCreateCall { +func (c *ProjectsLocationsSecretsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2186,21 +2216,21 @@ func (c *ProjectsSecretsCreateCall) Fields(s ...googleapi.Field) *ProjectsSecret // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsSecretsCreateCall) Context(ctx context.Context) *ProjectsSecretsCreateCall { +func (c *ProjectsLocationsSecretsCreateCall) Context(ctx context.Context) *ProjectsLocationsSecretsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsSecretsCreateCall) Header() http.Header { +func (c *ProjectsLocationsSecretsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsSecretsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecretsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2228,14 +2258,14 @@ func (c *ProjectsSecretsCreateCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "secretmanager.projects.secrets.create" call. +// Do executes the "secretmanager.projects.locations.secrets.create" call. // Exactly one of *Secret or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Secret.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsSecretsCreateCall) Do(opts ...googleapi.CallOption) (*Secret, error) { +func (c *ProjectsLocationsSecretsCreateCall) Do(opts ...googleapi.CallOption) (*Secret, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2267,17 +2297,17 @@ func (c *ProjectsSecretsCreateCall) Do(opts ...googleapi.CallOption) (*Secret, e return ret, nil // { // "description": "Creates a new Secret containing no SecretVersions.", - // "flatPath": "v1/projects/{projectsId}/secrets", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets", // "httpMethod": "POST", - // "id": "secretmanager.projects.secrets.create", + // "id": "secretmanager.projects.locations.secrets.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*`.", + // "description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", // "location": "path", - // "pattern": "^projects/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // }, @@ -2301,9 +2331,9 @@ func (c *ProjectsSecretsCreateCall) Do(opts ...googleapi.CallOption) (*Secret, e } -// method id "secretmanager.projects.secrets.delete": +// method id "secretmanager.projects.locations.secrets.delete": -type ProjectsSecretsDeleteCall struct { +type ProjectsLocationsSecretsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2315,8 +2345,8 @@ type ProjectsSecretsDeleteCall struct { // // - name: The resource name of the Secret to delete in the format // `projects/*/secrets/*`. -func (r *ProjectsSecretsService) Delete(name string) *ProjectsSecretsDeleteCall { - c := &ProjectsSecretsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsSecretsService) Delete(name string) *ProjectsLocationsSecretsDeleteCall { + c := &ProjectsLocationsSecretsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -2324,7 +2354,7 @@ func (r *ProjectsSecretsService) Delete(name string) *ProjectsSecretsDeleteCall // Etag sets the optional parameter "etag": Etag of the Secret. The // request succeeds if it matches the etag of the currently stored // secret object. If the etag is omitted, the request succeeds. -func (c *ProjectsSecretsDeleteCall) Etag(etag string) *ProjectsSecretsDeleteCall { +func (c *ProjectsLocationsSecretsDeleteCall) Etag(etag string) *ProjectsLocationsSecretsDeleteCall { c.urlParams_.Set("etag", etag) return c } @@ -2332,7 +2362,7 @@ func (c *ProjectsSecretsDeleteCall) Etag(etag string) *ProjectsSecretsDeleteCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsSecretsDeleteCall) Fields(s ...googleapi.Field) *ProjectsSecretsDeleteCall { +func (c *ProjectsLocationsSecretsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2340,21 +2370,21 @@ func (c *ProjectsSecretsDeleteCall) Fields(s ...googleapi.Field) *ProjectsSecret // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsSecretsDeleteCall) Context(ctx context.Context) *ProjectsSecretsDeleteCall { +func (c *ProjectsLocationsSecretsDeleteCall) Context(ctx context.Context) *ProjectsLocationsSecretsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsSecretsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsSecretsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsSecretsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsSecretsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -2377,14 +2407,14 @@ func (c *ProjectsSecretsDeleteCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "secretmanager.projects.secrets.delete" call. +// Do executes the "secretmanager.projects.locations.secrets.delete" call. // Exactly one of *Empty or error will be non-nil. Any non-2xx status // code is an error. Response headers are in either // *Empty.ServerResponse.Header or (if a response was returned at all) // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified // was returned. -func (c *ProjectsSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2416,9 +2446,9 @@ func (c *ProjectsSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, er return ret, nil // { // "description": "Deletes a Secret.", - // "flatPath": "v1/projects/{projectsId}/secrets/{secretsId}", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", // "httpMethod": "DELETE", - // "id": "secretmanager.projects.secrets.delete", + // "id": "secretmanager.projects.locations.secrets.delete", // "parameterOrder": [ // "name" // ], @@ -2431,7 +2461,7 @@ func (c *ProjectsSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, er // "name": { // "description": "Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/secrets/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", // "required": true, // "type": "string" // } @@ -2447,9 +2477,9 @@ func (c *ProjectsSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, er } -// method id "secretmanager.projects.secrets.get": +// method id "secretmanager.projects.locations.secrets.get": -type ProjectsSecretsGetCall struct { +type ProjectsLocationsSecretsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -2461,7 +2491,2392 @@ type ProjectsSecretsGetCall struct { // Get: Gets metadata for a given Secret. // // - name: The resource name of the Secret, in the format -// `projects/*/secrets/*`. +// `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. +func (r *ProjectsLocationsSecretsService) Get(name string) *ProjectsLocationsSecretsGetCall { + c := &ProjectsLocationsSecretsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsSecretsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecretsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsGetCall) Context(ctx context.Context) *ProjectsLocationsSecretsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.get" call. +// Exactly one of *Secret or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Secret.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsSecretsGetCall) Do(opts ...googleapi.CallOption) (*Secret, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Secret{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets metadata for a given Secret.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", + // "httpMethod": "GET", + // "id": "secretmanager.projects.locations.secrets.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Secret" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.getIamPolicy": + +type ProjectsLocationsSecretsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a secret. Returns +// empty policy if the secret exists and does not have a policy set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsSecretsService) GetIamPolicy(resource string) *ProjectsLocationsSecretsGetIamPolicyCall { + c := &ProjectsLocationsSecretsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "options.requestedPolicyVersion": The maximum policy version that +// will be used to format the policy. Valid values are 0, 1, and 3. +// Requests specifying an invalid value will be rejected. Requests for +// policies with any conditional role bindings must specify version 3. +// Policies with no conditional role bindings may specify any valid +// value or leave the field unset. The policy in the response might use +// the policy version that you specified, or it might use a lower policy +// version. For example, if you specify version 3, but the policy has no +// conditional role bindings, the response uses version 1. To learn +// which resources support conditions in their IAM policies, see the IAM +// documentation +// (https://cloud.google.com/iam/help/conditions/resource-policies). +func (c *ProjectsLocationsSecretsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsSecretsGetIamPolicyCall { + c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsSecretsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecretsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecretsGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsSecretsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:getIamPolicy", + // "httpMethod": "GET", + // "id": "secretmanager.projects.locations.secrets.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "options.requestedPolicyVersion": { + // "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:getIamPolicy", + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.list": + +type ProjectsLocationsSecretsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Secrets. +// +// - parent: The resource name of the project associated with the +// Secrets, in the format `projects/*` or `projects/*/locations/*`. +func (r *ProjectsLocationsSecretsService) List(parent string) *ProjectsLocationsSecretsListCall { + c := &ProjectsLocationsSecretsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter string, adhering +// to the rules in List-operation filtering +// (https://cloud.google.com/secret-manager/docs/filtering). List only +// secrets matching the filter. If filter is empty, all secrets are +// listed. +func (c *ProjectsLocationsSecretsListCall) Filter(filter string) *ProjectsLocationsSecretsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to be returned in a single page. If set to 0, the server +// decides the number of results to return. If the number is greater +// than 25000, it is capped at 25000. +func (c *ProjectsLocationsSecretsListCall) PageSize(pageSize int64) *ProjectsLocationsSecretsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Pagination token, +// returned earlier via ListSecretsResponse.next_page_token. +func (c *ProjectsLocationsSecretsListCall) PageToken(pageToken string) *ProjectsLocationsSecretsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsSecretsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecretsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsListCall) Context(ctx context.Context) *ProjectsLocationsSecretsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/secrets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.list" call. +// Exactly one of *ListSecretsResponse or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *ListSecretsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSecretsListCall) Do(opts ...googleapi.CallOption) (*ListSecretsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListSecretsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists Secrets.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets", + // "httpMethod": "GET", + // "id": "secretmanager.projects.locations.secrets.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/secrets", + // "response": { + // "$ref": "ListSecretsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsSecretsListCall) Pages(ctx context.Context, f func(*ListSecretsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "secretmanager.projects.locations.secrets.patch": + +type ProjectsLocationsSecretsPatchCall struct { + s *Service + name string + secret *Secret + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates metadata of an existing Secret. +// +// - name: Output only. The resource name of the Secret in the format +// `projects/*/secrets/*`. +func (r *ProjectsLocationsSecretsService) Patch(name string, secret *Secret) *ProjectsLocationsSecretsPatchCall { + c := &ProjectsLocationsSecretsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.secret = secret + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. +// Specifies the fields to be updated. +func (c *ProjectsLocationsSecretsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSecretsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsPatchCall) Context(ctx context.Context) *ProjectsLocationsSecretsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.secret) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.patch" call. +// Exactly one of *Secret or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Secret.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsSecretsPatchCall) Do(opts ...googleapi.CallOption) (*Secret, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Secret{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates metadata of an existing Secret.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", + // "httpMethod": "PATCH", + // "id": "secretmanager.projects.locations.secrets.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Required. Specifies the fields to be updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "request": { + // "$ref": "Secret" + // }, + // "response": { + // "$ref": "Secret" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.setIamPolicy": + +type ProjectsLocationsSecretsSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified secret. +// Replaces any existing policy. Permissions on SecretVersions are +// enforced according to the policy set on the associated Secret. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsSecretsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsSecretsSetIamPolicyCall { + c := &ProjectsLocationsSecretsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSecretsSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsLocationsSecretsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "secretmanager.projects.locations.secrets.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.testIamPermissions": + +type ProjectsLocationsSecretsTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has for the +// specified secret. If the secret does not exist, this call returns an +// empty set of permissions, not a NOT_FOUND error. Note: This operation +// is designed to be used for building permission-aware UIs and +// command-line tools, not for authorization checking. This operation +// may "fail open" without warning. +// +// - resource: REQUIRED: The resource for which the policy detail is +// being requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *ProjectsLocationsSecretsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsSecretsTestIamPermissionsCall { + c := &ProjectsLocationsSecretsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.testiampermissionsrequest = testiampermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsSecretsTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.testIamPermissions" call. +// Exactly one of *TestIamPermissionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *TestIamPermissionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSecretsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &TestIamPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:testIamPermissions", + // "httpMethod": "POST", + // "id": "secretmanager.projects.locations.secrets.testIamPermissions", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+resource}:testIamPermissions", + // "request": { + // "$ref": "TestIamPermissionsRequest" + // }, + // "response": { + // "$ref": "TestIamPermissionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.versions.access": + +type ProjectsLocationsSecretsVersionsAccessCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Access: Accesses a SecretVersion. This call returns the secret data. +// `projects/*/secrets/*/versions/latest` is an alias to the most +// recently created SecretVersion. +// +// - name: The resource name of the SecretVersion in the format +// `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. +// `projects/*/secrets/*/versions/latest` or +// `projects/*/locations/*/secrets/*/versions/latest` is an alias to +// the most recently created SecretVersion. +func (r *ProjectsLocationsSecretsVersionsService) Access(name string) *ProjectsLocationsSecretsVersionsAccessCall { + c := &ProjectsLocationsSecretsVersionsAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsVersionsAccessCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsVersionsAccessCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsSecretsVersionsAccessCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecretsVersionsAccessCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsVersionsAccessCall) Context(ctx context.Context) *ProjectsLocationsSecretsVersionsAccessCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsVersionsAccessCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsVersionsAccessCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:access") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.versions.access" call. +// Exactly one of *AccessSecretVersionResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *AccessSecretVersionResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSecretsVersionsAccessCall) Do(opts ...googleapi.CallOption) (*AccessSecretVersionResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AccessSecretVersionResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:access", + // "httpMethod": "GET", + // "id": "secretmanager.projects.locations.secrets.versions.access", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:access", + // "response": { + // "$ref": "AccessSecretVersionResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.versions.destroy": + +type ProjectsLocationsSecretsVersionsDestroyCall struct { + s *Service + name string + destroysecretversionrequest *DestroySecretVersionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Destroy: Destroys a SecretVersion. Sets the state of the +// SecretVersion to DESTROYED and irrevocably destroys the secret data. +// +// - name: The resource name of the SecretVersion to destroy in the +// format `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. +func (r *ProjectsLocationsSecretsVersionsService) Destroy(name string, destroysecretversionrequest *DestroySecretVersionRequest) *ProjectsLocationsSecretsVersionsDestroyCall { + c := &ProjectsLocationsSecretsVersionsDestroyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.destroysecretversionrequest = destroysecretversionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsVersionsDestroyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsVersionsDestroyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsVersionsDestroyCall) Context(ctx context.Context) *ProjectsLocationsSecretsVersionsDestroyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsVersionsDestroyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsVersionsDestroyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.destroysecretversionrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:destroy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.versions.destroy" call. +// Exactly one of *SecretVersion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecretVersion.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSecretsVersionsDestroyCall) Do(opts ...googleapi.CallOption) (*SecretVersion, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &SecretVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:destroy", + // "httpMethod": "POST", + // "id": "secretmanager.projects.locations.secrets.versions.destroy", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:destroy", + // "request": { + // "$ref": "DestroySecretVersionRequest" + // }, + // "response": { + // "$ref": "SecretVersion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.versions.disable": + +type ProjectsLocationsSecretsVersionsDisableCall struct { + s *Service + name string + disablesecretversionrequest *DisableSecretVersionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Disable: Disables a SecretVersion. Sets the state of the +// SecretVersion to DISABLED. +// +// - name: The resource name of the SecretVersion to disable in the +// format `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. +func (r *ProjectsLocationsSecretsVersionsService) Disable(name string, disablesecretversionrequest *DisableSecretVersionRequest) *ProjectsLocationsSecretsVersionsDisableCall { + c := &ProjectsLocationsSecretsVersionsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.disablesecretversionrequest = disablesecretversionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsVersionsDisableCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsVersionsDisableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsVersionsDisableCall) Context(ctx context.Context) *ProjectsLocationsSecretsVersionsDisableCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsVersionsDisableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsVersionsDisableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disablesecretversionrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:disable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.versions.disable" call. +// Exactly one of *SecretVersion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecretVersion.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSecretsVersionsDisableCall) Do(opts ...googleapi.CallOption) (*SecretVersion, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &SecretVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:disable", + // "httpMethod": "POST", + // "id": "secretmanager.projects.locations.secrets.versions.disable", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:disable", + // "request": { + // "$ref": "DisableSecretVersionRequest" + // }, + // "response": { + // "$ref": "SecretVersion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.versions.enable": + +type ProjectsLocationsSecretsVersionsEnableCall struct { + s *Service + name string + enablesecretversionrequest *EnableSecretVersionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Enable: Enables a SecretVersion. Sets the state of the SecretVersion +// to ENABLED. +// +// - name: The resource name of the SecretVersion to enable in the +// format `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. +func (r *ProjectsLocationsSecretsVersionsService) Enable(name string, enablesecretversionrequest *EnableSecretVersionRequest) *ProjectsLocationsSecretsVersionsEnableCall { + c := &ProjectsLocationsSecretsVersionsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.enablesecretversionrequest = enablesecretversionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsVersionsEnableCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsVersionsEnableCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsVersionsEnableCall) Context(ctx context.Context) *ProjectsLocationsSecretsVersionsEnableCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsVersionsEnableCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsVersionsEnableCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.enablesecretversionrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:enable") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.versions.enable" call. +// Exactly one of *SecretVersion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecretVersion.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSecretsVersionsEnableCall) Do(opts ...googleapi.CallOption) (*SecretVersion, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &SecretVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:enable", + // "httpMethod": "POST", + // "id": "secretmanager.projects.locations.secrets.versions.enable", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}:enable", + // "request": { + // "$ref": "EnableSecretVersionRequest" + // }, + // "response": { + // "$ref": "SecretVersion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.versions.get": + +type ProjectsLocationsSecretsVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets metadata for a SecretVersion. +// `projects/*/secrets/*/versions/latest` is an alias to the most +// recently created SecretVersion. +// +// - name: The resource name of the SecretVersion in the format +// `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. +// `projects/*/secrets/*/versions/latest` or +// `projects/*/locations/*/secrets/*/versions/latest` is an alias to +// the most recently created SecretVersion. +func (r *ProjectsLocationsSecretsVersionsService) Get(name string) *ProjectsLocationsSecretsVersionsGetCall { + c := &ProjectsLocationsSecretsVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsVersionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsSecretsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecretsVersionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsSecretsVersionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsVersionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.versions.get" call. +// Exactly one of *SecretVersion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecretVersion.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSecretsVersionsGetCall) Do(opts ...googleapi.CallOption) (*SecretVersion, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &SecretVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}", + // "httpMethod": "GET", + // "id": "secretmanager.projects.locations.secrets.versions.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "SecretVersion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.locations.secrets.versions.list": + +type ProjectsLocationsSecretsVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists SecretVersions. This call does not return secret data. +// +// - parent: The resource name of the Secret associated with the +// SecretVersions to list, in the format `projects/*/secrets/*` or +// `projects/*/locations/*/secrets/*`. +func (r *ProjectsLocationsSecretsVersionsService) List(parent string) *ProjectsLocationsSecretsVersionsListCall { + c := &ProjectsLocationsSecretsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter string, adhering +// to the rules in List-operation filtering +// (https://cloud.google.com/secret-manager/docs/filtering). List only +// secret versions matching the filter. If filter is empty, all secret +// versions are listed. +func (c *ProjectsLocationsSecretsVersionsListCall) Filter(filter string) *ProjectsLocationsSecretsVersionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number +// of results to be returned in a single page. If set to 0, the server +// decides the number of results to return. If the number is greater +// than 25000, it is capped at 25000. +func (c *ProjectsLocationsSecretsVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsSecretsVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Pagination token, +// returned earlier via ListSecretVersionsResponse.next_page_token][]. +func (c *ProjectsLocationsSecretsVersionsListCall) PageToken(pageToken string) *ProjectsLocationsSecretsVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsSecretsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSecretsVersionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsSecretsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSecretsVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsSecretsVersionsListCall) Context(ctx context.Context) *ProjectsLocationsSecretsVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsSecretsVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsSecretsVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.locations.secrets.versions.list" call. +// Exactly one of *ListSecretVersionsResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ListSecretVersionsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsSecretsVersionsListCall) Do(opts ...googleapi.CallOption) (*ListSecretVersionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListSecretVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists SecretVersions. This call does not return secret data.", + // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions", + // "httpMethod": "GET", + // "id": "secretmanager.projects.locations.secrets.versions.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed.", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/versions", + // "response": { + // "$ref": "ListSecretVersionsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsSecretsVersionsListCall) Pages(ctx context.Context, f func(*ListSecretVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "secretmanager.projects.secrets.addVersion": + +type ProjectsSecretsAddVersionCall struct { + s *Service + parent string + addsecretversionrequest *AddSecretVersionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddVersion: Creates a new SecretVersion containing secret data and +// attaches it to an existing Secret. +// +// - parent: The resource name of the Secret to associate with the +// SecretVersion in the format `projects/*/secrets/*` or +// `projects/*/locations/*/secrets/*`. +func (r *ProjectsSecretsService) AddVersion(parent string, addsecretversionrequest *AddSecretVersionRequest) *ProjectsSecretsAddVersionCall { + c := &ProjectsSecretsAddVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.addsecretversionrequest = addsecretversionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSecretsAddVersionCall) Fields(s ...googleapi.Field) *ProjectsSecretsAddVersionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsSecretsAddVersionCall) Context(ctx context.Context) *ProjectsSecretsAddVersionCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSecretsAddVersionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSecretsAddVersionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.addsecretversionrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:addVersion") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.secrets.addVersion" call. +// Exactly one of *SecretVersion or error will be non-nil. Any non-2xx +// status code is an error. Response headers are in either +// *SecretVersion.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsSecretsAddVersionCall) Do(opts ...googleapi.CallOption) (*SecretVersion, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &SecretVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new SecretVersion containing secret data and attaches it to an existing Secret.", + // "flatPath": "v1/projects/{projectsId}/secrets/{secretsId}:addVersion", + // "httpMethod": "POST", + // "id": "secretmanager.projects.secrets.addVersion", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/secrets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+parent}:addVersion", + // "request": { + // "$ref": "AddSecretVersionRequest" + // }, + // "response": { + // "$ref": "SecretVersion" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.secrets.create": + +type ProjectsSecretsCreateCall struct { + s *Service + parent string + secret *Secret + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new Secret containing no SecretVersions. +// +// - parent: The resource name of the project to associate with the +// Secret, in the format `projects/*` or `projects/*/locations/*`. +func (r *ProjectsSecretsService) Create(parent string, secret *Secret) *ProjectsSecretsCreateCall { + c := &ProjectsSecretsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.secret = secret + return c +} + +// SecretId sets the optional parameter "secretId": Required. This must +// be unique within the project. A secret ID is a string with a maximum +// length of 255 characters and can contain uppercase and lowercase +// letters, numerals, and the hyphen (`-`) and underscore (`_`) +// characters. +func (c *ProjectsSecretsCreateCall) SecretId(secretId string) *ProjectsSecretsCreateCall { + c.urlParams_.Set("secretId", secretId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSecretsCreateCall) Fields(s ...googleapi.Field) *ProjectsSecretsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsSecretsCreateCall) Context(ctx context.Context) *ProjectsSecretsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSecretsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSecretsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.secret) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/secrets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.secrets.create" call. +// Exactly one of *Secret or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Secret.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsSecretsCreateCall) Do(opts ...googleapi.CallOption) (*Secret, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Secret{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a new Secret containing no SecretVersions.", + // "flatPath": "v1/projects/{projectsId}/secrets", + // "httpMethod": "POST", + // "id": "secretmanager.projects.secrets.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "secretId": { + // "description": "Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1/{+parent}/secrets", + // "request": { + // "$ref": "Secret" + // }, + // "response": { + // "$ref": "Secret" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.secrets.delete": + +type ProjectsSecretsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Secret. +// +// - name: The resource name of the Secret to delete in the format +// `projects/*/secrets/*`. +func (r *ProjectsSecretsService) Delete(name string) *ProjectsSecretsDeleteCall { + c := &ProjectsSecretsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Etag sets the optional parameter "etag": Etag of the Secret. The +// request succeeds if it matches the etag of the currently stored +// secret object. If the etag is omitted, the request succeeds. +func (c *ProjectsSecretsDeleteCall) Etag(etag string) *ProjectsSecretsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSecretsDeleteCall) Fields(s ...googleapi.Field) *ProjectsSecretsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsSecretsDeleteCall) Context(ctx context.Context) *ProjectsSecretsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsSecretsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsSecretsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "secretmanager.projects.secrets.delete" call. +// Exactly one of *Empty or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Empty.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *ProjectsSecretsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Empty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Secret.", + // "flatPath": "v1/projects/{projectsId}/secrets/{secretsId}", + // "httpMethod": "DELETE", + // "id": "secretmanager.projects.secrets.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "etag": { + // "description": "Optional. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.", + // "location": "path", + // "pattern": "^projects/[^/]+/secrets/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1/{+name}", + // "response": { + // "$ref": "Empty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "secretmanager.projects.secrets.get": + +type ProjectsSecretsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets metadata for a given Secret. +// +// - name: The resource name of the Secret, in the format +// `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. func (r *ProjectsSecretsService) Get(name string) *ProjectsSecretsGetCall { c := &ProjectsSecretsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -2576,7 +4991,7 @@ func (c *ProjectsSecretsGetCall) Do(opts ...googleapi.CallOption) (*Secret, erro // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*`.", + // "description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", // "location": "path", // "pattern": "^projects/[^/]+/secrets/[^/]+$", // "required": true, @@ -2782,7 +5197,7 @@ type ProjectsSecretsListCall struct { // List: Lists Secrets. // // - parent: The resource name of the project associated with the -// Secrets, in the format `projects/*`. +// Secrets, in the format `projects/*` or `projects/*/locations/*`. func (r *ProjectsSecretsService) List(parent string) *ProjectsSecretsListCall { c := &ProjectsSecretsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -2939,7 +5354,7 @@ func (c *ProjectsSecretsListCall) Do(opts ...googleapi.CallOption) (*ListSecrets // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*`.", + // "description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", // "location": "path", // "pattern": "^projects/[^/]+$", // "required": true, @@ -3447,9 +5862,11 @@ type ProjectsSecretsVersionsAccessCall struct { // recently created SecretVersion. // // - name: The resource name of the SecretVersion in the format -// `projects/*/secrets/*/versions/*`. -// `projects/*/secrets/*/versions/latest` is an alias to the most -// recently created SecretVersion. +// `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. +// `projects/*/secrets/*/versions/latest` or +// `projects/*/locations/*/secrets/*/versions/latest` is an alias to +// the most recently created SecretVersion. func (r *ProjectsSecretsVersionsService) Access(name string) *ProjectsSecretsVersionsAccessCall { c := &ProjectsSecretsVersionsAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3564,7 +5981,7 @@ func (c *ProjectsSecretsVersionsAccessCall) Do(opts ...googleapi.CallOption) (*A // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + // "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", // "location": "path", // "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", // "required": true, @@ -3597,7 +6014,8 @@ type ProjectsSecretsVersionsDestroyCall struct { // SecretVersion to DESTROYED and irrevocably destroys the secret data. // // - name: The resource name of the SecretVersion to destroy in the -// format `projects/*/secrets/*/versions/*`. +// format `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. func (r *ProjectsSecretsVersionsService) Destroy(name string, destroysecretversionrequest *DestroySecretVersionRequest) *ProjectsSecretsVersionsDestroyCall { c := &ProjectsSecretsVersionsDestroyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3705,7 +6123,7 @@ func (c *ProjectsSecretsVersionsDestroyCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*`.", + // "description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", // "location": "path", // "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", // "required": true, @@ -3741,7 +6159,8 @@ type ProjectsSecretsVersionsDisableCall struct { // SecretVersion to DISABLED. // // - name: The resource name of the SecretVersion to disable in the -// format `projects/*/secrets/*/versions/*`. +// format `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. func (r *ProjectsSecretsVersionsService) Disable(name string, disablesecretversionrequest *DisableSecretVersionRequest) *ProjectsSecretsVersionsDisableCall { c := &ProjectsSecretsVersionsDisableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3849,7 +6268,7 @@ func (c *ProjectsSecretsVersionsDisableCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*`.", + // "description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", // "location": "path", // "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", // "required": true, @@ -3885,7 +6304,8 @@ type ProjectsSecretsVersionsEnableCall struct { // to ENABLED. // // - name: The resource name of the SecretVersion to enable in the -// format `projects/*/secrets/*/versions/*`. +// format `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. func (r *ProjectsSecretsVersionsService) Enable(name string, enablesecretversionrequest *EnableSecretVersionRequest) *ProjectsSecretsVersionsEnableCall { c := &ProjectsSecretsVersionsEnableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -3993,7 +6413,7 @@ func (c *ProjectsSecretsVersionsEnableCall) Do(opts ...googleapi.CallOption) (*S // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*`.", + // "description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", // "location": "path", // "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", // "required": true, @@ -4030,9 +6450,11 @@ type ProjectsSecretsVersionsGetCall struct { // recently created SecretVersion. // // - name: The resource name of the SecretVersion in the format -// `projects/*/secrets/*/versions/*`. -// `projects/*/secrets/*/versions/latest` is an alias to the most -// recently created SecretVersion. +// `projects/*/secrets/*/versions/*` or +// `projects/*/locations/*/secrets/*/versions/*`. +// `projects/*/secrets/*/versions/latest` or +// `projects/*/locations/*/secrets/*/versions/latest` is an alias to +// the most recently created SecretVersion. func (r *ProjectsSecretsVersionsService) Get(name string) *ProjectsSecretsVersionsGetCall { c := &ProjectsSecretsVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name @@ -4147,7 +6569,7 @@ func (c *ProjectsSecretsVersionsGetCall) Do(opts ...googleapi.CallOption) (*Secr // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", + // "description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", // "location": "path", // "pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", // "required": true, @@ -4179,7 +6601,8 @@ type ProjectsSecretsVersionsListCall struct { // List: Lists SecretVersions. This call does not return secret data. // // - parent: The resource name of the Secret associated with the -// SecretVersions to list, in the format `projects/*/secrets/*`. +// SecretVersions to list, in the format `projects/*/secrets/*` or +// `projects/*/locations/*/secrets/*`. func (r *ProjectsSecretsVersionsService) List(parent string) *ProjectsSecretsVersionsListCall { c := &ProjectsSecretsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -4336,7 +6759,7 @@ func (c *ProjectsSecretsVersionsListCall) Do(opts ...googleapi.CallOption) (*Lis // "type": "string" // }, // "parent": { - // "description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*`.", + // "description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", // "location": "path", // "pattern": "^projects/[^/]+/secrets/[^/]+$", // "required": true, diff --git a/secretmanager/v1beta1/secretmanager-api.json b/secretmanager/v1beta1/secretmanager-api.json index 90a74a18fa0..f7e4d6a4fa7 100644 --- a/secretmanager/v1beta1/secretmanager-api.json +++ b/secretmanager/v1beta1/secretmanager-api.json @@ -628,7 +628,7 @@ } } }, - "revision": "20231215", + "revision": "20240126", "rootUrl": "https://secretmanager.googleapis.com/", "schemas": { "AccessSecretVersionResponse": { @@ -727,7 +727,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/secretmanager/v1beta1/secretmanager-gen.go b/secretmanager/v1beta1/secretmanager-gen.go index d68eeabe8f3..6f0918acebc 100644 --- a/secretmanager/v1beta1/secretmanager-gen.go +++ b/secretmanager/v1beta1/secretmanager-gen.go @@ -448,7 +448,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/sqladmin/v1/sqladmin-api.json b/sqladmin/v1/sqladmin-api.json index e17857c79d0..474b9421c91 100644 --- a/sqladmin/v1/sqladmin-api.json +++ b/sqladmin/v1/sqladmin-api.json @@ -2200,7 +2200,7 @@ } } }, - "revision": "20240115", + "revision": "20240123", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -3122,7 +3122,7 @@ "type": "string" }, "region": { - "description": "The geographical region. Can be: * `us-central` (`FIRST_GEN` instances only) * `us-central1` (`SECOND_GEN` instances only) * `asia-east1` or `europe-west1`. Defaults to `us-central` or `us-central1` depending on the instance type. The region cannot be changed after instance creation.", + "description": "The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`.", "type": "string" }, "replicaConfiguration": { @@ -4763,7 +4763,8 @@ "type": "string" }, "disallowCompromisedCredentials": { - "description": "Disallow credentials that have been previously compromised by a public data breach.", + "deprecated": true, + "description": "This field is deprecated and will be removed in a future version of the API.", "type": "boolean" }, "disallowUsernameSubstring": { diff --git a/sqladmin/v1/sqladmin-gen.go b/sqladmin/v1/sqladmin-gen.go index 218dcc663e0..39662ecb661 100644 --- a/sqladmin/v1/sqladmin-gen.go +++ b/sqladmin/v1/sqladmin-gen.go @@ -1292,11 +1292,11 @@ type DatabaseInstance struct { // of PSC instance. PscServiceAttachmentLink string `json:"pscServiceAttachmentLink,omitempty"` - // Region: The geographical region. Can be: * `us-central` (`FIRST_GEN` - // instances only) * `us-central1` (`SECOND_GEN` instances only) * - // `asia-east1` or `europe-west1`. Defaults to `us-central` or - // `us-central1` depending on the instance type. The region cannot be - // changed after instance creation. + // Region: The geographical region of the Cloud SQL instance. It can be + // one of the regions + // (https://cloud.google.com/sql/docs/mysql/locations#location-r) where + // Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and + // `us-central1`. The default value is `us-central1`. Region string `json:"region,omitempty"` // ReplicaConfiguration: Configuration specific to failover replicas and @@ -3750,8 +3750,8 @@ type PasswordValidationPolicy struct { // numeric, and non-alphanumeric characters. Complexity string `json:"complexity,omitempty"` - // DisallowCompromisedCredentials: Disallow credentials that have been - // previously compromised by a public data breach. + // DisallowCompromisedCredentials: This field is deprecated and will be + // removed in a future version of the API. DisallowCompromisedCredentials bool `json:"disallowCompromisedCredentials,omitempty"` // DisallowUsernameSubstring: Disallow username as a part of the diff --git a/sqladmin/v1beta4/sqladmin-api.json b/sqladmin/v1beta4/sqladmin-api.json index 234a1620165..c86e366ed5f 100644 --- a/sqladmin/v1beta4/sqladmin-api.json +++ b/sqladmin/v1beta4/sqladmin-api.json @@ -2200,7 +2200,7 @@ } } }, - "revision": "20240115", + "revision": "20240123", "rootUrl": "https://sqladmin.googleapis.com/", "schemas": { "AclEntry": { @@ -3122,7 +3122,7 @@ "type": "string" }, "region": { - "description": "The geographical region. Can be: * `us-central` (`FIRST_GEN` instances only) * `us-central1` (`SECOND_GEN` instances only) * `asia-east1` or `europe-west1`. Defaults to `us-central` or `us-central1` depending on the instance type. The region cannot be changed after instance creation.", + "description": "The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`.", "type": "string" }, "replicaConfiguration": { @@ -4764,7 +4764,8 @@ "type": "string" }, "disallowCompromisedCredentials": { - "description": "Disallow credentials that have been previously compromised by a public data breach.", + "deprecated": true, + "description": "This field is deprecated and will be removed in a future version of the API.", "type": "boolean" }, "disallowUsernameSubstring": { diff --git a/sqladmin/v1beta4/sqladmin-gen.go b/sqladmin/v1beta4/sqladmin-gen.go index 0b9f1d85969..04ae782e592 100644 --- a/sqladmin/v1beta4/sqladmin-gen.go +++ b/sqladmin/v1beta4/sqladmin-gen.go @@ -1291,11 +1291,11 @@ type DatabaseInstance struct { // of PSC instance. PscServiceAttachmentLink string `json:"pscServiceAttachmentLink,omitempty"` - // Region: The geographical region. Can be: * `us-central` (`FIRST_GEN` - // instances only) * `us-central1` (`SECOND_GEN` instances only) * - // `asia-east1` or `europe-west1`. Defaults to `us-central` or - // `us-central1` depending on the instance type. The region cannot be - // changed after instance creation. + // Region: The geographical region of the Cloud SQL instance. It can be + // one of the regions + // (https://cloud.google.com/sql/docs/mysql/locations#location-r) where + // Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and + // `us-central1`. The default value is `us-central1`. Region string `json:"region,omitempty"` // ReplicaConfiguration: Configuration specific to failover replicas and @@ -3755,8 +3755,8 @@ type PasswordValidationPolicy struct { // numeric, and non-alphanumeric characters. Complexity string `json:"complexity,omitempty"` - // DisallowCompromisedCredentials: Disallow credentials that have been - // previously compromised by a public data breach. + // DisallowCompromisedCredentials: This field is deprecated and will be + // removed in a future version of the API. DisallowCompromisedCredentials bool `json:"disallowCompromisedCredentials,omitempty"` // DisallowUsernameSubstring: Disallow username as a part of the diff --git a/workloadmanager/v1/workloadmanager-api.json b/workloadmanager/v1/workloadmanager-api.json index 27f86bf6df0..6a262f86d76 100644 --- a/workloadmanager/v1/workloadmanager-api.json +++ b/workloadmanager/v1/workloadmanager-api.json @@ -707,7 +707,7 @@ } } }, - "revision": "20240103", + "revision": "20240117", "rootUrl": "https://workloadmanager.googleapis.com/", "schemas": { "BigQueryDestination": { @@ -1329,6 +1329,13 @@ "description": "the severity of the rule", "type": "string" }, + "tags": { + "description": "List of user-defined tags", + "items": { + "type": "string" + }, + "type": "array" + }, "uri": { "description": "the docuement url for the rule", "type": "string" @@ -1696,6 +1703,10 @@ "resource": { "description": "resource name", "type": "string" + }, + "type": { + "description": "resource type", + "type": "string" } }, "type": "object" diff --git a/workloadmanager/v1/workloadmanager-gen.go b/workloadmanager/v1/workloadmanager-gen.go index 262dfd3154a..51a50b1d8df 100644 --- a/workloadmanager/v1/workloadmanager-gen.go +++ b/workloadmanager/v1/workloadmanager-gen.go @@ -1139,6 +1139,9 @@ type Rule struct { // Severity: the severity of the rule Severity string `json:"severity,omitempty"` + // Tags: List of user-defined tags + Tags []string `json:"tags,omitempty"` + // Uri: the docuement url for the rule Uri string `json:"uri,omitempty"` @@ -1666,6 +1669,9 @@ type ScannedResource struct { // Resource: resource name Resource string `json:"resource,omitempty"` + // Type: resource type + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Resource") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any