diff --git a/alloydb/v1/alloydb-api.json b/alloydb/v1/alloydb-api.json index b6d7f9b90a2..ac209822cc2 100644 --- a/alloydb/v1/alloydb-api.json +++ b/alloydb/v1/alloydb-api.json @@ -517,6 +517,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "export": { + "description": "Exports data from the cluster. Imperative only.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:export", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.export", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the cluster.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:export", + "request": { + "$ref": "ExportClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets details of a single Cluster.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", @@ -1517,7 +1545,7 @@ } } }, - "revision": "20241023", + "revision": "20241106", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -2251,6 +2279,17 @@ }, "type": "object" }, + "CsvExportOptions": { + "description": "Options for exporting data in CSV format. For now, we only support a query to get the data that needs to be exported.", + "id": "CsvExportOptions", + "properties": { + "selectQuery": { + "description": "Required. The select_query used to extract the data.", + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -2298,6 +2337,36 @@ }, "type": "object" }, + "ExportClusterRequest": { + "description": "Export cluster request.", + "id": "ExportClusterRequest", + "properties": { + "csvExportOptions": { + "$ref": "CsvExportOptions", + "description": "Options for exporting data in CSV format. Required field to be set for CSV file type." + }, + "database": { + "description": "Required. Name of the database where the query will be executed. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference.", + "type": "string" + }, + "gcsDestination": { + "$ref": "GcsDestination", + "description": "Required. Option to export data to cloud storage." + } + }, + "type": "object" + }, + "ExportClusterResponse": { + "description": "Response of export cluster rpc.", + "id": "ExportClusterResponse", + "properties": { + "gcsDestination": { + "$ref": "GcsDestination", + "description": "Required. Option to export data to cloud storage." + } + }, + "type": "object" + }, "FailoverInstanceRequest": { "description": "Message for triggering failover on an Instance", "id": "FailoverInstanceRequest", @@ -2313,6 +2382,17 @@ }, "type": "object" }, + "GcsDestination": { + "description": "Destination for Export. Export will be done to cloud storage.", + "id": "GcsDestination", + "properties": { + "uri": { + "description": "Required. The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudLocationListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "GoogleCloudLocationListLocationsResponse", diff --git a/alloydb/v1/alloydb-gen.go b/alloydb/v1/alloydb-gen.go index f15ed0dd141..7a1b0273ab6 100644 --- a/alloydb/v1/alloydb-gen.go +++ b/alloydb/v1/alloydb-gen.go @@ -899,6 +899,29 @@ func (s ContinuousBackupSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CsvExportOptions: Options for exporting data in CSV format. For now, we only +// support a query to get the data that needs to be exported. +type CsvExportOptions struct { + // SelectQuery: Required. The select_query used to extract the data. + SelectQuery string `json:"selectQuery,omitempty"` + // ForceSendFields is a list of field names (e.g. "SelectQuery") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SelectQuery") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CsvExportOptions) MarshalJSON() ([]byte, error) { + type NoMethod CsvExportOptions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use it as // the request or the response type of an API method. For instance: service Foo @@ -969,6 +992,57 @@ func (s EncryptionInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExportClusterRequest: Export cluster request. +type ExportClusterRequest struct { + // CsvExportOptions: Options for exporting data in CSV format. Required field + // to be set for CSV file type. + CsvExportOptions *CsvExportOptions `json:"csvExportOptions,omitempty"` + // Database: Required. Name of the database where the query will be executed. + // Note - Value provided should be the same as expected from `SELECT + // current_database();` and NOT as a resource reference. + Database string `json:"database,omitempty"` + // GcsDestination: Required. Option to export data to cloud storage. + GcsDestination *GcsDestination `json:"gcsDestination,omitempty"` + // ForceSendFields is a list of field names (e.g. "CsvExportOptions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CsvExportOptions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportClusterRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ExportClusterResponse: Response of export cluster rpc. +type ExportClusterResponse struct { + // GcsDestination: Required. Option to export data to cloud storage. + GcsDestination *GcsDestination `json:"gcsDestination,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsDestination") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsDestination") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportClusterResponse) MarshalJSON() ([]byte, error) { + type NoMethod ExportClusterResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // FailoverInstanceRequest: Message for triggering failover on an Instance type FailoverInstanceRequest struct { // RequestId: Optional. An optional request ID to identify requests. Specify a @@ -1005,6 +1079,31 @@ func (s FailoverInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GcsDestination: Destination for Export. Export will be done to cloud +// storage. +type GcsDestination struct { + // Uri: Required. The path to the file in Google Cloud Storage where the export + // will be stored. The URI is in the form `gs://bucketName/fileName`. If the + // file already exists, the request succeeds, but the operation fails. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GcsDestination + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudLocationListLocationsResponse: The response message for // Locations.ListLocations. type GoogleCloudLocationListLocationsResponse struct { @@ -5358,6 +5457,107 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( return ret, nil } +type ProjectsLocationsClustersExportCall struct { + s *Service + name string + exportclusterrequest *ExportClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports data from the cluster. Imperative only. +// +// - name: The resource name of the cluster. +func (r *ProjectsLocationsClustersService) Export(name string, exportclusterrequest *ExportClusterRequest) *ProjectsLocationsClustersExportCall { + c := &ProjectsLocationsClustersExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.exportclusterrequest = exportclusterrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersExportCall) Context(ctx context.Context) *ProjectsLocationsClustersExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersExportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportclusterrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") + 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 "alloydb.projects.locations.clusters.export" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsClustersExportCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + type ProjectsLocationsClustersGetCall struct { s *Service name string diff --git a/alloydb/v1alpha/alloydb-api.json b/alloydb/v1alpha/alloydb-api.json index 5e118335422..22196793be4 100644 --- a/alloydb/v1alpha/alloydb-api.json +++ b/alloydb/v1alpha/alloydb-api.json @@ -517,6 +517,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "export": { + "description": "Exports data from the cluster. Imperative only.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:export", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.export", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the cluster.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:export", + "request": { + "$ref": "ExportClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets details of a single Cluster.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", @@ -1517,7 +1545,7 @@ } } }, - "revision": "20241023", + "revision": "20241106", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -2304,6 +2332,29 @@ }, "type": "object" }, + "CsvExportOptions": { + "description": "Options for exporting data in CSV format. For now, we only support a query to get the data that needs to be exported.", + "id": "CsvExportOptions", + "properties": { + "escapeCharacter": { + "description": "Optional. Specifies the character that should appear before a data character that needs to be escaped. The default is the same as quote character. The value of this argument has to be a character in Hex ASCII Code.", + "type": "string" + }, + "fieldDelimiter": { + "description": "Optional. Specifies the character that separates columns within each row (line) of the file. The default is comma. The value of this argument has to be a character in Hex ASCII Code.", + "type": "string" + }, + "quoteCharacter": { + "description": "Optional. Specifies the quoting character to be used when a data value is quoted. The default is double-quote. The value of this argument has to be a character in Hex ASCII Code.", + "type": "string" + }, + "selectQuery": { + "description": "Required. The select_query used to extract the data.", + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -2351,6 +2402,29 @@ }, "type": "object" }, + "ExportClusterRequest": { + "description": "Export cluster request.", + "id": "ExportClusterRequest", + "properties": { + "csvExportOptions": { + "$ref": "CsvExportOptions", + "description": "Options for exporting data in CSV format. Required field to be set for CSV file type." + }, + "database": { + "description": "Required. Name of the database where the query will be executed. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference.", + "type": "string" + }, + "gcsDestination": { + "$ref": "GcsDestination", + "description": "Required. Option to export data to cloud storage." + }, + "sqlExportOptions": { + "$ref": "SqlExportOptions", + "description": "Options for exporting data in SQL format. Required field to be set for SQL file type." + } + }, + "type": "object" + }, "FailoverInstanceRequest": { "description": "Message for triggering failover on an Instance", "id": "FailoverInstanceRequest", @@ -2366,6 +2440,17 @@ }, "type": "object" }, + "GcsDestination": { + "description": "Destination for Export. Export will be done to cloud storage.", + "id": "GcsDestination", + "properties": { + "uri": { + "description": "Required. The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails.", + "type": "string" + } + }, + "type": "object" + }, "GeminiClusterConfig": { "description": "Cluster level configuration parameters related to the Gemini in Databases add-on.", "id": "GeminiClusterConfig", @@ -3420,6 +3505,32 @@ }, "type": "object" }, + "SqlExportOptions": { + "description": "Options for exporting data in SQL format.", + "id": "SqlExportOptions", + "properties": { + "cleanTargetObjects": { + "description": "Optional. If true, output commands to DROP all the dumped database objects prior to outputting the commands for creating them.", + "type": "boolean" + }, + "ifExistTargetObjects": { + "description": "Optional. If true, use DROP ... IF EXISTS commands to check for the object's existence before dropping it in clean_target_objects mode.", + "type": "boolean" + }, + "schemaOnly": { + "description": "Optional. If true, only export the schema.", + "type": "boolean" + }, + "tables": { + "description": "Optional. Tables to export from.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "SslConfig": { "description": "SSL configuration.", "id": "SslConfig", diff --git a/alloydb/v1alpha/alloydb-gen.go b/alloydb/v1alpha/alloydb-gen.go index 465c0b87fea..1d8dab1304b 100644 --- a/alloydb/v1alpha/alloydb-gen.go +++ b/alloydb/v1alpha/alloydb-gen.go @@ -942,6 +942,42 @@ func (s ContinuousBackupSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CsvExportOptions: Options for exporting data in CSV format. For now, we only +// support a query to get the data that needs to be exported. +type CsvExportOptions struct { + // EscapeCharacter: Optional. Specifies the character that should appear before + // a data character that needs to be escaped. The default is the same as quote + // character. The value of this argument has to be a character in Hex ASCII + // Code. + EscapeCharacter string `json:"escapeCharacter,omitempty"` + // FieldDelimiter: Optional. Specifies the character that separates columns + // within each row (line) of the file. The default is comma. The value of this + // argument has to be a character in Hex ASCII Code. + FieldDelimiter string `json:"fieldDelimiter,omitempty"` + // QuoteCharacter: Optional. Specifies the quoting character to be used when a + // data value is quoted. The default is double-quote. The value of this + // argument has to be a character in Hex ASCII Code. + QuoteCharacter string `json:"quoteCharacter,omitempty"` + // SelectQuery: Required. The select_query used to extract the data. + SelectQuery string `json:"selectQuery,omitempty"` + // ForceSendFields is a list of field names (e.g. "EscapeCharacter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EscapeCharacter") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CsvExportOptions) MarshalJSON() ([]byte, error) { + type NoMethod CsvExportOptions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use it as // the request or the response type of an API method. For instance: service Foo @@ -1012,6 +1048,38 @@ func (s EncryptionInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExportClusterRequest: Export cluster request. +type ExportClusterRequest struct { + // CsvExportOptions: Options for exporting data in CSV format. Required field + // to be set for CSV file type. + CsvExportOptions *CsvExportOptions `json:"csvExportOptions,omitempty"` + // Database: Required. Name of the database where the query will be executed. + // Note - Value provided should be the same as expected from `SELECT + // current_database();` and NOT as a resource reference. + Database string `json:"database,omitempty"` + // GcsDestination: Required. Option to export data to cloud storage. + GcsDestination *GcsDestination `json:"gcsDestination,omitempty"` + // SqlExportOptions: Options for exporting data in SQL format. Required field + // to be set for SQL file type. + SqlExportOptions *SqlExportOptions `json:"sqlExportOptions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CsvExportOptions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CsvExportOptions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportClusterRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // FailoverInstanceRequest: Message for triggering failover on an Instance type FailoverInstanceRequest struct { // RequestId: Optional. An optional request ID to identify requests. Specify a @@ -1048,6 +1116,31 @@ func (s FailoverInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GcsDestination: Destination for Export. Export will be done to cloud +// storage. +type GcsDestination struct { + // Uri: Required. The path to the file in Google Cloud Storage where the export + // will be stored. The URI is in the form `gs://bucketName/fileName`. If the + // file already exists, the request succeeds, but the operation fails. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GcsDestination + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GeminiClusterConfig: Cluster level configuration parameters related to the // Gemini in Databases add-on. type GeminiClusterConfig struct { @@ -2410,6 +2503,37 @@ func (s SecondaryConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SqlExportOptions: Options for exporting data in SQL format. +type SqlExportOptions struct { + // CleanTargetObjects: Optional. If true, output commands to DROP all the + // dumped database objects prior to outputting the commands for creating them. + CleanTargetObjects bool `json:"cleanTargetObjects,omitempty"` + // IfExistTargetObjects: Optional. If true, use DROP ... IF EXISTS commands to + // check for the object's existence before dropping it in clean_target_objects + // mode. + IfExistTargetObjects bool `json:"ifExistTargetObjects,omitempty"` + // SchemaOnly: Optional. If true, only export the schema. + SchemaOnly bool `json:"schemaOnly,omitempty"` + // Tables: Optional. Tables to export from. + Tables []string `json:"tables,omitempty"` + // ForceSendFields is a list of field names (e.g. "CleanTargetObjects") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CleanTargetObjects") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SqlExportOptions) MarshalJSON() ([]byte, error) { + type NoMethod SqlExportOptions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SslConfig: SSL configuration. type SslConfig struct { // CaSource: Optional. Certificate Authority (CA) source. Only @@ -5579,6 +5703,107 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( return ret, nil } +type ProjectsLocationsClustersExportCall struct { + s *Service + name string + exportclusterrequest *ExportClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports data from the cluster. Imperative only. +// +// - name: The resource name of the cluster. +func (r *ProjectsLocationsClustersService) Export(name string, exportclusterrequest *ExportClusterRequest) *ProjectsLocationsClustersExportCall { + c := &ProjectsLocationsClustersExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.exportclusterrequest = exportclusterrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersExportCall) Context(ctx context.Context) *ProjectsLocationsClustersExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersExportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportclusterrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:export") + 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 "alloydb.projects.locations.clusters.export" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsClustersExportCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + type ProjectsLocationsClustersGetCall struct { s *Service name string diff --git a/alloydb/v1beta/alloydb-api.json b/alloydb/v1beta/alloydb-api.json index 415ca9f4c72..9b6db764563 100644 --- a/alloydb/v1beta/alloydb-api.json +++ b/alloydb/v1beta/alloydb-api.json @@ -517,6 +517,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "export": { + "description": "Exports data from the cluster. Imperative only.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:export", + "httpMethod": "POST", + "id": "alloydb.projects.locations.clusters.export", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the cluster.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:export", + "request": { + "$ref": "ExportClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets details of a single Cluster.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", @@ -1514,7 +1542,7 @@ } } }, - "revision": "20241023", + "revision": "20241106", "rootUrl": "https://alloydb.googleapis.com/", "schemas": { "AuthorizedNetwork": { @@ -2285,6 +2313,29 @@ }, "type": "object" }, + "CsvExportOptions": { + "description": "Options for exporting data in CSV format. For now, we only support a query to get the data that needs to be exported.", + "id": "CsvExportOptions", + "properties": { + "escapeCharacter": { + "description": "Optional. Specifies the character that should appear before a data character that needs to be escaped. The default is the same as quote character. The value of this argument has to be a character in Hex ASCII Code.", + "type": "string" + }, + "fieldDelimiter": { + "description": "Optional. Specifies the character that separates columns within each row (line) of the file. The default is comma. The value of this argument has to be a character in Hex ASCII Code.", + "type": "string" + }, + "quoteCharacter": { + "description": "Optional. Specifies the quoting character to be used when a data value is quoted. The default is double-quote. The value of this argument has to be a character in Hex ASCII Code.", + "type": "string" + }, + "selectQuery": { + "description": "Required. The select_query used to extract the data.", + "type": "string" + } + }, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -2332,6 +2383,29 @@ }, "type": "object" }, + "ExportClusterRequest": { + "description": "Export cluster request.", + "id": "ExportClusterRequest", + "properties": { + "csvExportOptions": { + "$ref": "CsvExportOptions", + "description": "Options for exporting data in CSV format. Required field to be set for CSV file type." + }, + "database": { + "description": "Required. Name of the database where the query will be executed. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference.", + "type": "string" + }, + "gcsDestination": { + "$ref": "GcsDestination", + "description": "Required. Option to export data to cloud storage." + }, + "sqlExportOptions": { + "$ref": "SqlExportOptions", + "description": "Options for exporting data in SQL format. Required field to be set for SQL file type." + } + }, + "type": "object" + }, "FailoverInstanceRequest": { "description": "Message for triggering failover on an Instance", "id": "FailoverInstanceRequest", @@ -2347,6 +2421,17 @@ }, "type": "object" }, + "GcsDestination": { + "description": "Destination for Export. Export will be done to cloud storage.", + "id": "GcsDestination", + "properties": { + "uri": { + "description": "Required. The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails.", + "type": "string" + } + }, + "type": "object" + }, "GeminiClusterConfig": { "description": "Cluster level configuration parameters related to the Gemini in Databases add-on.", "id": "GeminiClusterConfig", @@ -3372,6 +3457,32 @@ }, "type": "object" }, + "SqlExportOptions": { + "description": "Options for exporting data in SQL format.", + "id": "SqlExportOptions", + "properties": { + "cleanTargetObjects": { + "description": "Optional. If true, output commands to DROP all the dumped database objects prior to outputting the commands for creating them.", + "type": "boolean" + }, + "ifExistTargetObjects": { + "description": "Optional. If true, use DROP ... IF EXISTS commands to check for the object's existence before dropping it in clean_target_objects mode.", + "type": "boolean" + }, + "schemaOnly": { + "description": "Optional. If true, only export the schema.", + "type": "boolean" + }, + "tables": { + "description": "Optional. Tables to export from.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "SslConfig": { "description": "SSL configuration.", "id": "SslConfig", diff --git a/alloydb/v1beta/alloydb-gen.go b/alloydb/v1beta/alloydb-gen.go index cba4462023a..6bca62c9dfb 100644 --- a/alloydb/v1beta/alloydb-gen.go +++ b/alloydb/v1beta/alloydb-gen.go @@ -934,6 +934,42 @@ func (s ContinuousBackupSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CsvExportOptions: Options for exporting data in CSV format. For now, we only +// support a query to get the data that needs to be exported. +type CsvExportOptions struct { + // EscapeCharacter: Optional. Specifies the character that should appear before + // a data character that needs to be escaped. The default is the same as quote + // character. The value of this argument has to be a character in Hex ASCII + // Code. + EscapeCharacter string `json:"escapeCharacter,omitempty"` + // FieldDelimiter: Optional. Specifies the character that separates columns + // within each row (line) of the file. The default is comma. The value of this + // argument has to be a character in Hex ASCII Code. + FieldDelimiter string `json:"fieldDelimiter,omitempty"` + // QuoteCharacter: Optional. Specifies the quoting character to be used when a + // data value is quoted. The default is double-quote. The value of this + // argument has to be a character in Hex ASCII Code. + QuoteCharacter string `json:"quoteCharacter,omitempty"` + // SelectQuery: Required. The select_query used to extract the data. + SelectQuery string `json:"selectQuery,omitempty"` + // ForceSendFields is a list of field names (e.g. "EscapeCharacter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EscapeCharacter") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CsvExportOptions) MarshalJSON() ([]byte, error) { + type NoMethod CsvExportOptions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use it as // the request or the response type of an API method. For instance: service Foo @@ -1004,6 +1040,38 @@ func (s EncryptionInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExportClusterRequest: Export cluster request. +type ExportClusterRequest struct { + // CsvExportOptions: Options for exporting data in CSV format. Required field + // to be set for CSV file type. + CsvExportOptions *CsvExportOptions `json:"csvExportOptions,omitempty"` + // Database: Required. Name of the database where the query will be executed. + // Note - Value provided should be the same as expected from `SELECT + // current_database();` and NOT as a resource reference. + Database string `json:"database,omitempty"` + // GcsDestination: Required. Option to export data to cloud storage. + GcsDestination *GcsDestination `json:"gcsDestination,omitempty"` + // SqlExportOptions: Options for exporting data in SQL format. Required field + // to be set for SQL file type. + SqlExportOptions *SqlExportOptions `json:"sqlExportOptions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CsvExportOptions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CsvExportOptions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportClusterRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // FailoverInstanceRequest: Message for triggering failover on an Instance type FailoverInstanceRequest struct { // RequestId: Optional. An optional request ID to identify requests. Specify a @@ -1040,6 +1108,31 @@ func (s FailoverInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GcsDestination: Destination for Export. Export will be done to cloud +// storage. +type GcsDestination struct { + // Uri: Required. The path to the file in Google Cloud Storage where the export + // will be stored. The URI is in the form `gs://bucketName/fileName`. If the + // file already exists, the request succeeds, but the operation fails. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GcsDestination + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GeminiClusterConfig: Cluster level configuration parameters related to the // Gemini in Databases add-on. type GeminiClusterConfig struct { @@ -2364,6 +2457,37 @@ func (s SecondaryConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SqlExportOptions: Options for exporting data in SQL format. +type SqlExportOptions struct { + // CleanTargetObjects: Optional. If true, output commands to DROP all the + // dumped database objects prior to outputting the commands for creating them. + CleanTargetObjects bool `json:"cleanTargetObjects,omitempty"` + // IfExistTargetObjects: Optional. If true, use DROP ... IF EXISTS commands to + // check for the object's existence before dropping it in clean_target_objects + // mode. + IfExistTargetObjects bool `json:"ifExistTargetObjects,omitempty"` + // SchemaOnly: Optional. If true, only export the schema. + SchemaOnly bool `json:"schemaOnly,omitempty"` + // Tables: Optional. Tables to export from. + Tables []string `json:"tables,omitempty"` + // ForceSendFields is a list of field names (e.g. "CleanTargetObjects") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CleanTargetObjects") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SqlExportOptions) MarshalJSON() ([]byte, error) { + type NoMethod SqlExportOptions + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SslConfig: SSL configuration. type SslConfig struct { // CaSource: Optional. Certificate Authority (CA) source. Only @@ -5533,6 +5657,107 @@ func (c *ProjectsLocationsClustersDeleteCall) Do(opts ...googleapi.CallOption) ( return ret, nil } +type ProjectsLocationsClustersExportCall struct { + s *Service + name string + exportclusterrequest *ExportClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports data from the cluster. Imperative only. +// +// - name: The resource name of the cluster. +func (r *ProjectsLocationsClustersService) Export(name string, exportclusterrequest *ExportClusterRequest) *ProjectsLocationsClustersExportCall { + c := &ProjectsLocationsClustersExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.exportclusterrequest = exportclusterrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersExportCall) Context(ctx context.Context) *ProjectsLocationsClustersExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersExportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportclusterrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:export") + 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 "alloydb.projects.locations.clusters.export" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsClustersExportCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + type ProjectsLocationsClustersGetCall struct { s *Service name string diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index ab19ea66caa..a82c7cc9e37 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1168,7 +1168,7 @@ } } }, - "revision": "20241114", + "revision": "20241120", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -1738,15 +1738,15 @@ ], "enumDescriptions": [ "No delegation scope specified.", - "Grants access to certificate installation and management.", - "Grants access to managed configurations management.", - "Grants access to blocking uninstallation.", - "Grants access to permission policy and permission grant state.", - "Grants access to package access state.", - "Grants access for enabling system apps.", + "Grants access to certificate installation and management. This scope can be delegated to multiple applications.", + "Grants access to managed configurations management. This scope can be delegated to multiple applications.", + "Grants access to blocking uninstallation. This scope can be delegated to multiple applications.", + "Grants access to permission policy and permission grant state. This scope can be delegated to multiple applications.", + "Grants access to package access state. This scope can be delegated to multiple applications.", + "Grants access for enabling system apps. This scope can be delegated to multiple applications.", "Grants access to network activity logs. Allows the delegated application to call setNetworkLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setNetworkLoggingEnabled%28android.content.ComponentName,%20boolean%29), isNetworkLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isNetworkLoggingEnabled%28android.content.ComponentName%29) and retrieveNetworkLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveNetworkLogs%28android.content.ComponentName,%20long%29) methods. This scope can be delegated to at most one application. Supported for fully managed devices on Android 10 and above. Supported for a work profile on Android 12 and above. When delegation is supported and set, NETWORK_ACTIVITY_LOGS is ignored.", "Grants access to security logs. Allows the delegated application to call setSecurityLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setSecurityLoggingEnabled%28android.content.ComponentName,%20boolean%29), isSecurityLoggingEnabled (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#isSecurityLoggingEnabled%28android.content.ComponentName%29), retrieveSecurityLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrieveSecurityLogs%28android.content.ComponentName%29) and retrievePreRebootSecurityLogs (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#retrievePreRebootSecurityLogs%28android.content.ComponentName%29) methods. This scope can be delegated to at most one application. Supported for fully managed devices and company-owned devices with a work profile on Android 12 and above. When delegation is supported and set, SECURITY_LOGS is ignored.", - "Grants access to selection of KeyChain certificates on behalf of requesting apps. Once granted, the delegated application will start receiving DelegatedAdminReceiver#onChoosePrivateKeyAlias (https://developer.android.com/reference/android/app/admin/DelegatedAdminReceiver#onChoosePrivateKeyAlias%28android.content.Context,%20android.content.Intent,%20int,%20android.net.Uri,%20java.lang.String%29). Allows the delegated application to call grantKeyPairToApp (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#grantKeyPairToApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) and revokeKeyPairFromApp (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#revokeKeyPairFromApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) methods. There can be at most one app that has this delegation. choosePrivateKeyRules must be empty and privateKeySelectionEnabled has no effect if certificate selection is delegated to an application." + "Grants access to selection of KeyChain certificates on behalf of requesting apps. Once granted, the delegated application will start receiving DelegatedAdminReceiver#onChoosePrivateKeyAlias (https://developer.android.com/reference/android/app/admin/DelegatedAdminReceiver#onChoosePrivateKeyAlias%28android.content.Context,%20android.content.Intent,%20int,%20android.net.Uri,%20java.lang.String%29). Allows the delegated application to call grantKeyPairToApp (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#grantKeyPairToApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) and revokeKeyPairFromApp (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#revokeKeyPairFromApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) methods. This scope can be delegated to at most one application. choosePrivateKeyRules must be empty and privateKeySelectionEnabled has no effect if certificate selection is delegated to an application." ], "type": "string" }, diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index 3f5f7b545c4..8efaa83d445 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -889,13 +889,17 @@ type ApplicationPolicy struct { // Possible values: // "DELEGATED_SCOPE_UNSPECIFIED" - No delegation scope specified. // "CERT_INSTALL" - Grants access to certificate installation and management. + // This scope can be delegated to multiple applications. // "MANAGED_CONFIGURATIONS" - Grants access to managed configurations - // management. - // "BLOCK_UNINSTALL" - Grants access to blocking uninstallation. + // management. This scope can be delegated to multiple applications. + // "BLOCK_UNINSTALL" - Grants access to blocking uninstallation. This scope + // can be delegated to multiple applications. // "PERMISSION_GRANT" - Grants access to permission policy and permission - // grant state. - // "PACKAGE_ACCESS" - Grants access to package access state. - // "ENABLE_SYSTEM_APP" - Grants access for enabling system apps. + // grant state. This scope can be delegated to multiple applications. + // "PACKAGE_ACCESS" - Grants access to package access state. This scope can + // be delegated to multiple applications. + // "ENABLE_SYSTEM_APP" - Grants access for enabling system apps. This scope + // can be delegated to multiple applications. // "NETWORK_ACTIVITY_LOGS" - Grants access to network activity logs. Allows // the delegated application to call setNetworkLoggingEnabled // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#setNetworkLoggingEnabled%28android.content.ComponentName,%20boolean%29), @@ -928,7 +932,7 @@ type ApplicationPolicy struct { // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#grantKeyPairToApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) // and revokeKeyPairFromApp // (https://developer.android.com/reference/android/app/admin/DevicePolicyManager#revokeKeyPairFromApp%28android.content.ComponentName,%20java.lang.String,%20java.lang.String%29) - // methods. There can be at most one app that has this delegation. + // methods. This scope can be delegated to at most one application. // choosePrivateKeyRules must be empty and privateKeySelectionEnabled has no // effect if certificate selection is delegated to an application. DelegatedScopes []string `json:"delegatedScopes,omitempty"` diff --git a/binaryauthorization/v1/binaryauthorization-api.json b/binaryauthorization/v1/binaryauthorization-api.json index 5cd0fc97441..50bfb63bd41 100644 --- a/binaryauthorization/v1/binaryauthorization-api.json +++ b/binaryauthorization/v1/binaryauthorization-api.json @@ -747,7 +747,7 @@ } } }, - "revision": "20240614", + "revision": "20241115", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -785,7 +785,6 @@ "type": "string" }, "requireAttestationsBy": { - "description": "Optional. The resource names of the attestors that must attest to a container image, in the format `projects/*/attestors/*`. Each attestor must exist before a policy can reference it. To add an attestor to a policy the principal issuing the policy change request must be able to read the attestor resource. Note: this field must be non-empty when the `evaluation_mode` field specifies `REQUIRE_ATTESTATION`, otherwise it must be empty.", "items": { "type": "string" }, diff --git a/binaryauthorization/v1/binaryauthorization-gen.go b/binaryauthorization/v1/binaryauthorization-gen.go index 229fc92c435..2d0df4a372f 100644 --- a/binaryauthorization/v1/binaryauthorization-gen.go +++ b/binaryauthorization/v1/binaryauthorization-gen.go @@ -272,14 +272,7 @@ type AdmissionRule struct { // attestors listed in `require_attestations_by` have valid attestations for // all of the images in the pod spec. // "ALWAYS_DENY" - This rule denies all pod creations. - EvaluationMode string `json:"evaluationMode,omitempty"` - // RequireAttestationsBy: Optional. The resource names of the attestors that - // must attest to a container image, in the format `projects/*/attestors/*`. - // Each attestor must exist before a policy can reference it. To add an - // attestor to a policy the principal issuing the policy change request must be - // able to read the attestor resource. Note: this field must be non-empty when - // the `evaluation_mode` field specifies `REQUIRE_ATTESTATION`, otherwise it - // must be empty. + EvaluationMode string `json:"evaluationMode,omitempty"` RequireAttestationsBy []string `json:"requireAttestationsBy,omitempty"` // ForceSendFields is a list of field names (e.g. "EnforcementMode") to // unconditionally include in API requests. By default, fields with empty or diff --git a/chromepolicy/v1/chromepolicy-api.json b/chromepolicy/v1/chromepolicy-api.json index 6005ea1ddaf..de14ede5ef9 100644 --- a/chromepolicy/v1/chromepolicy-api.json +++ b/chromepolicy/v1/chromepolicy-api.json @@ -557,7 +557,7 @@ } } }, - "revision": "20241004", + "revision": "20241118", "rootUrl": "https://chromepolicy.googleapis.com/", "schemas": { "GoogleChromePolicyVersionsV1AdditionalTargetKeyName": { @@ -1786,7 +1786,7 @@ "type": "string" }, "syntax": { - "description": "The syntax of the proto file. The supported values are \"proto2\", \"proto3\", and \"editions\". If `edition` is present, this value must be \"editions\".", + "description": "The syntax of the proto file. The supported values are \"proto2\", \"proto3\", and \"editions\". If `edition` is present, this value must be \"editions\". WARNING: This field should only be used by protobuf plugins or special cases like the proto compiler. Other uses are discouraged and developers should rely on the protoreflect APIs for their client language.", "type": "string" } }, diff --git a/chromepolicy/v1/chromepolicy-gen.go b/chromepolicy/v1/chromepolicy-gen.go index b3c3948c99c..fb1d58c4de3 100644 --- a/chromepolicy/v1/chromepolicy-gen.go +++ b/chromepolicy/v1/chromepolicy-gen.go @@ -1814,7 +1814,9 @@ type Proto2FileDescriptorProto struct { Package string `json:"package,omitempty"` // Syntax: The syntax of the proto file. The supported values are "proto2", // "proto3", and "editions". If `edition` is present, this value must be - // "editions". + // "editions". WARNING: This field should only be used by protobuf plugins or + // special cases like the proto compiler. Other uses are discouraged and + // developers should rely on the protoreflect APIs for their client language. Syntax string `json:"syntax,omitempty"` // ForceSendFields is a list of field names (e.g. "EditionDeprecated") to // unconditionally include in API requests. By default, fields with empty or diff --git a/cloudidentity/v1/cloudidentity-api.json b/cloudidentity/v1/cloudidentity-api.json index f5ed5ca6fec..db9c3ce082a 100644 --- a/cloudidentity/v1/cloudidentity-api.json +++ b/cloudidentity/v1/cloudidentity-api.json @@ -17,6 +17,12 @@ "https://www.googleapis.com/auth/cloud-identity.groups.readonly": { "description": "See any Cloud Identity Groups that you can access, including group members and their emails" }, + "https://www.googleapis.com/auth/cloud-identity.inboundsso": { + "description": "See and edit all of the Inbound SSO profiles and their assignments to any Org Units or Google Groups in your Cloud Identity Organization." + }, + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly": { + "description": "See all of the Inbound SSO profiles and their assignments to any Org Units or Google Groups in your Cloud Identity Organization." + }, "https://www.googleapis.com/auth/cloud-platform": { "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." } @@ -1610,6 +1616,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1635,6 +1642,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1660,6 +1668,8 @@ "$ref": "InboundSamlSsoProfile" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1692,6 +1702,8 @@ "$ref": "ListInboundSamlSsoProfilesResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1726,6 +1738,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] } @@ -1758,6 +1771,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1783,6 +1797,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1808,6 +1823,8 @@ "$ref": "IdpCredential" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1844,6 +1861,8 @@ "$ref": "ListIdpCredentialsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] } @@ -1868,6 +1887,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1893,6 +1913,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1918,6 +1939,8 @@ "$ref": "InboundSsoAssignment" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1950,6 +1973,8 @@ "$ref": "ListInboundSsoAssignmentsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1984,13 +2009,14 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] } } } }, - "revision": "20240924", + "revision": "20241119", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { diff --git a/cloudidentity/v1/cloudidentity-gen.go b/cloudidentity/v1/cloudidentity-gen.go index 1b88815924d..efb7c9f597a 100644 --- a/cloudidentity/v1/cloudidentity-gen.go +++ b/cloudidentity/v1/cloudidentity-gen.go @@ -118,6 +118,14 @@ const ( // and their emails CloudIdentityGroupsReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.groups.readonly" + // See and edit all of the Inbound SSO profiles and their assignments to any + // Org Units or Google Groups in your Cloud Identity Organization. + CloudIdentityInboundssoScope = "https://www.googleapis.com/auth/cloud-identity.inboundsso" + + // See all of the Inbound SSO profiles and their assignments to any Org Units + // or Google Groups in your Cloud Identity Organization. + CloudIdentityInboundssoReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly" + // See, edit, configure, and delete your Google Cloud data and see the email // address for your Google Account. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" @@ -131,6 +139,8 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err "https://www.googleapis.com/auth/cloud-identity.devices.readonly", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform", ) // NOTE: prepend, so we don't override user-specified scopes. diff --git a/cloudidentity/v1beta1/cloudidentity-api.json b/cloudidentity/v1beta1/cloudidentity-api.json index e306a4da936..a737992891c 100644 --- a/cloudidentity/v1beta1/cloudidentity-api.json +++ b/cloudidentity/v1beta1/cloudidentity-api.json @@ -17,6 +17,18 @@ "https://www.googleapis.com/auth/cloud-identity.groups.readonly": { "description": "See any Cloud Identity Groups that you can access, including group members and their emails" }, + "https://www.googleapis.com/auth/cloud-identity.inboundsso": { + "description": "See and edit all of the Inbound SSO profiles and their assignments to any Org Units or Google Groups in your Cloud Identity Organization." + }, + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly": { + "description": "See all of the Inbound SSO profiles and their assignments to any Org Units or Google Groups in your Cloud Identity Organization." + }, + "https://www.googleapis.com/auth/cloud-identity.policies": { + "description": "See and edit policies in your Cloud Identity Organization." + }, + "https://www.googleapis.com/auth/cloud-identity.policies.readonly": { + "description": "See policies in your Cloud Identity Organization." + }, "https://www.googleapis.com/auth/cloud-platform": { "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." } @@ -1559,6 +1571,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1584,6 +1597,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1609,6 +1623,8 @@ "$ref": "InboundSamlSsoProfile" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1641,6 +1657,8 @@ "$ref": "ListInboundSamlSsoProfilesResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1675,6 +1693,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] } @@ -1707,6 +1726,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1732,6 +1752,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1757,6 +1778,8 @@ "$ref": "IdpCredential" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1793,6 +1816,8 @@ "$ref": "ListIdpCredentialsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] } @@ -1817,6 +1842,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1842,6 +1868,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1867,6 +1894,8 @@ "$ref": "InboundSsoAssignment" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1899,6 +1928,8 @@ "$ref": "ListInboundSsoAssignmentsResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", "https://www.googleapis.com/auth/cloud-platform" ] }, @@ -1933,6 +1964,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.inboundsso", "https://www.googleapis.com/auth/cloud-platform" ] } @@ -2036,7 +2068,11 @@ "path": "v1beta1/{+name}", "response": { "$ref": "Policy" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.policies", + "https://www.googleapis.com/auth/cloud-identity.policies.readonly" + ] }, "list": { "description": "List Policies", @@ -2065,12 +2101,16 @@ "path": "v1beta1/policies", "response": { "$ref": "ListPoliciesResponse" - } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-identity.policies", + "https://www.googleapis.com/auth/cloud-identity.policies.readonly" + ] } } } }, - "revision": "20241021", + "revision": "20241119", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { @@ -4934,7 +4974,7 @@ "type": "string" }, "sortOrder": { - "description": "Output only. The decimal sort order of this PolicyQuery. The value is relative to all other policies with the same setting type within the whole customer. (there are no duplicates within this set).", + "description": "Output only. The decimal sort order of this PolicyQuery. The value is relative to all other policies with the same setting type within the whole customer. (There are no duplicates within this set.)", "format": "double", "readOnly": true, "type": "number" diff --git a/cloudidentity/v1beta1/cloudidentity-gen.go b/cloudidentity/v1beta1/cloudidentity-gen.go index c11a6566296..52264cd46d3 100644 --- a/cloudidentity/v1beta1/cloudidentity-gen.go +++ b/cloudidentity/v1beta1/cloudidentity-gen.go @@ -118,6 +118,20 @@ const ( // and their emails CloudIdentityGroupsReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.groups.readonly" + // See and edit all of the Inbound SSO profiles and their assignments to any + // Org Units or Google Groups in your Cloud Identity Organization. + CloudIdentityInboundssoScope = "https://www.googleapis.com/auth/cloud-identity.inboundsso" + + // See all of the Inbound SSO profiles and their assignments to any Org Units + // or Google Groups in your Cloud Identity Organization. + CloudIdentityInboundssoReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly" + + // See and edit policies in your Cloud Identity Organization. + CloudIdentityPoliciesScope = "https://www.googleapis.com/auth/cloud-identity.policies" + + // See policies in your Cloud Identity Organization. + CloudIdentityPoliciesReadonlyScope = "https://www.googleapis.com/auth/cloud-identity.policies.readonly" + // See, edit, configure, and delete your Google Cloud data and see the email // address for your Google Account. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" @@ -131,6 +145,10 @@ func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, err "https://www.googleapis.com/auth/cloud-identity.devices.readonly", "https://www.googleapis.com/auth/cloud-identity.groups", "https://www.googleapis.com/auth/cloud-identity.groups.readonly", + "https://www.googleapis.com/auth/cloud-identity.inboundsso", + "https://www.googleapis.com/auth/cloud-identity.inboundsso.readonly", + "https://www.googleapis.com/auth/cloud-identity.policies", + "https://www.googleapis.com/auth/cloud-identity.policies.readonly", "https://www.googleapis.com/auth/cloud-platform", ) // NOTE: prepend, so we don't override user-specified scopes. @@ -3594,7 +3612,7 @@ type PolicyQuery struct { Query string `json:"query,omitempty"` // SortOrder: Output only. The decimal sort order of this PolicyQuery. The // value is relative to all other policies with the same setting type within - // the whole customer. (there are no duplicates within this set). + // the whole customer. (There are no duplicates within this set.) SortOrder float64 `json:"sortOrder,omitempty"` // ForceSendFields is a list of field names (e.g. "Group") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/cloudshell/v1/cloudshell-api.json b/cloudshell/v1/cloudshell-api.json index c394f3e730e..77d9fb9d4be 100644 --- a/cloudshell/v1/cloudshell-api.json +++ b/cloudshell/v1/cloudshell-api.json @@ -108,7 +108,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "cloudshell.operations.cancel", @@ -374,7 +374,7 @@ } } }, - "revision": "20230807", + "revision": "20241118", "rootUrl": "https://cloudshell.googleapis.com/", "schemas": { "AddPublicKeyMetadata": { diff --git a/cloudshell/v1/cloudshell-gen.go b/cloudshell/v1/cloudshell-gen.go index 9ff66ec7a9c..acd3c04f280 100644 --- a/cloudshell/v1/cloudshell-gen.go +++ b/cloudshell/v1/cloudshell-gen.go @@ -614,7 +614,7 @@ type OperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/content/v2.1/content-api.json b/content/v2.1/content-api.json index 02998b3002f..46a828dab56 100644 --- a/content/v2.1/content-api.json +++ b/content/v2.1/content-api.json @@ -4570,7 +4570,7 @@ } } }, - "revision": "20241023", + "revision": "20241119", "rootUrl": "https://shoppingcontent.googleapis.com/", "schemas": { "Account": { @@ -8979,6 +8979,10 @@ "description": "Required. The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. It must be provided so that system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.", "type": "string" }, + "shippingLabel": { + "description": "Optional. The shipping label for the loyalty program. You can use this label to indicate whether this offer has the loyalty shipping benefit. If not specified, the item is not eligible for loyalty shipping for the given loyalty tier.", + "type": "string" + }, "tierLabel": { "description": "Required. The label of the tier within the loyalty program. Must match one of the labels within the program.", "type": "string" diff --git a/content/v2.1/content-gen.go b/content/v2.1/content-gen.go index 49c6d74a123..534636c19f2 100644 --- a/content/v2.1/content-gen.go +++ b/content/v2.1/content-gen.go @@ -6500,6 +6500,11 @@ type LoyaltyProgram struct { // associate the assets below (for example, price and points) with a merchant. // The corresponding program must be linked to the merchant account. ProgramLabel string `json:"programLabel,omitempty"` + // ShippingLabel: Optional. The shipping label for the loyalty program. You can + // use this label to indicate whether this offer has the loyalty shipping + // benefit. If not specified, the item is not eligible for loyalty shipping for + // the given loyalty tier. + ShippingLabel string `json:"shippingLabel,omitempty"` // TierLabel: Required. The label of the tier within the loyalty program. Must // match one of the labels within the program. TierLabel string `json:"tierLabel,omitempty"` diff --git a/drive/v3/drive-api.json b/drive/v3/drive-api.json index da9e3a48daa..1a8350e326b 100644 --- a/drive/v3/drive-api.json +++ b/drive/v3/drive-api.json @@ -1817,7 +1817,7 @@ "operation": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "operation/{name}:cancel", "httpMethod": "POST", "id": "drive.operation.cancel", @@ -2774,7 +2774,7 @@ } } }, - "revision": "20241110", + "revision": "20241117", "rootUrl": "https://www.googleapis.com/", "schemas": { "About": { diff --git a/drive/v3/drive-gen.go b/drive/v3/drive-gen.go index d7d0c23e3c7..924c63bf7b1 100644 --- a/drive/v3/drive-gen.go +++ b/drive/v3/drive-gen.go @@ -7824,7 +7824,7 @@ type OperationCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/iam/v1/iam-api.json b/iam/v1/iam-api.json index d316f1ad596..0a579afce4f 100644 --- a/iam/v1/iam-api.json +++ b/iam/v1/iam-api.json @@ -1325,7 +1325,7 @@ ], "parameters": { "name": { - "description": "Immutable. The resource name of the OauthClient. Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client}`.", + "description": "Immutable. Identifier. The resource name of the OauthClient. Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+$", "required": true, @@ -1499,7 +1499,7 @@ ], "parameters": { "name": { - "description": "Immutable. The resource name of the OauthClientCredential. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`", + "description": "Immutable. Identifier. The resource name of the OauthClientCredential. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/oauthClients/[^/]+/credentials/[^/]+$", "required": true, @@ -3188,7 +3188,7 @@ } } }, - "revision": "20241028", + "revision": "20241114", "rootUrl": "https://iam.googleapis.com/", "schemas": { "AccessRestrictions": { @@ -4097,7 +4097,7 @@ "type": "string" }, "name": { - "description": "Immutable. The resource name of the OauthClient. Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client}`.", + "description": "Immutable. Identifier. The resource name of the OauthClient. Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client}`.", "type": "string" }, "state": { @@ -4136,7 +4136,7 @@ "type": "string" }, "name": { - "description": "Immutable. The resource name of the OauthClientCredential. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`", + "description": "Immutable. Identifier. The resource name of the OauthClientCredential. Format: `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credentials/{credential}`", "type": "string" } }, @@ -4147,7 +4147,7 @@ "id": "Oidc", "properties": { "allowedAudiences": { - "description": "Acceptable values for the `aud` field (audience) in the OIDC token. Token exchange requests are rejected if the token audience does not match one of the configured values. Each audience may be at most 256 characters. A maximum of 10 audiences may be configured. If this list is empty, the OIDC token audience must be equal to the full canonical resource name of the WorkloadIdentityPoolProvider, with or without the HTTPS prefix. For example: ``` //iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ ```", + "description": "Optional. Acceptable values for the `aud` field (audience) in the OIDC token. Token exchange requests are rejected if the token audience does not match one of the configured values. Each audience may be at most 256 characters. A maximum of 10 audiences may be configured. If this list is empty, the OIDC token audience must be equal to the full canonical resource name of the WorkloadIdentityPoolProvider, with or without the HTTPS prefix. For example: ``` //iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ ```", "items": { "type": "string" }, @@ -4209,7 +4209,7 @@ "type": "string" }, "cancelRequested": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have google.longrunning.Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "readOnly": true, "type": "boolean" }, @@ -5169,15 +5169,15 @@ "id": "WorkloadIdentityPool", "properties": { "description": { - "description": "A description of the pool. Cannot exceed 256 characters.", + "description": "Optional. A description of the pool. Cannot exceed 256 characters.", "type": "string" }, "disabled": { - "description": "Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again.", + "description": "Optional. Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again.", "type": "boolean" }, "displayName": { - "description": "A display name for the pool. Cannot exceed 32 characters.", + "description": "Optional. A display name for the pool. Cannot exceed 32 characters.", "type": "string" }, "expireTime": { @@ -5220,14 +5220,14 @@ "id": "WorkloadIdentityPoolProvider", "properties": { "attributeCondition": { - "description": "[A Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: * `assertion`: JSON representing the authentication credential issued by the provider. * `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. * `attribute`: The custom attributes mapped from the assertion in the `attribute_mappings`. The maximum length of the attribute condition expression is 4096 characters. If unspecified, all valid authentication credential are accepted. The following example shows how to only allow credentials with a mapped `google.groups` value of `admins`: ``` \"'admins' in google.groups\" ```", + "description": "Optional. [A Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: * `assertion`: JSON representing the authentication credential issued by the provider. * `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. * `attribute`: The custom attributes mapped from the assertion in the `attribute_mappings`. The maximum length of the attribute condition expression is 4096 characters. If unspecified, all valid authentication credential are accepted. The following example shows how to only allow credentials with a mapped `google.groups` value of `admins`: ``` \"'admins' in google.groups\" ```", "type": "string" }, "attributeMapping": { "additionalProperties": { "type": "string" }, - "description": " Maps attributes from authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: * `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. Cannot exceed 127 bytes. * `google.groups`: Groups the external identity belongs to. You can grant groups access to resources using an IAM `principalSet` binding; access applies to all members of the group. You can also provide custom attributes by specifying `attribute.{custom_attribute}`, where `{custom_attribute}` is the name of the custom attribute to be mapped. You can define a maximum of 50 custom attributes. The maximum length of a mapped attribute key is 100 characters, and the key may only contain the characters [a-z0-9_]. You can reference these attributes in IAM policies to define fine-grained access for a workload to Google Cloud resources. For example: * `google.subject`: `principal://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/subject/{value}` * `google.groups`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/group/{value}` * `attribute.{custom_attribute}`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/attribute.{custom_attribute}/{value}` Each value must be a [Common Expression Language] (https://opensource.google/projects/cel) function that maps an identity provider credential to the normalized attribute specified by the corresponding map key. You can use the `assertion` keyword in the expression to access a JSON representation of the authentication credential issued by the provider. The maximum length of an attribute mapping expression is 2048 characters. When evaluated, the total size of all mapped attributes must not exceed 8KB. For AWS providers, if no attribute mapping is defined, the following default mapping applies: ``` { \"google.subject\":\"assertion.arn\", \"attribute.aws_role\": \"assertion.arn.contains('assumed-role')\" \" ? assertion.arn.extract('{account_arn}assumed-role/')\" \" + 'assumed-role/'\" \" + assertion.arn.extract('assumed-role/{role_name}/')\" \" : assertion.arn\", } ``` If any custom attribute mappings are defined, they must include a mapping to the `google.subject` attribute. For OIDC providers, you must supply a custom mapping, which must include the `google.subject` attribute. For example, the following maps the `sub` claim of the incoming credential to the `subject` attribute on a Google token: ``` {\"google.subject\": \"assertion.sub\"} ```", + "description": "Optional. Maps attributes from authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: * `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. Cannot exceed 127 bytes. * `google.groups`: Groups the external identity belongs to. You can grant groups access to resources using an IAM `principalSet` binding; access applies to all members of the group. You can also provide custom attributes by specifying `attribute.{custom_attribute}`, where `{custom_attribute}` is the name of the custom attribute to be mapped. You can define a maximum of 50 custom attributes. The maximum length of a mapped attribute key is 100 characters, and the key may only contain the characters [a-z0-9_]. You can reference these attributes in IAM policies to define fine-grained access for a workload to Google Cloud resources. For example: * `google.subject`: `principal://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/subject/{value}` * `google.groups`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/group/{value}` * `attribute.{custom_attribute}`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/attribute.{custom_attribute}/{value}` Each value must be a [Common Expression Language] (https://opensource.google/projects/cel) function that maps an identity provider credential to the normalized attribute specified by the corresponding map key. You can use the `assertion` keyword in the expression to access a JSON representation of the authentication credential issued by the provider. The maximum length of an attribute mapping expression is 2048 characters. When evaluated, the total size of all mapped attributes must not exceed 8KB. For AWS providers, if no attribute mapping is defined, the following default mapping applies: ``` { \"google.subject\":\"assertion.arn\", \"attribute.aws_role\": \"assertion.arn.contains('assumed-role')\" \" ? assertion.arn.extract('{account_arn}assumed-role/')\" \" + 'assumed-role/'\" \" + assertion.arn.extract('assumed-role/{role_name}/')\" \" : assertion.arn\", } ``` If any custom attribute mappings are defined, they must include a mapping to the `google.subject` attribute. For OIDC providers, you must supply a custom mapping, which must include the `google.subject` attribute. For example, the following maps the `sub` claim of the incoming credential to the `subject` attribute on a Google token: ``` {\"google.subject\": \"assertion.sub\"} ```", "type": "object" }, "aws": { @@ -5235,15 +5235,15 @@ "description": "An Amazon Web Services identity provider." }, "description": { - "description": "A description for the provider. Cannot exceed 256 characters.", + "description": "Optional. A description for the provider. Cannot exceed 256 characters.", "type": "string" }, "disabled": { - "description": "Whether the provider is disabled. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access.", + "description": "Optional. Whether the provider is disabled. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access.", "type": "boolean" }, "displayName": { - "description": "A display name for the provider. Cannot exceed 32 characters.", + "description": "Optional. A display name for the provider. Cannot exceed 32 characters.", "type": "string" }, "expireTime": { diff --git a/iam/v1/iam-gen.go b/iam/v1/iam-gen.go index 2936de90b42..8d3d42ea281 100644 --- a/iam/v1/iam-gen.go +++ b/iam/v1/iam-gen.go @@ -1956,7 +1956,7 @@ type OauthClient struct { // ExpireTime: Output only. Time after which the OauthClient will be // permanently purged and cannot be recovered. ExpireTime string `json:"expireTime,omitempty"` - // Name: Immutable. The resource name of the OauthClient. + // Name: Immutable. Identifier. The resource name of the OauthClient. // Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client}`. Name string `json:"name,omitempty"` // State: Output only. The state of the OauthClient. @@ -2005,7 +2005,8 @@ type OauthClientCredential struct { // DisplayName: Optional. A user-specified display name of the // OauthClientCredential. Cannot exceed 32 characters. DisplayName string `json:"displayName,omitempty"` - // Name: Immutable. The resource name of the OauthClientCredential. Format: + // Name: Immutable. Identifier. The resource name of the OauthClientCredential. + // Format: // `projects/{project}/locations/{location}/oauthClients/{oauth_client}/credenti // als/{credential}` Name string `json:"name,omitempty"` @@ -2032,13 +2033,13 @@ func (s OauthClientCredential) MarshalJSON() ([]byte, error) { // Oidc: Represents an OpenId Connect 1.0 identity provider. type Oidc struct { - // AllowedAudiences: Acceptable values for the `aud` field (audience) in the - // OIDC token. Token exchange requests are rejected if the token audience does - // not match one of the configured values. Each audience may be at most 256 - // characters. A maximum of 10 audiences may be configured. If this list is - // empty, the OIDC token audience must be equal to the full canonical resource - // name of the WorkloadIdentityPoolProvider, with or without the HTTPS prefix. - // For example: ``` + // AllowedAudiences: Optional. Acceptable values for the `aud` field (audience) + // in the OIDC token. Token exchange requests are rejected if the token + // audience does not match one of the configured values. Each audience may be + // at most 256 characters. A maximum of 10 audiences may be configured. If this + // list is empty, the OIDC token audience must be equal to the full canonical + // resource name of the WorkloadIdentityPoolProvider, with or without the HTTPS + // prefix. For example: ``` // //iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ // https://iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ // ``` @@ -2124,8 +2125,8 @@ type OperationMetadata struct { ApiVersion string `json:"apiVersion,omitempty"` // CancelRequested: Output only. Identifies whether the user has requested // cancellation of the operation. Operations that have been cancelled - // successfully have Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. + // successfully have google.longrunning.Operation.error value with a + // google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. CancelRequested bool `json:"cancelRequested,omitempty"` // CreateTime: Output only. The time the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -3466,13 +3467,15 @@ func (s WorkforcePoolProviderKey) MarshalJSON() ([]byte, error) { // can define IAM policies to grant these identities access to Google Cloud // resources. type WorkloadIdentityPool struct { - // Description: A description of the pool. Cannot exceed 256 characters. + // Description: Optional. A description of the pool. Cannot exceed 256 + // characters. Description string `json:"description,omitempty"` - // Disabled: Whether the pool is disabled. You cannot use a disabled pool to - // exchange tokens, or use existing tokens to access resources. If the pool is - // re-enabled, existing tokens grant access again. + // Disabled: Optional. Whether the pool is disabled. You cannot use a disabled + // pool to exchange tokens, or use existing tokens to access resources. If the + // pool is re-enabled, existing tokens grant access again. Disabled bool `json:"disabled,omitempty"` - // DisplayName: A display name for the pool. Cannot exceed 32 characters. + // DisplayName: Optional. A display name for the pool. Cannot exceed 32 + // characters. DisplayName string `json:"displayName,omitempty"` // ExpireTime: Output only. Time after which the workload identity pool will be // permanently purged and cannot be recovered. @@ -3520,7 +3523,7 @@ type WorkloadIdentityPoolOperationMetadata struct { // WorkloadIdentityPoolProvider: A configuration for an external identity // provider. type WorkloadIdentityPoolProvider struct { - // AttributeCondition: A Common Expression Language + // AttributeCondition: Optional. A Common Expression Language // (https://opensource.google/projects/cel) expression, in plain text, to // restrict what otherwise valid authentication credentials issued by the // provider should not be accepted. The expression must output a boolean @@ -3535,22 +3538,22 @@ type WorkloadIdentityPoolProvider struct { // credentials with a mapped `google.groups` value of `admins`: ``` "'admins' // in google.groups" ``` AttributeCondition string `json:"attributeCondition,omitempty"` - // AttributeMapping: Maps attributes from authentication credentials issued by - // an external identity provider to Google Cloud attributes, such as `subject` - // and `segment`. Each key must be a string specifying the Google Cloud IAM - // attribute to map to. The following keys are supported: * `google.subject`: - // The principal IAM is authenticating. You can reference this value in IAM - // bindings. This is also the subject that appears in Cloud Logging logs. - // Cannot exceed 127 bytes. * `google.groups`: Groups the external identity - // belongs to. You can grant groups access to resources using an IAM - // `principalSet` binding; access applies to all members of the group. You can - // also provide custom attributes by specifying `attribute.{custom_attribute}`, - // where `{custom_attribute}` is the name of the custom attribute to be mapped. - // You can define a maximum of 50 custom attributes. The maximum length of a - // mapped attribute key is 100 characters, and the key may only contain the - // characters [a-z0-9_]. You can reference these attributes in IAM policies to - // define fine-grained access for a workload to Google Cloud resources. For - // example: * `google.subject`: + // AttributeMapping: Optional. Maps attributes from authentication credentials + // issued by an external identity provider to Google Cloud attributes, such as + // `subject` and `segment`. Each key must be a string specifying the Google + // Cloud IAM attribute to map to. The following keys are supported: * + // `google.subject`: The principal IAM is authenticating. You can reference + // this value in IAM bindings. This is also the subject that appears in Cloud + // Logging logs. Cannot exceed 127 bytes. * `google.groups`: Groups the + // external identity belongs to. You can grant groups access to resources using + // an IAM `principalSet` binding; access applies to all members of the group. + // You can also provide custom attributes by specifying + // `attribute.{custom_attribute}`, where `{custom_attribute}` is the name of + // the custom attribute to be mapped. You can define a maximum of 50 custom + // attributes. The maximum length of a mapped attribute key is 100 characters, + // and the key may only contain the characters [a-z0-9_]. You can reference + // these attributes in IAM policies to define fine-grained access for a + // workload to Google Cloud resources. For example: * `google.subject`: // `principal://iam.googleapis.com/projects/{project}/locations/{location}/workl // oadIdentityPools/{pool}/subject/{value}` * `google.groups`: // `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/wo @@ -3578,12 +3581,15 @@ type WorkloadIdentityPoolProvider struct { AttributeMapping map[string]string `json:"attributeMapping,omitempty"` // Aws: An Amazon Web Services identity provider. Aws *Aws `json:"aws,omitempty"` - // Description: A description for the provider. Cannot exceed 256 characters. + // Description: Optional. A description for the provider. Cannot exceed 256 + // characters. Description string `json:"description,omitempty"` - // Disabled: Whether the provider is disabled. You cannot use a disabled - // provider to exchange tokens. However, existing tokens still grant access. + // Disabled: Optional. Whether the provider is disabled. You cannot use a + // disabled provider to exchange tokens. However, existing tokens still grant + // access. Disabled bool `json:"disabled,omitempty"` - // DisplayName: A display name for the provider. Cannot exceed 32 characters. + // DisplayName: Optional. A display name for the provider. Cannot exceed 32 + // characters. DisplayName string `json:"displayName,omitempty"` // ExpireTime: Output only. Time after which the workload identity pool // provider will be permanently purged and cannot be recovered. @@ -8239,7 +8245,7 @@ type ProjectsLocationsOauthClientsPatchCall struct { // Patch: Updates an existing OauthClient. // -// - name: Immutable. The resource name of the OauthClient. +// - name: Immutable. Identifier. The resource name of the OauthClient. // Format:`projects/{project}/locations/{location}/oauthClients/{oauth_client} // `. func (r *ProjectsLocationsOauthClientsService) Patch(name string, oauthclient *OauthClient) *ProjectsLocationsOauthClientsPatchCall { @@ -8881,7 +8887,8 @@ type ProjectsLocationsOauthClientsCredentialsPatchCall struct { // Patch: Updates an existing OauthClientCredential. // -// - name: Immutable. The resource name of the OauthClientCredential. Format: +// - name: Immutable. Identifier. The resource name of the +// OauthClientCredential. Format: // `projects/{project}/locations/{location}/oauthClients/{oauth_client}/creden // tials/{credential}`. func (r *ProjectsLocationsOauthClientsCredentialsService) Patch(name string, oauthclientcredential *OauthClientCredential) *ProjectsLocationsOauthClientsCredentialsPatchCall { diff --git a/iam/v2/iam-api.json b/iam/v2/iam-api.json index fb2b251f272..17ad4ead371 100644 --- a/iam/v2/iam-api.json +++ b/iam/v2/iam-api.json @@ -293,7 +293,7 @@ } } }, - "revision": "20240530", + "revision": "20241114", "rootUrl": "https://iam.googleapis.com/", "schemas": { "CloudControl2SharedOperationsReconciliationOperationMetadata": { @@ -337,7 +337,7 @@ "type": "string" }, "cancelRequested": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have google.longrunning.Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "readOnly": true, "type": "boolean" }, diff --git a/iam/v2/iam-gen.go b/iam/v2/iam-gen.go index 68433e6b73d..bb54c16f894 100644 --- a/iam/v2/iam-gen.go +++ b/iam/v2/iam-gen.go @@ -217,8 +217,8 @@ type GoogleCloudCommonOperationMetadata struct { ApiVersion string `json:"apiVersion,omitempty"` // CancelRequested: Output only. Identifies whether the user has requested // cancellation of the operation. Operations that have been cancelled - // successfully have Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. + // successfully have google.longrunning.Operation.error value with a + // google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. CancelRequested bool `json:"cancelRequested,omitempty"` // CreateTime: Output only. The time the operation was created. CreateTime string `json:"createTime,omitempty"` diff --git a/merchantapi/accounts_v1beta/merchantapi-api.json b/merchantapi/accounts_v1beta/merchantapi-api.json index ed1ac5e66ac..a4a92231a7d 100644 --- a/merchantapi/accounts_v1beta/merchantapi-api.json +++ b/merchantapi/accounts_v1beta/merchantapi-api.json @@ -1417,7 +1417,7 @@ } } }, - "revision": "20241115", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Accepted": { @@ -2762,7 +2762,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/accounts_v1beta/merchantapi-gen.go b/merchantapi/accounts_v1beta/merchantapi-gen.go index b14ec60e7f8..526101a538c 100644 --- a/merchantapi/accounts_v1beta/merchantapi-gen.go +++ b/merchantapi/accounts_v1beta/merchantapi-gen.go @@ -2095,7 +2095,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/conversions_v1beta/merchantapi-api.json b/merchantapi/conversions_v1beta/merchantapi-api.json index ad8d7806b42..046207f6b63 100644 --- a/merchantapi/conversions_v1beta/merchantapi-api.json +++ b/merchantapi/conversions_v1beta/merchantapi-api.json @@ -295,7 +295,7 @@ } } }, - "revision": "20241101", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "AttributionSettings": { @@ -597,7 +597,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/conversions_v1beta/merchantapi-gen.go b/merchantapi/conversions_v1beta/merchantapi-gen.go index 70f4a7bd971..cddc913a770 100644 --- a/merchantapi/conversions_v1beta/merchantapi-gen.go +++ b/merchantapi/conversions_v1beta/merchantapi-gen.go @@ -482,7 +482,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/datasources_v1beta/merchantapi-api.json b/merchantapi/datasources_v1beta/merchantapi-api.json index b556d1ad4e1..4223a8d64e3 100644 --- a/merchantapi/datasources_v1beta/merchantapi-api.json +++ b/merchantapi/datasources_v1beta/merchantapi-api.json @@ -321,7 +321,7 @@ } } }, - "revision": "20241112", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "DataSource": { @@ -861,7 +861,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/datasources_v1beta/merchantapi-gen.go b/merchantapi/datasources_v1beta/merchantapi-gen.go index 338eb6af031..556ab852e81 100644 --- a/merchantapi/datasources_v1beta/merchantapi-gen.go +++ b/merchantapi/datasources_v1beta/merchantapi-gen.go @@ -738,7 +738,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/inventories_v1beta/merchantapi-api.json b/merchantapi/inventories_v1beta/merchantapi-api.json index fe86163cc29..ec779881f58 100644 --- a/merchantapi/inventories_v1beta/merchantapi-api.json +++ b/merchantapi/inventories_v1beta/merchantapi-api.json @@ -300,7 +300,7 @@ } } }, - "revision": "20241115", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "CustomAttribute": { @@ -573,7 +573,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/inventories_v1beta/merchantapi-gen.go b/merchantapi/inventories_v1beta/merchantapi-gen.go index d57711065a6..61e7f9cad2a 100644 --- a/merchantapi/inventories_v1beta/merchantapi-gen.go +++ b/merchantapi/inventories_v1beta/merchantapi-gen.go @@ -504,7 +504,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/lfp_v1beta/merchantapi-api.json b/merchantapi/lfp_v1beta/merchantapi-api.json index 2a767fc4939..96a45c05230 100644 --- a/merchantapi/lfp_v1beta/merchantapi-api.json +++ b/merchantapi/lfp_v1beta/merchantapi-api.json @@ -298,7 +298,7 @@ } } }, - "revision": "20241101", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Empty": { @@ -647,7 +647,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/lfp_v1beta/merchantapi-gen.go b/merchantapi/lfp_v1beta/merchantapi-gen.go index f35c9f85608..90176a27e83 100644 --- a/merchantapi/lfp_v1beta/merchantapi-gen.go +++ b/merchantapi/lfp_v1beta/merchantapi-gen.go @@ -553,7 +553,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/notifications_v1beta/merchantapi-api.json b/merchantapi/notifications_v1beta/merchantapi-api.json index e186c989633..9e971193437 100644 --- a/merchantapi/notifications_v1beta/merchantapi-api.json +++ b/merchantapi/notifications_v1beta/merchantapi-api.json @@ -262,7 +262,7 @@ } } }, - "revision": "20241101", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Empty": { @@ -436,7 +436,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/notifications_v1beta/merchantapi-gen.go b/merchantapi/notifications_v1beta/merchantapi-gen.go index 6695e2cba5a..043f07f2c6b 100644 --- a/merchantapi/notifications_v1beta/merchantapi-gen.go +++ b/merchantapi/notifications_v1beta/merchantapi-gen.go @@ -340,7 +340,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/products_v1beta/merchantapi-api.json b/merchantapi/products_v1beta/merchantapi-api.json index 68b13f874aa..df21a80773d 100644 --- a/merchantapi/products_v1beta/merchantapi-api.json +++ b/merchantapi/products_v1beta/merchantapi-api.json @@ -242,7 +242,7 @@ } } }, - "revision": "20241101", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Attributes": { @@ -1118,6 +1118,10 @@ "description": "The label of the loyalty program. This is an internal label that uniquely identifies the relationship between a merchant entity and a loyalty program entity. The label must be provided so that the system can associate the assets below (for example, price and points) with a merchant. The corresponding program must be linked to the merchant account.", "type": "string" }, + "shippingLabel": { + "description": "The label of the shipping benefit. If the field has value, this offer has loyalty shipping benefit. If the field value isn't provided, the item is not eligible for loyalty shipping for the given loyalty tier.", + "type": "string" + }, "tierLabel": { "description": "The label of the tier within the loyalty program. Must match one of the labels within the program.", "type": "string" @@ -1330,7 +1334,7 @@ "type": "object" }, "ProductInput": { - "description": "This resource represents input data you submit for a product, not the processed product that you see in Merchant Center, in Shopping ads, or across Google surfaces. Product inputs, rules and supplemental data source data are combined to create the processed product. Required product input attributes to pass data validation checks are primarily defined in the [Products Data Specification](https://support.google.com/merchants/answer/188494). The following attributes are required: feedLabel, contentLanguage and offerId. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. All fields in the product input and its sub-messages match the English name of their corresponding attribute in the vertical spec with [some exceptions](https://support.google.com/merchants/answer/7052112).", + "description": "This resource represents input data you submit for a product, not the processed product that you see in Merchant Center, in Shopping ads, or across Google surfaces. Product inputs, rules and supplemental data source data are combined to create the processed Product. Required product input attributes to pass data validation checks are primarily defined in the [Products Data Specification](https://support.google.com/merchants/answer/188494). The following attributes are required: feedLabel, contentLanguage and offerId. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. All fields in the product input and its sub-messages match the English name of their corresponding attribute in the vertical spec with [some exceptions](https://support.google.com/merchants/answer/7052112).", "id": "ProductInput", "properties": { "attributes": { @@ -1451,7 +1455,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/products_v1beta/merchantapi-gen.go b/merchantapi/products_v1beta/merchantapi-gen.go index 84e21434748..a002eb34b72 100644 --- a/merchantapi/products_v1beta/merchantapi-gen.go +++ b/merchantapi/products_v1beta/merchantapi-gen.go @@ -958,6 +958,10 @@ type LoyaltyProgram struct { // associate the assets below (for example, price and points) with a merchant. // The corresponding program must be linked to the merchant account. ProgramLabel string `json:"programLabel,omitempty"` + // ShippingLabel: The label of the shipping benefit. If the field has value, + // this offer has loyalty shipping benefit. If the field value isn't provided, + // the item is not eligible for loyalty shipping for the given loyalty tier. + ShippingLabel string `json:"shippingLabel,omitempty"` // TierLabel: The label of the tier within the loyalty program. Must match one // of the labels within the program. TierLabel string `json:"tierLabel,omitempty"` @@ -1220,7 +1224,7 @@ func (s *ProductDimension) UnmarshalJSON(data []byte) error { // ProductInput: This resource represents input data you submit for a product, // not the processed product that you see in Merchant Center, in Shopping ads, // or across Google surfaces. Product inputs, rules and supplemental data -// source data are combined to create the processed product. Required product +// source data are combined to create the processed Product. Required product // input attributes to pass data validation checks are primarily defined in the // Products Data Specification // (https://support.google.com/merchants/answer/188494). The following @@ -1352,7 +1356,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/promotions_v1beta/merchantapi-api.json b/merchantapi/promotions_v1beta/merchantapi-api.json index fe95f6dc0ab..1bce126d465 100644 --- a/merchantapi/promotions_v1beta/merchantapi-api.json +++ b/merchantapi/promotions_v1beta/merchantapi-api.json @@ -203,7 +203,7 @@ } } }, - "revision": "20241101", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "Attributes": { @@ -881,7 +881,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/promotions_v1beta/merchantapi-gen.go b/merchantapi/promotions_v1beta/merchantapi-gen.go index 0c998564182..128c4213433 100644 --- a/merchantapi/promotions_v1beta/merchantapi-gen.go +++ b/merchantapi/promotions_v1beta/merchantapi-gen.go @@ -798,7 +798,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/quota_v1beta/merchantapi-api.json b/merchantapi/quota_v1beta/merchantapi-api.json index 5ea52f84cad..08ad7e8f6a4 100644 --- a/merchantapi/quota_v1beta/merchantapi-api.json +++ b/merchantapi/quota_v1beta/merchantapi-api.json @@ -150,7 +150,7 @@ } } }, - "revision": "20241109", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "ListQuotaGroupsResponse": { @@ -309,7 +309,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/quota_v1beta/merchantapi-gen.go b/merchantapi/quota_v1beta/merchantapi-gen.go index 5ff1f5d9ac7..7b0a9ca327f 100644 --- a/merchantapi/quota_v1beta/merchantapi-gen.go +++ b/merchantapi/quota_v1beta/merchantapi-gen.go @@ -313,7 +313,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/reports_v1beta/merchantapi-api.json b/merchantapi/reports_v1beta/merchantapi-api.json index 47bfd757a72..a595210f10f 100644 --- a/merchantapi/reports_v1beta/merchantapi-api.json +++ b/merchantapi/reports_v1beta/merchantapi-api.json @@ -142,7 +142,7 @@ } } }, - "revision": "20241101", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "BestSellersBrandView": { @@ -1244,7 +1244,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/reports_v1beta/merchantapi-gen.go b/merchantapi/reports_v1beta/merchantapi-gen.go index cd74c9782d6..49df7897f6d 100644 --- a/merchantapi/reports_v1beta/merchantapi-gen.go +++ b/merchantapi/reports_v1beta/merchantapi-gen.go @@ -1367,7 +1367,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/merchantapi/reviews_v1beta/merchantapi-api.json b/merchantapi/reviews_v1beta/merchantapi-api.json index a753d13b2f4..9e7dbdae555 100644 --- a/merchantapi/reviews_v1beta/merchantapi-api.json +++ b/merchantapi/reviews_v1beta/merchantapi-api.json @@ -356,7 +356,7 @@ } } }, - "revision": "20241101", + "revision": "20241119", "rootUrl": "https://merchantapi.googleapis.com/", "schemas": { "CustomAttribute": { @@ -1308,7 +1308,7 @@ "type": "array" }, "expirationTime": { - "description": "The product expiration time.", + "description": "The product expiration time. This field will not bet set if the notification is sent for a product deletion event.", "format": "google-datetime", "type": "string" }, diff --git a/merchantapi/reviews_v1beta/merchantapi-gen.go b/merchantapi/reviews_v1beta/merchantapi-gen.go index 38ee57f4367..27719717c36 100644 --- a/merchantapi/reviews_v1beta/merchantapi-gen.go +++ b/merchantapi/reviews_v1beta/merchantapi-gen.go @@ -1017,7 +1017,8 @@ type ProductStatusChangeMessage struct { Attribute string `json:"attribute,omitempty"` // Changes: A message to describe the change that happened to the product Changes []*ProductChange `json:"changes,omitempty"` - // ExpirationTime: The product expiration time. + // ExpirationTime: The product expiration time. This field will not bet set if + // the notification is sent for a product deletion event. ExpirationTime string `json:"expirationTime,omitempty"` // ManagingAccount: The account that manages the merchant's account. can be the // same as merchant id if it is standalone account. Format : diff --git a/osconfig/v1/osconfig-api.json b/osconfig/v1/osconfig-api.json index e9618d68bf5..da08d45a3ab 100644 --- a/osconfig/v1/osconfig-api.json +++ b/osconfig/v1/osconfig-api.json @@ -636,7 +636,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "osconfig.projects.locations.osPolicyAssignments.operations.cancel", @@ -1083,7 +1083,7 @@ } } }, - "revision": "20241021", + "revision": "20241117", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "AptSettings": { diff --git a/osconfig/v1/osconfig-gen.go b/osconfig/v1/osconfig-gen.go index 18e1d5b55ba..543d6b94dbc 100644 --- a/osconfig/v1/osconfig-gen.go +++ b/osconfig/v1/osconfig-gen.go @@ -5636,7 +5636,7 @@ type ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/osconfig/v1alpha/osconfig-api.json b/osconfig/v1alpha/osconfig-api.json index 74a70082c1b..6963a2a6cae 100644 --- a/osconfig/v1alpha/osconfig-api.json +++ b/osconfig/v1alpha/osconfig-api.json @@ -646,7 +646,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "osconfig.projects.locations.osPolicyAssignments.operations.cancel", @@ -707,7 +707,7 @@ } } }, - "revision": "20241021", + "revision": "20241117", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "CVSSv3": { diff --git a/osconfig/v1alpha/osconfig-gen.go b/osconfig/v1alpha/osconfig-gen.go index 59576f4037f..105bde54fd5 100644 --- a/osconfig/v1alpha/osconfig-gen.go +++ b/osconfig/v1alpha/osconfig-gen.go @@ -4791,7 +4791,7 @@ type ProjectsLocationsOsPolicyAssignmentsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/osconfig/v2beta/osconfig-api.json b/osconfig/v2beta/osconfig-api.json index 9ce2bdf3b75..5b1c357f88f 100644 --- a/osconfig/v2beta/osconfig-api.json +++ b/osconfig/v2beta/osconfig-api.json @@ -298,7 +298,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v2beta/folders/{foldersId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "osconfig.folders.locations.operations.cancel", @@ -615,7 +615,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v2beta/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "osconfig.organizations.locations.operations.cancel", @@ -932,7 +932,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "osconfig.projects.locations.operations.cancel", @@ -1057,7 +1057,7 @@ } } }, - "revision": "20241104", + "revision": "20241117", "rootUrl": "https://osconfig.googleapis.com/", "schemas": { "CancelOperationRequest": { diff --git a/osconfig/v2beta/osconfig-gen.go b/osconfig/v2beta/osconfig-gen.go index e64e4bd54cf..33a00af3e65 100644 --- a/osconfig/v2beta/osconfig-gen.go +++ b/osconfig/v2beta/osconfig-gen.go @@ -2559,7 +2559,7 @@ type FoldersLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -3660,7 +3660,7 @@ type OrganizationsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -4761,7 +4761,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/parallelstore/v1/parallelstore-api.json b/parallelstore/v1/parallelstore-api.json new file mode 100644 index 00000000000..ce850623821 --- /dev/null +++ b/parallelstore/v1/parallelstore-api.json @@ -0,0 +1,975 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://parallelstore.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Parallelstore", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "parallelstore:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://parallelstore.mtls.googleapis.com/", + "name": "parallelstore", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "instances": { + "methods": { + "create": { + "description": "Creates a Parallelstore instance in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances", + "httpMethod": "POST", + "id": "parallelstore.projects.locations.instances.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instanceId": { + "description": "Required. The name of the Parallelstore instance. * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the customer project / location", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The instance's project and location, in the format `projects/{project}/locations/{location}`. Locations map to Google Cloud zones; for example, `us-west1-b`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+parent}/instances", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + "httpMethod": "DELETE", + "id": "parallelstore.projects.locations.instances.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportData": { + "description": "Copies data from Parallelstore to Cloud Storage.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:exportData", + "httpMethod": "POST", + "id": "parallelstore.projects.locations.instances.exportData", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:exportData", + "request": { + "$ref": "ExportDataRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.instances.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The instance resource name, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Instance" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "importData": { + "description": "Copies data from Cloud Storage to Parallelstore.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:importData", + "httpMethod": "POST", + "id": "parallelstore.projects.locations.instances.importData", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:importData", + "request": { + "$ref": "ImportDataRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all instances in a given project and location.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.instances.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location for which to retrieve instance information, in the format `projects/{project_id}/locations/{location}`. To retrieve instance information for all locations, use \"-\" as the value of `{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/instances", + "response": { + "$ref": "ListInstancesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single instance.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + "httpMethod": "PATCH", + "id": "parallelstore.projects.locations.instances.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the instance, in the format `projects/{project}/locations/{location}/instances/{instance_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. At least one path must be supplied in this field. The fields specified in the update_mask are relative to the resource, not the full request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "parallelstore.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "parallelstore.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20241115", + "rootUrl": "https://parallelstore.googleapis.com/", + "schemas": { + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "DestinationGcsBucket": { + "description": "Cloud Storage as the destination of a data transfer.", + "id": "DestinationGcsBucket", + "properties": { + "uri": { + "description": "Required. URI to a Cloud Storage bucket in the format: `gs:///`. The path inside the bucket is optional.", + "type": "string" + } + }, + "type": "object" + }, + "DestinationParallelstore": { + "description": "Parallelstore as the destination of a data transfer.", + "id": "DestinationParallelstore", + "properties": { + "path": { + "description": "Optional. Root directory path to the Paralellstore filesystem, starting with `/`. Defaults to `/` if unset.", + "type": "string" + } + }, + "type": "object" + }, + "ExportDataRequest": { + "description": "Export data from Parallelstore to Cloud Storage.", + "id": "ExportDataRequest", + "properties": { + "destinationGcsBucket": { + "$ref": "DestinationGcsBucket", + "description": "Cloud Storage destination." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "serviceAccount": { + "description": "Optional. User-specified Service Account (SA) credentials to be used when performing the transfer. Use one of the following formats: * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If unspecified, the Parallelstore service agent is used: `service-@gcp-sa-parallelstore.iam.gserviceaccount.com`", + "type": "string" + }, + "sourceParallelstore": { + "$ref": "SourceParallelstore", + "description": "Parallelstore source." + } + }, + "type": "object" + }, + "GoogleProtobufEmpty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "ImportDataRequest": { + "description": "Import data from Cloud Storage into a Parallelstore instance.", + "id": "ImportDataRequest", + "properties": { + "destinationParallelstore": { + "$ref": "DestinationParallelstore", + "description": "Parallelstore destination." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "serviceAccount": { + "description": "Optional. User-specified service account credentials to be used when performing the transfer. Use one of the following formats: * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If unspecified, the Parallelstore service agent is used: `service-@gcp-sa-parallelstore.iam.gserviceaccount.com`", + "type": "string" + }, + "sourceGcsBucket": { + "$ref": "SourceGcsBucket", + "description": "The Cloud Storage source bucket and, optionally, path inside the bucket." + } + }, + "type": "object" + }, + "Instance": { + "description": "A Parallelstore instance.", + "id": "Instance", + "properties": { + "accessPoints": { + "description": "Output only. A list of IPv4 addresses used for client side configuration.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "capacityGib": { + "description": "Required. Immutable. The instance's storage capacity in Gibibytes (GiB). Allowed values are between 12000 and 100000, in multiples of 4000; e.g., 12000, 16000, 20000, ...", + "format": "int64", + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the instance was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "daosVersion": { + "description": "Output only. The version of DAOS software running in the instance.", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. The description of the instance. 2048 characters or less.", + "type": "string" + }, + "directoryStripeLevel": { + "description": "Optional. Stripe level for directories. Allowed values are: * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a small number of files. * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads involving a mix of small and large directories. * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large number of files.", + "enum": [ + "DIRECTORY_STRIPE_LEVEL_UNSPECIFIED", + "DIRECTORY_STRIPE_LEVEL_MIN", + "DIRECTORY_STRIPE_LEVEL_BALANCED", + "DIRECTORY_STRIPE_LEVEL_MAX" + ], + "enumDescriptions": [ + "If not set, DirectoryStripeLevel will default to DIRECTORY_STRIPE_LEVEL_MAX", + "Minimum directory striping", + "Medium directory striping", + "Maximum directory striping" + ], + "type": "string" + }, + "effectiveReservedIpRange": { + "description": "Output only. Immutable. The ID of the IP address range being used by the instance's VPC network. This field is populated by the service and contains the value currently used by the service.", + "readOnly": true, + "type": "string" + }, + "fileStripeLevel": { + "description": "Optional. Stripe level for files. Allowed values are: * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size files. * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads involving a mix of small and large files. * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files.", + "enum": [ + "FILE_STRIPE_LEVEL_UNSPECIFIED", + "FILE_STRIPE_LEVEL_MIN", + "FILE_STRIPE_LEVEL_BALANCED", + "FILE_STRIPE_LEVEL_MAX" + ], + "enumDescriptions": [ + "If not set, FileStripeLevel will default to FILE_STRIPE_LEVEL_BALANCED", + "Minimum file striping", + "Medium file striping", + "Maximum file striping" + ], + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. See https://cloud.google.com/resource-manager/docs/labels-overview for details.", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the instance, in the format `projects/{project}/locations/{location}/instances/{instance_id}`.", + "type": "string" + }, + "network": { + "description": "Optional. Immutable. The name of the Compute Engine [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected.", + "type": "string" + }, + "reservedIpRange": { + "description": "Optional. Immutable. The ID of the IP address range being used by the instance's VPC network. See [Configure a VPC network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). If no ID is provided, all ranges are considered.", + "type": "string" + }, + "state": { + "description": "Output only. The instance state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "FAILED", + "UPGRADING" + ], + "enumDescriptions": [ + "Not set.", + "The instance is being created.", + "The instance is available for use.", + "The instance is being deleted.", + "The instance is not usable.", + "The instance is being upgraded." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the instance was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ListInstancesResponse": { + "description": "Response from ListInstances.", + "id": "ListInstancesResponse", + "properties": { + "instances": { + "description": "The list of Parallelstore instances.", + "items": { + "$ref": "Instance" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Long-running operation metadata.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SourceGcsBucket": { + "description": "Cloud Storage as the source of a data transfer.", + "id": "SourceGcsBucket", + "properties": { + "uri": { + "description": "Required. URI to a Cloud Storage bucket in the format: `gs:///`. The path inside the bucket is optional.", + "type": "string" + } + }, + "type": "object" + }, + "SourceParallelstore": { + "description": "Parallelstore as the source of a data transfer.", + "id": "SourceParallelstore", + "properties": { + "path": { + "description": "Optional. Root directory path to the Paralellstore filesystem, starting with `/`. Defaults to `/` if unset.", + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Parallelstore API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/parallelstore/v1/parallelstore-gen.go b/parallelstore/v1/parallelstore-gen.go new file mode 100644 index 00000000000..5a8dd04ed54 --- /dev/null +++ b/parallelstore/v1/parallelstore-gen.go @@ -0,0 +1,2303 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package parallelstore provides access to the Parallelstore API. +// +// For product documentation, see: https://cloud.google.com/ +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/parallelstore/v1" +// ... +// ctx := context.Background() +// parallelstoreService, err := parallelstore.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// parallelstoreService, err := parallelstore.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// parallelstoreService, err := parallelstore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package parallelstore // import "google.golang.org/api/parallelstore/v1" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "parallelstore:v1" +const apiName = "parallelstore" +const apiVersion = "v1" +const basePath = "https://parallelstore.googleapis.com/" +const basePathTemplate = "https://parallelstore.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://parallelstore.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Instances = NewProjectsLocationsInstancesService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Instances *ProjectsLocationsInstancesService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService { + rs := &ProjectsLocationsInstancesService{s: s} + return rs +} + +type ProjectsLocationsInstancesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// CancelOperationRequest: The request message for Operations.CancelOperation. +type CancelOperationRequest struct { +} + +// DestinationGcsBucket: Cloud Storage as the destination of a data transfer. +type DestinationGcsBucket struct { + // Uri: Required. URI to a Cloud Storage bucket in the format: `gs:///`. The + // path inside the bucket is optional. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DestinationGcsBucket) MarshalJSON() ([]byte, error) { + type NoMethod DestinationGcsBucket + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DestinationParallelstore: Parallelstore as the destination of a data +// transfer. +type DestinationParallelstore struct { + // Path: Optional. Root directory path to the Paralellstore filesystem, + // starting with `/`. Defaults to `/` if unset. + Path string `json:"path,omitempty"` + // ForceSendFields is a list of field names (e.g. "Path") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Path") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DestinationParallelstore) MarshalJSON() ([]byte, error) { + type NoMethod DestinationParallelstore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ExportDataRequest: Export data from Parallelstore to Cloud Storage. +type ExportDataRequest struct { + // DestinationGcsBucket: Cloud Storage destination. + DestinationGcsBucket *DestinationGcsBucket `json:"destinationGcsBucket,omitempty"` + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. For example, + // consider a situation where you make an initial request and t he request + // times out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ServiceAccount: Optional. User-specified Service Account (SA) credentials to + // be used when performing the transfer. Use one of the following formats: * + // `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * + // `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + // ` * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If + // unspecified, the Parallelstore service agent is used: + // `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + ServiceAccount string `json:"serviceAccount,omitempty"` + // SourceParallelstore: Parallelstore source. + SourceParallelstore *SourceParallelstore `json:"sourceParallelstore,omitempty"` + // ForceSendFields is a list of field names (e.g. "DestinationGcsBucket") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DestinationGcsBucket") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportDataRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportDataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to avoid +// defining duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For instance: +// service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// ImportDataRequest: Import data from Cloud Storage into a Parallelstore +// instance. +type ImportDataRequest struct { + // DestinationParallelstore: Parallelstore destination. + DestinationParallelstore *DestinationParallelstore `json:"destinationParallelstore,omitempty"` + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. For example, + // consider a situation where you make an initial request and t he request + // times out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ServiceAccount: Optional. User-specified service account credentials to be + // used when performing the transfer. Use one of the following formats: * + // `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * + // `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + // ` * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If + // unspecified, the Parallelstore service agent is used: + // `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + ServiceAccount string `json:"serviceAccount,omitempty"` + // SourceGcsBucket: The Cloud Storage source bucket and, optionally, path + // inside the bucket. + SourceGcsBucket *SourceGcsBucket `json:"sourceGcsBucket,omitempty"` + // ForceSendFields is a list of field names (e.g. "DestinationParallelstore") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DestinationParallelstore") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ImportDataRequest) MarshalJSON() ([]byte, error) { + type NoMethod ImportDataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Instance: A Parallelstore instance. +type Instance struct { + // AccessPoints: Output only. A list of IPv4 addresses used for client side + // configuration. + AccessPoints []string `json:"accessPoints,omitempty"` + // CapacityGib: Required. Immutable. The instance's storage capacity in + // Gibibytes (GiB). Allowed values are between 12000 and 100000, in multiples + // of 4000; e.g., 12000, 16000, 20000, ... + CapacityGib int64 `json:"capacityGib,omitempty,string"` + // CreateTime: Output only. The time when the instance was created. + CreateTime string `json:"createTime,omitempty"` + // DaosVersion: Output only. The version of DAOS software running in the + // instance. + DaosVersion string `json:"daosVersion,omitempty"` + // Description: Optional. The description of the instance. 2048 characters or + // less. + Description string `json:"description,omitempty"` + // DirectoryStripeLevel: Optional. Stripe level for directories. Allowed values + // are: * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + // small number of files. * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances + // performance for workloads involving a mix of small and large directories. * + // `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + // number of files. + // + // Possible values: + // "DIRECTORY_STRIPE_LEVEL_UNSPECIFIED" - If not set, DirectoryStripeLevel + // will default to DIRECTORY_STRIPE_LEVEL_MAX + // "DIRECTORY_STRIPE_LEVEL_MIN" - Minimum directory striping + // "DIRECTORY_STRIPE_LEVEL_BALANCED" - Medium directory striping + // "DIRECTORY_STRIPE_LEVEL_MAX" - Maximum directory striping + DirectoryStripeLevel string `json:"directoryStripeLevel,omitempty"` + // EffectiveReservedIpRange: Output only. Immutable. The ID of the IP address + // range being used by the instance's VPC network. This field is populated by + // the service and contains the value currently used by the service. + EffectiveReservedIpRange string `json:"effectiveReservedIpRange,omitempty"` + // FileStripeLevel: Optional. Stripe level for files. Allowed values are: * + // `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size files. * + // `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads involving a + // mix of small and large files. * `FILE_STRIPE_LEVEL_MAX`: higher throughput + // performance for larger files. + // + // Possible values: + // "FILE_STRIPE_LEVEL_UNSPECIFIED" - If not set, FileStripeLevel will default + // to FILE_STRIPE_LEVEL_BALANCED + // "FILE_STRIPE_LEVEL_MIN" - Minimum file striping + // "FILE_STRIPE_LEVEL_BALANCED" - Medium file striping + // "FILE_STRIPE_LEVEL_MAX" - Maximum file striping + FileStripeLevel string `json:"fileStripeLevel,omitempty"` + // Labels: Optional. Cloud Labels are a flexible and lightweight mechanism for + // organizing cloud resources into groups that reflect a customer's + // organizational needs and deployment strategies. See + // https://cloud.google.com/resource-manager/docs/labels-overview for details. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the instance, in the format + // `projects/{project}/locations/{location}/instances/{instance_id}`. + Name string `json:"name,omitempty"` + // Network: Optional. Immutable. The name of the Compute Engine VPC network + // (https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. + Network string `json:"network,omitempty"` + // ReservedIpRange: Optional. Immutable. The ID of the IP address range being + // used by the instance's VPC network. See Configure a VPC network + // (https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + // If no ID is provided, all ranges are considered. + ReservedIpRange string `json:"reservedIpRange,omitempty"` + // State: Output only. The instance state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "CREATING" - The instance is being created. + // "ACTIVE" - The instance is available for use. + // "DELETING" - The instance is being deleted. + // "FAILED" - The instance is not usable. + // "UPGRADING" - The instance is being upgraded. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The time when the instance was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AccessPoints") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccessPoints") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Instance) MarshalJSON() ([]byte, error) { + type NoMethod Instance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListInstancesResponse: Response from ListInstances. +type ListInstancesResponse struct { + // Instances: The list of Parallelstore instances. + Instances []*Instance `json:"instances,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListInstancesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInstancesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in the + // request. + Locations []*Location `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Locations") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + // Operations: A list of operations that matches the specified filter in the + // request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby city + // name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + // LocationId: The canonical id for this location. For example: "us-east1". + LocationId string `json:"locationId,omitempty"` + // Metadata: Service-specific metadata. For example the available capacity at + // the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is the +// result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *Status `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the `name` + // should be a resource name ending with `operations/{unique_id}`. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is the + // original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Long-running operation metadata. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been cancelled + // successfully have Operation.error value with a google.rpc.Status.code of 1, + // corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SourceGcsBucket: Cloud Storage as the source of a data transfer. +type SourceGcsBucket struct { + // Uri: Required. URI to a Cloud Storage bucket in the format: `gs:///`. The + // path inside the bucket is optional. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceGcsBucket) MarshalJSON() ([]byte, error) { + type NoMethod SourceGcsBucket + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SourceParallelstore: Parallelstore as the source of a data transfer. +type SourceParallelstore struct { + // Path: Optional. Root directory path to the Paralellstore filesystem, + // starting with `/`. Defaults to `/` if unset. + Path string `json:"path,omitempty"` + // ForceSendFields is a list of field names (e.g. "Path") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Path") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceParallelstore) MarshalJSON() ([]byte, error) { + type NoMethod SourceParallelstore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by gRPC (https://github.com/grpc). Each `Status` message contains three +// pieces of data: error code, error message, and error details. You can find +// out more about this error model and how to work with it in the API Design +// Guide (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 +// details. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "parallelstore.projects.locations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{ + 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 +} + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this service. +// +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the `next_page_token` field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + 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 +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/locations") + 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 "parallelstore.projects.locations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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 := &ListLocationsResponse{ + 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 +} + +// 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsInstancesCreateCall struct { + s *Service + parent string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Parallelstore instance in a given project and location. +// +// - parent: The instance's project and location, in the format +// `projects/{project}/locations/{location}`. Locations map to Google Cloud +// zones; for example, `us-west1-b`. +func (r *ProjectsLocationsInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsInstancesCreateCall { + c := &ProjectsLocationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.instance = instance + return c +} + +// InstanceId sets the optional parameter "instanceId": Required. The name of +// the Parallelstore instance. * Must contain only lowercase letters, numbers, +// and hyphens. * Must start with a letter. * Must be between 1-63 characters. +// * Must end with a number or a letter. * Must be unique within the customer +// project / location +func (c *ProjectsLocationsInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsInstancesCreateCall { + c.urlParams_.Set("instanceId", instanceId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and t he request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInstancesCreateCall) RequestId(requestId string) *ProjectsLocationsInstancesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/instances") + 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 "parallelstore.projects.locations.instances.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInstancesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single instance. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Delete(name string) *ProjectsLocationsInstancesDeleteCall { + c := &ProjectsLocationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and t he request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInstancesDeleteCall) RequestId(requestId string) *ProjectsLocationsInstancesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "parallelstore.projects.locations.instances.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInstancesExportDataCall struct { + s *Service + name string + exportdatarequest *ExportDataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportData: Copies data from Parallelstore to Cloud Storage. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) ExportData(name string, exportdatarequest *ExportDataRequest) *ProjectsLocationsInstancesExportDataCall { + c := &ProjectsLocationsInstancesExportDataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.exportdatarequest = exportdatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesExportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesExportDataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesExportDataCall) Context(ctx context.Context) *ProjectsLocationsInstancesExportDataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesExportDataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesExportDataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportdatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:exportData") + 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 "parallelstore.projects.locations.instances.exportData" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesExportDataCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInstancesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single instance. +// +// - name: The instance resource name, in the format +// `projects/{project_id}/locations/{location}/instances/{instance_id}`. +func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall { + c := &ProjectsLocationsInstancesGetCall{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 +// details. +func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "parallelstore.projects.locations.instances.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Instance.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 *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, 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 := &Instance{ + 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 +} + +type ProjectsLocationsInstancesImportDataCall struct { + s *Service + name string + importdatarequest *ImportDataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportData: Copies data from Cloud Storage to Parallelstore. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) ImportData(name string, importdatarequest *ImportDataRequest) *ProjectsLocationsInstancesImportDataCall { + c := &ProjectsLocationsInstancesImportDataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.importdatarequest = importdatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesImportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesImportDataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesImportDataCall) Context(ctx context.Context) *ProjectsLocationsInstancesImportDataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesImportDataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesImportDataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:importData") + 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 "parallelstore.projects.locations.instances.importData" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesImportDataCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInstancesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all instances in a given project and location. +// +// - parent: The project and location for which to retrieve instance +// information, in the format `projects/{project_id}/locations/{location}`. +// To retrieve instance information for all locations, use "-" as the value +// of `{location}`. +func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall { + c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results. +func (c *ProjectsLocationsInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, the server will pick +// an appropriate default. +func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall { + 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 +// details. +func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/instances") + 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 "parallelstore.projects.locations.instances.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListInstancesResponse.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 *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, 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 := &ListInstancesResponse{ + 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 +} + +// 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 *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsInstancesPatchCall struct { + s *Service + name string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single instance. +// +// - name: Identifier. The resource name of the instance, in the format +// `projects/{project}/locations/{location}/instances/{instance_id}`. +func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsInstancesPatchCall { + c := &ProjectsLocationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.instance = instance + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and t he request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInstancesPatchCall) RequestId(requestId string) *ProjectsLocationsInstancesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. Field mask is used to specify the fields to be overwritten +// in the Instance resource by the update. At least one path must be supplied +// in this field. The fields specified in the update_mask are relative to the +// resource, not the full request. +func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall { + 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 +// details. +func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) + if err != nil { + return nil, err + } + 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 "parallelstore.projects.locations.instances.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + canceloperationrequest *CancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.canceloperationrequest = canceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + 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 "parallelstore.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 +} + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that the +// client is no longer interested in the operation result. It does not cancel +// the operation. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{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 +// details. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "parallelstore.projects.locations.operations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 +} + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 +// details. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "parallelstore.projects.locations.operations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + 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 +// details. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/operations") + 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 "parallelstore.projects.locations.operations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ + 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 +} + +// 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} diff --git a/parallelstore/v1beta/parallelstore-api.json b/parallelstore/v1beta/parallelstore-api.json new file mode 100644 index 00000000000..6c0f2cca041 --- /dev/null +++ b/parallelstore/v1beta/parallelstore-api.json @@ -0,0 +1,980 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://parallelstore.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Parallelstore", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "parallelstore:v1beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://parallelstore.mtls.googleapis.com/", + "name": "parallelstore", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "methods": { + "get": { + "description": "Gets information about a location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Resource name for the location.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Location" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists information about the supported locations for this service.", + "flatPath": "v1beta/projects/{projectsId}/locations", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", + "location": "query", + "type": "string" + }, + "name": { + "description": "The resource that owns the locations collection, if applicable.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return. If not set, the service selects a default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/locations", + "response": { + "$ref": "ListLocationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "instances": { + "methods": { + "create": { + "description": "Creates a Parallelstore instance in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/instances", + "httpMethod": "POST", + "id": "parallelstore.projects.locations.instances.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "instanceId": { + "description": "Required. The name of the Parallelstore instance. * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the customer project / location", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The instance's project and location, in the format `projects/{project}/locations/{location}`. Locations map to Google Cloud zones; for example, `us-west1-b`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+parent}/instances", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single instance.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + "httpMethod": "DELETE", + "id": "parallelstore.projects.locations.instances.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportData": { + "description": "Copies data from Parallelstore to Cloud Storage.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:exportData", + "httpMethod": "POST", + "id": "parallelstore.projects.locations.instances.exportData", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:exportData", + "request": { + "$ref": "ExportDataRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single instance.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.instances.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The instance resource name, in the format `projects/{project_id}/locations/{location}/instances/{instance_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Instance" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "importData": { + "description": "Copies data from Cloud Storage to Parallelstore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:importData", + "httpMethod": "POST", + "id": "parallelstore.projects.locations.instances.importData", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:importData", + "request": { + "$ref": "ImportDataRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all instances in a given project and location.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/instances", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.instances.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. Filtering results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location for which to retrieve instance information, in the format `projects/{project_id}/locations/{location}`. To retrieve instance information for all locations, use \"-\" as the value of `{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/instances", + "response": { + "$ref": "ListInstancesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single instance.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", + "httpMethod": "PATCH", + "id": "parallelstore.projects.locations.instances.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the instance, in the format `projects/{project}/locations/{location}/instances/{instance_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. Mask of fields to update. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. At least one path must be supplied in this field. The fields specified in the update_mask are relative to the resource, not the full request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "parallelstore.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:cancel", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "parallelstore.projects.locations.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "parallelstore.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20241115", + "rootUrl": "https://parallelstore.googleapis.com/", + "schemas": { + "DestinationGcsBucket": { + "description": "Cloud Storage as the destination of a data transfer.", + "id": "DestinationGcsBucket", + "properties": { + "uri": { + "description": "Required. URI to a Cloud Storage bucket in the format: `gs:///`. The path inside the bucket is optional.", + "type": "string" + } + }, + "type": "object" + }, + "DestinationParallelstore": { + "description": "Parallelstore as the destination of a data transfer.", + "id": "DestinationParallelstore", + "properties": { + "path": { + "description": "Optional. Root directory path to the Paralellstore filesystem, starting with `/`. Defaults to `/` if unset.", + "type": "string" + } + }, + "type": "object" + }, + "ExportDataRequest": { + "description": "Export data from Parallelstore to Cloud Storage.", + "id": "ExportDataRequest", + "properties": { + "destinationGcsBucket": { + "$ref": "DestinationGcsBucket", + "description": "Cloud Storage destination." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "serviceAccount": { + "description": "Optional. User-specified Service Account (SA) credentials to be used when performing the transfer. Use one of the following formats: * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If unspecified, the Parallelstore service agent is used: `service-@gcp-sa-parallelstore.iam.gserviceaccount.com`", + "type": "string" + }, + "sourceParallelstore": { + "$ref": "SourceParallelstore", + "description": "Parallelstore source." + } + }, + "type": "object" + }, + "GoogleProtobufEmpty": { + "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "ImportDataRequest": { + "description": "Import data from Cloud Storage into a Parallelstore instance.", + "id": "ImportDataRequest", + "properties": { + "destinationParallelstore": { + "$ref": "DestinationParallelstore", + "description": "Parallelstore destination." + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + }, + "serviceAccount": { + "description": "Optional. User-specified service account credentials to be used when performing the transfer. Use one of the following formats: * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If unspecified, the Parallelstore service agent is used: `service-@gcp-sa-parallelstore.iam.gserviceaccount.com`", + "type": "string" + }, + "sourceGcsBucket": { + "$ref": "SourceGcsBucket", + "description": "The Cloud Storage source bucket and, optionally, path inside the bucket." + } + }, + "type": "object" + }, + "Instance": { + "description": "A Parallelstore instance.", + "id": "Instance", + "properties": { + "accessPoints": { + "description": "Output only. A list of IPv4 addresses used for client side configuration.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "capacityGib": { + "description": "Required. Immutable. The instance's storage capacity in Gibibytes (GiB). Allowed values are between 12000 and 100000, in multiples of 4000; e.g., 12000, 16000, 20000, ...", + "format": "int64", + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the instance was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "daosVersion": { + "description": "Output only. The version of DAOS software running in the instance.", + "readOnly": true, + "type": "string" + }, + "deploymentType": { + "description": "Optional. The deployment type of the instance. Allowed values are: * `SCRATCH`: the instance is a scratch instance. * `PERSISTENT`: the instance is a persistent instance.", + "enum": [ + "DEPLOYMENT_TYPE_UNSPECIFIED", + "SCRATCH", + "PERSISTENT" + ], + "enumDescriptions": [ + "Default Deployment Type It is equivalent to SCRATCH", + "Scratch", + "Persistent" + ], + "type": "string" + }, + "description": { + "description": "Optional. The description of the instance. 2048 characters or less.", + "type": "string" + }, + "directoryStripeLevel": { + "description": "Optional. Stripe level for directories. Allowed values are: * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a small number of files. * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances performance for workloads involving a mix of small and large directories. * `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large number of files.", + "enum": [ + "DIRECTORY_STRIPE_LEVEL_UNSPECIFIED", + "DIRECTORY_STRIPE_LEVEL_MIN", + "DIRECTORY_STRIPE_LEVEL_BALANCED", + "DIRECTORY_STRIPE_LEVEL_MAX" + ], + "enumDescriptions": [ + "If not set, DirectoryStripeLevel will default to DIRECTORY_STRIPE_LEVEL_MAX", + "Minimum directory striping", + "Medium directory striping", + "Maximum directory striping" + ], + "type": "string" + }, + "effectiveReservedIpRange": { + "description": "Output only. Immutable. The ID of the IP address range being used by the instance's VPC network. This field is populated by the service and contains the value currently used by the service.", + "readOnly": true, + "type": "string" + }, + "fileStripeLevel": { + "description": "Optional. Stripe level for files. Allowed values are: * `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size files. * `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads involving a mix of small and large files. * `FILE_STRIPE_LEVEL_MAX`: higher throughput performance for larger files.", + "enum": [ + "FILE_STRIPE_LEVEL_UNSPECIFIED", + "FILE_STRIPE_LEVEL_MIN", + "FILE_STRIPE_LEVEL_BALANCED", + "FILE_STRIPE_LEVEL_MAX" + ], + "enumDescriptions": [ + "If not set, FileStripeLevel will default to FILE_STRIPE_LEVEL_BALANCED", + "Minimum file striping", + "Medium file striping", + "Maximum file striping" + ], + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. See https://cloud.google.com/resource-manager/docs/labels-overview for details.", + "type": "object" + }, + "name": { + "description": "Identifier. The resource name of the instance, in the format `projects/{project}/locations/{location}/instances/{instance_id}`.", + "type": "string" + }, + "network": { + "description": "Optional. Immutable. The name of the Compute Engine [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected.", + "type": "string" + }, + "reservedIpRange": { + "description": "Optional. Immutable. The ID of the IP address range being used by the instance's VPC network. See [Configure a VPC network](https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). If no ID is provided, all ranges are considered.", + "type": "string" + }, + "state": { + "description": "Output only. The instance state.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "FAILED", + "UPGRADING" + ], + "enumDescriptions": [ + "Not set.", + "The instance is being created.", + "The instance is available for use.", + "The instance is being deleted.", + "The instance is not usable.", + "The instance is being upgraded." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the instance was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "ListInstancesResponse": { + "description": "Response from ListInstances.", + "id": "ListInstancesResponse", + "properties": { + "instances": { + "description": "The list of Parallelstore instances.", + "items": { + "$ref": "Instance" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListLocationsResponse": { + "description": "The response message for Locations.ListLocations.", + "id": "ListLocationsResponse", + "properties": { + "locations": { + "description": "A list of locations that matches the specified filter in the request.", + "items": { + "$ref": "Location" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + } + }, + "type": "object" + }, + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "Location": { + "description": "A resource that represents a Google Cloud location.", + "id": "Location", + "properties": { + "displayName": { + "description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", + "type": "object" + }, + "locationId": { + "description": "The canonical id for this location. For example: `\"us-east1\"`.", + "type": "string" + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata. For example the available capacity at the given location.", + "type": "object" + }, + "name": { + "description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", + "type": "string" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "OperationMetadata": { + "description": "Long-running operation metadata.", + "id": "OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SourceGcsBucket": { + "description": "Cloud Storage as the source of a data transfer.", + "id": "SourceGcsBucket", + "properties": { + "uri": { + "description": "Required. URI to a Cloud Storage bucket in the format: `gs:///`. The path inside the bucket is optional.", + "type": "string" + } + }, + "type": "object" + }, + "SourceParallelstore": { + "description": "Parallelstore as the source of a data transfer.", + "id": "SourceParallelstore", + "properties": { + "path": { + "description": "Optional. Root directory path to the Paralellstore filesystem, starting with `/`. Defaults to `/` if unset.", + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Parallelstore API", + "version": "v1beta", + "version_module": true +} \ No newline at end of file diff --git a/parallelstore/v1beta/parallelstore-gen.go b/parallelstore/v1beta/parallelstore-gen.go new file mode 100644 index 00000000000..9af8fca1a27 --- /dev/null +++ b/parallelstore/v1beta/parallelstore-gen.go @@ -0,0 +1,2303 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package parallelstore provides access to the Parallelstore API. +// +// For product documentation, see: https://cloud.google.com/ +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/parallelstore/v1beta" +// ... +// ctx := context.Background() +// parallelstoreService, err := parallelstore.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// parallelstoreService, err := parallelstore.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// parallelstoreService, err := parallelstore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package parallelstore // import "google.golang.org/api/parallelstore/v1beta" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "parallelstore:v1beta" +const apiName = "parallelstore" +const apiVersion = "v1beta" +const basePath = "https://parallelstore.googleapis.com/" +const basePathTemplate = "https://parallelstore.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://parallelstore.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Instances = NewProjectsLocationsInstancesService(s) + rs.Operations = NewProjectsLocationsOperationsService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Instances *ProjectsLocationsInstancesService + + Operations *ProjectsLocationsOperationsService +} + +func NewProjectsLocationsInstancesService(s *Service) *ProjectsLocationsInstancesService { + rs := &ProjectsLocationsInstancesService{s: s} + return rs +} + +type ProjectsLocationsInstancesService struct { + s *Service +} + +func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { + rs := &ProjectsLocationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsOperationsService struct { + s *Service +} + +// DestinationGcsBucket: Cloud Storage as the destination of a data transfer. +type DestinationGcsBucket struct { + // Uri: Required. URI to a Cloud Storage bucket in the format: `gs:///`. The + // path inside the bucket is optional. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DestinationGcsBucket) MarshalJSON() ([]byte, error) { + type NoMethod DestinationGcsBucket + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// DestinationParallelstore: Parallelstore as the destination of a data +// transfer. +type DestinationParallelstore struct { + // Path: Optional. Root directory path to the Paralellstore filesystem, + // starting with `/`. Defaults to `/` if unset. + Path string `json:"path,omitempty"` + // ForceSendFields is a list of field names (e.g. "Path") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Path") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DestinationParallelstore) MarshalJSON() ([]byte, error) { + type NoMethod DestinationParallelstore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ExportDataRequest: Export data from Parallelstore to Cloud Storage. +type ExportDataRequest struct { + // DestinationGcsBucket: Cloud Storage destination. + DestinationGcsBucket *DestinationGcsBucket `json:"destinationGcsBucket,omitempty"` + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. For example, + // consider a situation where you make an initial request and t he request + // times out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ServiceAccount: Optional. User-specified Service Account (SA) credentials to + // be used when performing the transfer. Use one of the following formats: * + // `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * + // `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + // ` * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If + // unspecified, the Parallelstore service agent is used: + // `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + ServiceAccount string `json:"serviceAccount,omitempty"` + // SourceParallelstore: Parallelstore source. + SourceParallelstore *SourceParallelstore `json:"sourceParallelstore,omitempty"` + // ForceSendFields is a list of field names (e.g. "DestinationGcsBucket") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DestinationGcsBucket") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportDataRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportDataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to avoid +// defining duplicated empty messages in your APIs. A typical example is to use +// it as the request or the response type of an API method. For instance: +// service Foo { rpc Bar(google.protobuf.Empty) returns +// (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// ImportDataRequest: Import data from Cloud Storage into a Parallelstore +// instance. +type ImportDataRequest struct { + // DestinationParallelstore: Parallelstore destination. + DestinationParallelstore *DestinationParallelstore `json:"destinationParallelstore,omitempty"` + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. For example, + // consider a situation where you make an initial request and t he request + // times out. If you make the request again with the same request ID, the + // server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. The request ID must be a + // valid UUID with the exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ServiceAccount: Optional. User-specified service account credentials to be + // used when performing the transfer. Use one of the following formats: * + // `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * + // `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + // ` * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` If + // unspecified, the Parallelstore service agent is used: + // `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` + ServiceAccount string `json:"serviceAccount,omitempty"` + // SourceGcsBucket: The Cloud Storage source bucket and, optionally, path + // inside the bucket. + SourceGcsBucket *SourceGcsBucket `json:"sourceGcsBucket,omitempty"` + // ForceSendFields is a list of field names (e.g. "DestinationParallelstore") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DestinationParallelstore") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ImportDataRequest) MarshalJSON() ([]byte, error) { + type NoMethod ImportDataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Instance: A Parallelstore instance. +type Instance struct { + // AccessPoints: Output only. A list of IPv4 addresses used for client side + // configuration. + AccessPoints []string `json:"accessPoints,omitempty"` + // CapacityGib: Required. Immutable. The instance's storage capacity in + // Gibibytes (GiB). Allowed values are between 12000 and 100000, in multiples + // of 4000; e.g., 12000, 16000, 20000, ... + CapacityGib int64 `json:"capacityGib,omitempty,string"` + // CreateTime: Output only. The time when the instance was created. + CreateTime string `json:"createTime,omitempty"` + // DaosVersion: Output only. The version of DAOS software running in the + // instance. + DaosVersion string `json:"daosVersion,omitempty"` + // DeploymentType: Optional. The deployment type of the instance. Allowed + // values are: * `SCRATCH`: the instance is a scratch instance. * `PERSISTENT`: + // the instance is a persistent instance. + // + // Possible values: + // "DEPLOYMENT_TYPE_UNSPECIFIED" - Default Deployment Type It is equivalent + // to SCRATCH + // "SCRATCH" - Scratch + // "PERSISTENT" - Persistent + DeploymentType string `json:"deploymentType,omitempty"` + // Description: Optional. The description of the instance. 2048 characters or + // less. + Description string `json:"description,omitempty"` + // DirectoryStripeLevel: Optional. Stripe level for directories. Allowed values + // are: * `DIRECTORY_STRIPE_LEVEL_MIN`: recommended when directories contain a + // small number of files. * `DIRECTORY_STRIPE_LEVEL_BALANCED`: balances + // performance for workloads involving a mix of small and large directories. * + // `DIRECTORY_STRIPE_LEVEL_MAX`: recommended for directories with a large + // number of files. + // + // Possible values: + // "DIRECTORY_STRIPE_LEVEL_UNSPECIFIED" - If not set, DirectoryStripeLevel + // will default to DIRECTORY_STRIPE_LEVEL_MAX + // "DIRECTORY_STRIPE_LEVEL_MIN" - Minimum directory striping + // "DIRECTORY_STRIPE_LEVEL_BALANCED" - Medium directory striping + // "DIRECTORY_STRIPE_LEVEL_MAX" - Maximum directory striping + DirectoryStripeLevel string `json:"directoryStripeLevel,omitempty"` + // EffectiveReservedIpRange: Output only. Immutable. The ID of the IP address + // range being used by the instance's VPC network. This field is populated by + // the service and contains the value currently used by the service. + EffectiveReservedIpRange string `json:"effectiveReservedIpRange,omitempty"` + // FileStripeLevel: Optional. Stripe level for files. Allowed values are: * + // `FILE_STRIPE_LEVEL_MIN`: offers the best performance for small size files. * + // `FILE_STRIPE_LEVEL_BALANCED`: balances performance for workloads involving a + // mix of small and large files. * `FILE_STRIPE_LEVEL_MAX`: higher throughput + // performance for larger files. + // + // Possible values: + // "FILE_STRIPE_LEVEL_UNSPECIFIED" - If not set, FileStripeLevel will default + // to FILE_STRIPE_LEVEL_BALANCED + // "FILE_STRIPE_LEVEL_MIN" - Minimum file striping + // "FILE_STRIPE_LEVEL_BALANCED" - Medium file striping + // "FILE_STRIPE_LEVEL_MAX" - Maximum file striping + FileStripeLevel string `json:"fileStripeLevel,omitempty"` + // Labels: Optional. Cloud Labels are a flexible and lightweight mechanism for + // organizing cloud resources into groups that reflect a customer's + // organizational needs and deployment strategies. See + // https://cloud.google.com/resource-manager/docs/labels-overview for details. + Labels map[string]string `json:"labels,omitempty"` + // Name: Identifier. The resource name of the instance, in the format + // `projects/{project}/locations/{location}/instances/{instance_id}`. + Name string `json:"name,omitempty"` + // Network: Optional. Immutable. The name of the Compute Engine VPC network + // (https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. + Network string `json:"network,omitempty"` + // ReservedIpRange: Optional. Immutable. The ID of the IP address range being + // used by the instance's VPC network. See Configure a VPC network + // (https://cloud.google.com/parallelstore/docs/vpc#create_and_configure_the_vpc). + // If no ID is provided, all ranges are considered. + ReservedIpRange string `json:"reservedIpRange,omitempty"` + // State: Output only. The instance state. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "CREATING" - The instance is being created. + // "ACTIVE" - The instance is available for use. + // "DELETING" - The instance is being deleted. + // "FAILED" - The instance is not usable. + // "UPGRADING" - The instance is being upgraded. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The time when the instance was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AccessPoints") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccessPoints") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Instance) MarshalJSON() ([]byte, error) { + type NoMethod Instance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListInstancesResponse: Response from ListInstances. +type ListInstancesResponse struct { + // Instances: The list of Parallelstore instances. + Instances []*Instance `json:"instances,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListInstancesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInstancesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListLocationsResponse: The response message for Locations.ListLocations. +type ListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in the + // request. + Locations []*Location `json:"locations,omitempty"` + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Locations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Locations") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListOperationsResponse: The response message for Operations.ListOperations. +type ListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + // Operations: A list of operations that matches the specified filter in the + // request. + Operations []*Operation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Location: A resource that represents a Google Cloud location. +type Location struct { + // DisplayName: The friendly name for this location, typically a nearby city + // name. For example, "Tokyo". + DisplayName string `json:"displayName,omitempty"` + // Labels: Cross-service attributes for the location. For example + // {"cloud.googleapis.com/region": "us-east1"} + Labels map[string]string `json:"labels,omitempty"` + // LocationId: The canonical id for this location. For example: "us-east1". + LocationId string `json:"locationId,omitempty"` + // Metadata: Service-specific metadata. For example the available capacity at + // the given location. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: Resource name for the location, which may vary between + // implementations. For example: + // "projects/example-project/locations/us-east1" + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Location) MarshalJSON() ([]byte, error) { + type NoMethod Location + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Operation: This resource represents a long-running operation that is the +// result of a network API call. +type Operation struct { + // Done: If the value is `false`, it means the operation is still in progress. + // If `true`, the operation is completed, and either `error` or `response` is + // available. + Done bool `json:"done,omitempty"` + // Error: The error result of the operation in case of failure or cancellation. + Error *Status `json:"error,omitempty"` + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as create + // time. Some services might not provide such metadata. Any method that returns + // a long-running operation should document the metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // Name: The server-assigned name, which is only unique within the same service + // that originally returns it. If you use the default HTTP mapping, the `name` + // should be a resource name ending with `operations/{unique_id}`. + Name string `json:"name,omitempty"` + // Response: The normal, successful response of the operation. If the original + // method returns no data on success, such as `Delete`, the response is + // `google.protobuf.Empty`. If the original method is standard + // `Get`/`Create`/`Update`, the response should be the resource. For other + // methods, the response should have the type `XxxResponse`, where `Xxx` is the + // original method name. For example, if the original method name is + // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Done") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Operation) MarshalJSON() ([]byte, error) { + type NoMethod Operation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// OperationMetadata: Long-running operation metadata. +type OperationMetadata struct { + // ApiVersion: Output only. API version used to start the operation. + ApiVersion string `json:"apiVersion,omitempty"` + // CreateTime: Output only. The time the operation was created. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time the operation finished running. + EndTime string `json:"endTime,omitempty"` + // RequestedCancellation: Output only. Identifies whether the user has + // requested cancellation of the operation. Operations that have been cancelled + // successfully have Operation.error value with a google.rpc.Status.code of 1, + // corresponding to `Code.CANCELLED`. + RequestedCancellation bool `json:"requestedCancellation,omitempty"` + // StatusMessage: Output only. Human-readable status of the operation, if any. + StatusMessage string `json:"statusMessage,omitempty"` + // Target: Output only. Server-defined resource path for the target of the + // operation. + Target string `json:"target,omitempty"` + // Verb: Output only. Name of the verb executed by the operation. + Verb string `json:"verb,omitempty"` + // ForceSendFields is a list of field names (e.g. "ApiVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SourceGcsBucket: Cloud Storage as the source of a data transfer. +type SourceGcsBucket struct { + // Uri: Required. URI to a Cloud Storage bucket in the format: `gs:///`. The + // path inside the bucket is optional. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uri") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceGcsBucket) MarshalJSON() ([]byte, error) { + type NoMethod SourceGcsBucket + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SourceParallelstore: Parallelstore as the source of a data transfer. +type SourceParallelstore struct { + // Path: Optional. Root directory path to the Paralellstore filesystem, + // starting with `/`. Defaults to `/` if unset. + Path string `json:"path,omitempty"` + // ForceSendFields is a list of field names (e.g. "Path") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Path") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceParallelstore) MarshalJSON() ([]byte, error) { + type NoMethod SourceParallelstore + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// Status: The `Status` type defines a logical error model that is suitable for +// different programming environments, including REST APIs and RPC APIs. It is +// used by gRPC (https://github.com/grpc). Each `Status` message contains three +// pieces of data: error code, error message, and error details. You can find +// out more about this error model and how to work with it in the API Design +// Guide (https://cloud.google.com/apis/design/errors). +type Status struct { + // Code: The status code, which should be an enum value of google.rpc.Code. + Code int64 `json:"code,omitempty"` + // Details: A list of messages that carry the error details. There is a common + // set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + // Message: A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Status) MarshalJSON() ([]byte, error) { + type NoMethod Status + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets information about a location. +// +// - name: Resource name for the location. +func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { + c := &ProjectsLocationsGetCall{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 +// details. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta/{+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 "parallelstore.projects.locations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Location.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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, 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 := &Location{ + 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 +} + +type ProjectsLocationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists information about the supported locations for this service. +// +// - name: The resource that owns the locations collection, if applicable. +func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { + c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": A filter to narrow down results +// to a preferred subset. The filtering language accepts strings like +// "displayName=tokyo", and is documented in more detail in AIP-160 +// (https://google.aip.dev/160). +func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return. If not set, the service selects a default. +func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token received +// from the `next_page_token` field in the response. Send that page token to +// receive the subsequent page. +func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { + 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 +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta/{+name}/locations") + 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 "parallelstore.projects.locations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListLocationsResponse.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 *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, 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 := &ListLocationsResponse{ + 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 +} + +// 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 *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsInstancesCreateCall struct { + s *Service + parent string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Parallelstore instance in a given project and location. +// +// - parent: The instance's project and location, in the format +// `projects/{project}/locations/{location}`. Locations map to Google Cloud +// zones; for example, `us-west1-b`. +func (r *ProjectsLocationsInstancesService) Create(parent string, instance *Instance) *ProjectsLocationsInstancesCreateCall { + c := &ProjectsLocationsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.instance = instance + return c +} + +// InstanceId sets the optional parameter "instanceId": Required. The name of +// the Parallelstore instance. * Must contain only lowercase letters, numbers, +// and hyphens. * Must start with a letter. * Must be between 1-63 characters. +// * Must end with a number or a letter. * Must be unique within the customer +// project / location +func (c *ProjectsLocationsInstancesCreateCall) InstanceId(instanceId string) *ProjectsLocationsInstancesCreateCall { + c.urlParams_.Set("instanceId", instanceId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and t he request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInstancesCreateCall) RequestId(requestId string) *ProjectsLocationsInstancesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesCreateCall) Context(ctx context.Context) *ProjectsLocationsInstancesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/instances") + 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 "parallelstore.projects.locations.instances.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInstancesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single instance. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) Delete(name string) *ProjectsLocationsInstancesDeleteCall { + c := &ProjectsLocationsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and t he request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInstancesDeleteCall) RequestId(requestId string) *ProjectsLocationsInstancesDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInstancesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "parallelstore.projects.locations.instances.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInstancesExportDataCall struct { + s *Service + name string + exportdatarequest *ExportDataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportData: Copies data from Parallelstore to Cloud Storage. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) ExportData(name string, exportdatarequest *ExportDataRequest) *ProjectsLocationsInstancesExportDataCall { + c := &ProjectsLocationsInstancesExportDataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.exportdatarequest = exportdatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesExportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesExportDataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesExportDataCall) Context(ctx context.Context) *ProjectsLocationsInstancesExportDataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesExportDataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesExportDataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportdatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:exportData") + 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 "parallelstore.projects.locations.instances.exportData" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesExportDataCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInstancesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single instance. +// +// - name: The instance resource name, in the format +// `projects/{project_id}/locations/{location}/instances/{instance_id}`. +func (r *ProjectsLocationsInstancesService) Get(name string) *ProjectsLocationsInstancesGetCall { + c := &ProjectsLocationsInstancesGetCall{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 +// details. +func (c *ProjectsLocationsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesGetCall) Context(ctx context.Context) *ProjectsLocationsInstancesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta/{+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 "parallelstore.projects.locations.instances.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Instance.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 *ProjectsLocationsInstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, 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 := &Instance{ + 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 +} + +type ProjectsLocationsInstancesImportDataCall struct { + s *Service + name string + importdatarequest *ImportDataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportData: Copies data from Cloud Storage to Parallelstore. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInstancesService) ImportData(name string, importdatarequest *ImportDataRequest) *ProjectsLocationsInstancesImportDataCall { + c := &ProjectsLocationsInstancesImportDataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.importdatarequest = importdatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInstancesImportDataCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesImportDataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesImportDataCall) Context(ctx context.Context) *ProjectsLocationsInstancesImportDataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesImportDataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesImportDataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.importdatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:importData") + 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 "parallelstore.projects.locations.instances.importData" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesImportDataCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsInstancesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all instances in a given project and location. +// +// - parent: The project and location for which to retrieve instance +// information, in the format `projects/{project_id}/locations/{location}`. +// To retrieve instance information for all locations, use "-" as the value +// of `{location}`. +func (r *ProjectsLocationsInstancesService) List(parent string) *ProjectsLocationsInstancesListCall { + c := &ProjectsLocationsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results. +func (c *ProjectsLocationsInstancesListCall) Filter(filter string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results. +func (c *ProjectsLocationsInstancesListCall) OrderBy(orderBy string) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, the server will pick +// an appropriate default. +func (c *ProjectsLocationsInstancesListCall) PageSize(pageSize int64) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInstancesListCall) PageToken(pageToken string) *ProjectsLocationsInstancesListCall { + 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 +// details. +func (c *ProjectsLocationsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInstancesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesListCall) Context(ctx context.Context) *ProjectsLocationsInstancesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta/{+parent}/instances") + 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 "parallelstore.projects.locations.instances.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListInstancesResponse.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 *ProjectsLocationsInstancesListCall) Do(opts ...googleapi.CallOption) (*ListInstancesResponse, 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 := &ListInstancesResponse{ + 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 +} + +// 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 *ProjectsLocationsInstancesListCall) Pages(ctx context.Context, f func(*ListInstancesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsInstancesPatchCall struct { + s *Service + name string + instance *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single instance. +// +// - name: Identifier. The resource name of the instance, in the format +// `projects/{project}/locations/{location}/instances/{instance_id}`. +func (r *ProjectsLocationsInstancesService) Patch(name string, instance *Instance) *ProjectsLocationsInstancesPatchCall { + c := &ProjectsLocationsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.instance = instance + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes since +// the first request. For example, consider a situation where you make an +// initial request and t he request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsInstancesPatchCall) RequestId(requestId string) *ProjectsLocationsInstancesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask of +// fields to update. Field mask is used to specify the fields to be overwritten +// in the Instance resource by the update. At least one path must be supplied +// in this field. The fields specified in the update_mask are relative to the +// resource, not the full request. +func (c *ProjectsLocationsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInstancesPatchCall { + 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 +// details. +func (c *ProjectsLocationsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInstancesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInstancesPatchCall) Context(ctx context.Context) *ProjectsLocationsInstancesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInstancesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInstancesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "parallelstore.projects.locations.instances.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{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 +// details. +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel") + 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 "parallelstore.projects.locations.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 +} + +type ProjectsLocationsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a long-running operation. This method indicates that the +// client is no longer interested in the operation result. It does not cancel +// the operation. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. +// +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { + c := &ProjectsLocationsOperationsDeleteCall{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 +// details. +func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 "parallelstore.projects.locations.operations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 := &GoogleProtobufEmpty{ + 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 +} + +type ProjectsLocationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { + c := &ProjectsLocationsOperationsGetCall{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 +// details. +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta/{+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 "parallelstore.projects.locations.operations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { + c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { + 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 +// details. +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta/{+name}/operations") + 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 "parallelstore.projects.locations.operations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListOperationsResponse.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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, 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 := &ListOperationsResponse{ + 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 +} + +// 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} diff --git a/playintegrity/v1/playintegrity-api.json b/playintegrity/v1/playintegrity-api.json index a423ad4c106..84227f62328 100644 --- a/playintegrity/v1/playintegrity-api.json +++ b/playintegrity/v1/playintegrity-api.json @@ -170,7 +170,7 @@ } } }, - "revision": "20240813", + "revision": "20241119", "rootUrl": "https://playintegrity.googleapis.com/", "schemas": { "AccountActivity": { @@ -366,10 +366,26 @@ }, "type": "object" }, + "DeviceAttributes": { + "description": "Contains information about the device for which the integrity token was generated, e.g. Android SDK version.", + "id": "DeviceAttributes", + "properties": { + "sdkVersion": { + "description": "Android SDK version of the device, as defined in the public Android documentation: https://developer.android.com/reference/android/os/Build.VERSION_CODES. It won't be set if a necessary requirement was missed. For example DeviceIntegrity did not meet the minimum bar.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "DeviceIntegrity": { "description": "Contains the device attestation information.", "id": "DeviceIntegrity", "properties": { + "deviceAttributes": { + "$ref": "DeviceAttributes", + "description": "Attributes of the device where the integrity token was generated." + }, "deviceRecall": { "$ref": "DeviceRecall", "description": "Details about the device recall bits set by the developer." diff --git a/playintegrity/v1/playintegrity-gen.go b/playintegrity/v1/playintegrity-gen.go index eba28198029..e9b8a3b47ed 100644 --- a/playintegrity/v1/playintegrity-gen.go +++ b/playintegrity/v1/playintegrity-gen.go @@ -428,8 +428,38 @@ func (s DecodeIntegrityTokenResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// DeviceAttributes: Contains information about the device for which the +// integrity token was generated, e.g. Android SDK version. +type DeviceAttributes struct { + // SdkVersion: Android SDK version of the device, as defined in the public + // Android documentation: + // https://developer.android.com/reference/android/os/Build.VERSION_CODES. It + // won't be set if a necessary requirement was missed. For example + // DeviceIntegrity did not meet the minimum bar. + SdkVersion int64 `json:"sdkVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "SdkVersion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SdkVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s DeviceAttributes) MarshalJSON() ([]byte, error) { + type NoMethod DeviceAttributes + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // DeviceIntegrity: Contains the device attestation information. type DeviceIntegrity struct { + // DeviceAttributes: Attributes of the device where the integrity token was + // generated. + DeviceAttributes *DeviceAttributes `json:"deviceAttributes,omitempty"` // DeviceRecall: Details about the device recall bits set by the developer. DeviceRecall *DeviceRecall `json:"deviceRecall,omitempty"` // DeviceRecognitionVerdict: Details about the integrity of the device the app @@ -452,15 +482,15 @@ type DeviceIntegrity struct { // RecentDeviceActivity: Details about the device activity of the device the // app is running on. RecentDeviceActivity *RecentDeviceActivity `json:"recentDeviceActivity,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeviceRecall") to + // ForceSendFields is a list of field names (e.g. "DeviceAttributes") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeviceRecall") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "DeviceAttributes") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } diff --git a/policysimulator/v1/policysimulator-api.json b/policysimulator/v1/policysimulator-api.json index 28b676548e0..71e7f98af12 100644 --- a/policysimulator/v1/policysimulator-api.json +++ b/policysimulator/v1/policysimulator-api.json @@ -806,7 +806,7 @@ } } }, - "revision": "20240617", + "revision": "20241118", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -977,6 +977,14 @@ "description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", "type": "boolean" }, + "parameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Required for GMCs if parameters defined in constraints. Pass parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }", + "type": "object" + }, "values": { "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", "description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." diff --git a/policysimulator/v1/policysimulator-gen.go b/policysimulator/v1/policysimulator-gen.go index 1912ca60e84..5b181e1a9c9 100644 --- a/policysimulator/v1/policysimulator-gen.go +++ b/policysimulator/v1/policysimulator-gen.go @@ -632,6 +632,12 @@ type GoogleCloudOrgpolicyV2PolicySpecPolicyRule struct { // configuration is acceptable. This field can be set only in policies for // boolean constraints. Enforce bool `json:"enforce,omitempty"` + // Parameters: Optional. Required for GMCs if parameters defined in + // constraints. Pass parameter values when policy enforcement is enabled. + // Ensure that parameter value types match those defined in the constraint + // definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], + // "allowAll" : true } + Parameters googleapi.RawMessage `json:"parameters,omitempty"` // Values: List of values to be used for this policy rule. This field can be // set only in policies for list constraints. Values *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues `json:"values,omitempty"` diff --git a/policysimulator/v1alpha/policysimulator-api.json b/policysimulator/v1alpha/policysimulator-api.json index 66610b9c20b..d07eb31470e 100644 --- a/policysimulator/v1alpha/policysimulator-api.json +++ b/policysimulator/v1alpha/policysimulator-api.json @@ -1078,7 +1078,7 @@ } } }, - "revision": "20240505", + "revision": "20241118", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1249,6 +1249,14 @@ "description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", "type": "boolean" }, + "parameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Required for GMCs if parameters defined in constraints. Pass parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }", + "type": "object" + }, "values": { "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", "description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." diff --git a/policysimulator/v1alpha/policysimulator-gen.go b/policysimulator/v1alpha/policysimulator-gen.go index e7e17a9fd81..05e4fb33f2f 100644 --- a/policysimulator/v1alpha/policysimulator-gen.go +++ b/policysimulator/v1alpha/policysimulator-gen.go @@ -644,6 +644,12 @@ type GoogleCloudOrgpolicyV2PolicySpecPolicyRule struct { // configuration is acceptable. This field can be set only in policies for // boolean constraints. Enforce bool `json:"enforce,omitempty"` + // Parameters: Optional. Required for GMCs if parameters defined in + // constraints. Pass parameter values when policy enforcement is enabled. + // Ensure that parameter value types match those defined in the constraint + // definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], + // "allowAll" : true } + Parameters googleapi.RawMessage `json:"parameters,omitempty"` // Values: List of values to be used for this policy rule. This field can be // set only in policies for list constraints. Values *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues `json:"values,omitempty"` diff --git a/policysimulator/v1beta/policysimulator-api.json b/policysimulator/v1beta/policysimulator-api.json index 9ce18531e16..e18ebecfdac 100644 --- a/policysimulator/v1beta/policysimulator-api.json +++ b/policysimulator/v1beta/policysimulator-api.json @@ -1078,7 +1078,7 @@ } } }, - "revision": "20240505", + "revision": "20241118", "rootUrl": "https://policysimulator.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -1249,6 +1249,14 @@ "description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", "type": "boolean" }, + "parameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Required for GMCs if parameters defined in constraints. Pass parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }", + "type": "object" + }, "values": { "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", "description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." diff --git a/policysimulator/v1beta/policysimulator-gen.go b/policysimulator/v1beta/policysimulator-gen.go index a25e551f19a..2740ae5d085 100644 --- a/policysimulator/v1beta/policysimulator-gen.go +++ b/policysimulator/v1beta/policysimulator-gen.go @@ -644,6 +644,12 @@ type GoogleCloudOrgpolicyV2PolicySpecPolicyRule struct { // configuration is acceptable. This field can be set only in policies for // boolean constraints. Enforce bool `json:"enforce,omitempty"` + // Parameters: Optional. Required for GMCs if parameters defined in + // constraints. Pass parameter values when policy enforcement is enabled. + // Ensure that parameter value types match those defined in the constraint + // definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], + // "allowAll" : true } + Parameters googleapi.RawMessage `json:"parameters,omitempty"` // Values: List of values to be used for this policy rule. This field can be // set only in policies for list constraints. Values *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues `json:"values,omitempty"` diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 978f6b6b6f9..2945eef09a5 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -177,8 +177,226 @@ } }, "resources": { + "backupCollections": { + "methods": { + "get": { + "description": "Get a backup collection.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}", + "httpMethod": "GET", + "id": "redis.projects.locations.backupCollections.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis backupCollection resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "BackupCollection" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all backup collections owned by a consumer project in either the specified location (region) or all locations. If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupCollections", + "httpMethod": "GET", + "id": "redis.projects.locations.backupCollections.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The `next_page_token` value returned from a previous [ListBackupCollections] request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the backupCollection location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backupCollections", + "response": { + "$ref": "ListBackupCollectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "delete": { + "description": "Deletes a specific backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "redis.projects.locations.backupCollections.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. Idempotent request UUID.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "export": { + "description": "Exports a specific backup to a customer target Cloud Storage URI.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}/backups/{backupsId}:export", + "httpMethod": "POST", + "id": "redis.projects.locations.backupCollections.backups.export", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:export", + "request": { + "$ref": "ExportBackupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a specific backup.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "redis.projects.locations.backupCollections.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all backups owned by a backup collection.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}/backups", + "httpMethod": "GET", + "id": "redis.projects.locations.backupCollections.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The `next_page_token` value returned from a previous [ListBackupCollections] request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the backupCollection using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/backups", + "response": { + "$ref": "ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "clusters": { "methods": { + "backup": { + "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:backup", + "httpMethod": "POST", + "id": "redis.projects.locations.clusters.backup", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:backup", + "request": { + "$ref": "BackupClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", @@ -727,7 +945,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "redis.projects.locations.operations.cancel", @@ -849,7 +1067,7 @@ } } }, - "revision": "20241017", + "revision": "20241114", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -875,6 +1093,36 @@ }, "type": "object" }, + "AutomatedBackupConfig": { + "description": "The automated backup config for a cluster.", + "id": "AutomatedBackupConfig", + "properties": { + "automatedBackupMode": { + "description": "Optional. The automated backup mode. If the mode is disabled, the other fields will be ignored.", + "enum": [ + "AUTOMATED_BACKUP_MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value. Automated backup config is not specified.", + "Automated backup config disabled.", + "Automated backup config enabled." + ], + "type": "string" + }, + "fixedFrequencySchedule": { + "$ref": "FixedFrequencySchedule", + "description": "Optional. Trigger automated backups at a fixed frequency." + }, + "retention": { + "description": "Optional. How long to keep automated backups before the backups are deleted. If not specified, the default value is 100 years which is also the maximum value supported. The minimum value is 1 day.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "AvailabilityConfiguration": { "description": "Configuration for availability of database instance", "id": "AvailabilityConfiguration", @@ -914,6 +1162,158 @@ }, "type": "object" }, + "Backup": { + "description": "Backup of a cluster.", + "id": "Backup", + "properties": { + "backupFiles": { + "description": "Output only. List of backup files of the backup.", + "items": { + "$ref": "BackupFile" + }, + "readOnly": true, + "type": "array" + }, + "backupType": { + "description": "Output only. Type of the backup.", + "enum": [ + "BACKUP_TYPE_UNSPECIFIED", + "ON_DEMAND", + "AUTOMATED" + ], + "enumDescriptions": [ + "The default value, not set.", + "On-demand backup.", + "Automated backup." + ], + "readOnly": true, + "type": "string" + }, + "cluster": { + "description": "Output only. Cluster resource path of this backup.", + "readOnly": true, + "type": "string" + }, + "clusterUid": { + "description": "Output only. Cluster uid of this backup.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the backup was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "engineVersion": { + "description": "Output only. redis-7.2, valkey-7.5", + "readOnly": true, + "type": "string" + }, + "expireTime": { + "description": "Output only. The time when the backup will expire.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. Full resource path of the backup. the last part of the name is the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster UID] OR customer specified while backup cluster. Example: 20240515123000_1234", + "type": "string" + }, + "nodeType": { + "description": "Output only. Node type of the cluster.", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "REDIS_SHARED_CORE_NANO", + "REDIS_HIGHMEM_MEDIUM", + "REDIS_HIGHMEM_XLARGE", + "REDIS_STANDARD_SMALL" + ], + "enumDescriptions": [ + "Node type unspecified", + "Redis shared core nano node_type.", + "Redis highmem medium node_type.", + "Redis highmem xlarge node_type.", + "Redis standard small node_type." + ], + "readOnly": true, + "type": "string" + }, + "replicaCount": { + "description": "Output only. Number of replicas for the cluster.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "shardCount": { + "description": "Output only. Number of shards for the cluster.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "state": { + "description": "Output only. State of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING" + ], + "enumDescriptions": [ + "The default value, not set.", + "The backup is being created.", + "The backup is active to be used.", + "The backup is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "totalSizeBytes": { + "description": "Output only. Total size of the backup in bytes.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BackupClusterRequest": { + "description": "Request for [BackupCluster].", + "id": "BackupClusterRequest", + "properties": { + "backupId": { + "description": "Optional. The id of the backup to be created. If not specified, the default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used.", + "type": "string" + }, + "ttl": { + "description": "Optional. TTL for the backup to expire. Value range is 1 day to 100 years. If not specified, the default value is 100 years.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "BackupCollection": { + "description": "BackupCollection of a cluster.", + "id": "BackupCollection", + "properties": { + "cluster": { + "description": "Output only. The full resource path of the cluster the backup collection belongs to. Example: projects/{project}/locations/{location}/clusters/{cluster}", + "readOnly": true, + "type": "string" + }, + "clusterUid": { + "description": "Output only. The cluster uid of the backup collection.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. Full resource path of the backup collection.", + "type": "string" + } + }, + "type": "object" + }, "BackupConfiguration": { "description": "Configuration for automatic backups", "id": "BackupConfiguration", @@ -933,6 +1333,30 @@ }, "type": "object" }, + "BackupFile": { + "description": "Backup is consisted of multiple backup files.", + "id": "BackupFile", + "properties": { + "createTime": { + "description": "Output only. The time when the backup file was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "fileName": { + "description": "Output only. e.g: .rdb", + "readOnly": true, + "type": "string" + }, + "sizeBytes": { + "description": "Output only. Size of the backup file in bytes.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "BackupRun": { "description": "A backup run.", "id": "BackupRun", @@ -1013,6 +1437,15 @@ ], "type": "string" }, + "automatedBackupConfig": { + "$ref": "AutomatedBackupConfig", + "description": "Optional. The automated backup config for the cluster." + }, + "backupCollection": { + "description": "Optional. Output only. The backup collection full resource name. Example: projects/{project}/locations/{location}/backupCollections/{collection}", + "readOnly": true, + "type": "string" + }, "clusterEndpoints": { "description": "Optional. A list of cluster enpoints.", "items": { @@ -1042,6 +1475,10 @@ "readOnly": true, "type": "array" }, + "gcsSource": { + "$ref": "GcsBackupSource", + "description": "Optional. Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters. Read permission is required to import from the provided Cloud Storage objects." + }, "maintenancePolicy": { "$ref": "ClusterMaintenancePolicy", "description": "Optional. ClusterMaintenancePolicy determines when to allow or deny updates." @@ -1051,6 +1488,10 @@ "description": "Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule.", "readOnly": true }, + "managedBackupSource": { + "$ref": "ManagedBackupSource", + "description": "Optional. Backups generated and managed by memorystore service." + }, "name": { "description": "Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", "type": "string" @@ -2389,6 +2830,17 @@ }, "type": "object" }, + "ExportBackupRequest": { + "description": "Request for [ExportBackup].", + "id": "ExportBackupRequest", + "properties": { + "gcsBucket": { + "description": "Google Cloud Storage bucket, like \"my-bucket\".", + "type": "string" + } + }, + "type": "object" + }, "ExportInstanceRequest": { "description": "Request for Export.", "id": "ExportInstanceRequest", @@ -2421,6 +2873,31 @@ }, "type": "object" }, + "FixedFrequencySchedule": { + "description": "This schedule allows the backup to be triggered at a fixed frequency (currently only daily is supported).", + "id": "FixedFrequencySchedule", + "properties": { + "startTime": { + "$ref": "TimeOfDay", + "description": "Optional. The start time of every automated backup in UTC. It must be set to the start of an hour. If not specified, the default value is the start of the hour when the automated backup config is enabled. For example, if the automated backup config is enabled at 10:13 AM UTC without specifying start_time, the default start time is 10:00 AM UTC." + } + }, + "type": "object" + }, + "GcsBackupSource": { + "description": "Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters.", + "id": "GcsBackupSource", + "properties": { + "uris": { + "description": "Optional. URIs of the GCS objects to import. Example: gs://bucket1/object1, gs://bucket2/folder2/object2", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GcsDestination": { "description": "The Cloud Storage location for the output content", "id": "GcsDestination", @@ -2821,6 +3298,56 @@ }, "type": "object" }, + "ListBackupCollectionsResponse": { + "description": "Response for [ListBackupCollections].", + "id": "ListBackupCollectionsResponse", + "properties": { + "backupCollections": { + "description": "A list of backupCollections in the project. If the `location_id` in the parent field of the request is \"-\", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder backupCollection entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/backupCollections/`- and the `status` field set to ERROR and `status_message` field set to \"location not available for ListBackupCollections\".", + "items": { + "$ref": "BackupCollection" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListBackupsResponse": { + "description": "Response for [ListBackups].", + "id": "ListBackupsResponse", + "properties": { + "backups": { + "description": "A list of backups in the project.", + "items": { + "$ref": "Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Backups that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListClustersResponse": { "description": "Response for ListClusters.", "id": "ListClustersResponse", @@ -2959,6 +3486,11 @@ "description": "Optional. Number of shards (if applicable).", "format": "int32", "type": "integer" + }, + "vcpuCount": { + "description": "Optional. The number of vCPUs. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", + "format": "double", + "type": "number" } }, "type": "object" @@ -3023,6 +3555,17 @@ }, "type": "object" }, + "ManagedBackupSource": { + "description": "Backups that generated and managed by memorystore.", + "id": "ManagedBackupSource", + "properties": { + "backup": { + "description": "Optional. Example: //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} A shorter version (without the prefix) of the backup name is also supported, like projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} In this case, it assumes the backup is under redis.googleapis.com.", + "type": "string" + } + }, + "type": "object" + }, "ManagedCertificateAuthority": { "id": "ManagedCertificateAuthority", "properties": { diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index c24629de5fc..6331a268c54 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -170,6 +170,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.BackupCollections = NewProjectsLocationsBackupCollectionsService(s) rs.Clusters = NewProjectsLocationsClustersService(s) rs.Instances = NewProjectsLocationsInstancesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) @@ -179,6 +180,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + BackupCollections *ProjectsLocationsBackupCollectionsService + Clusters *ProjectsLocationsClustersService Instances *ProjectsLocationsInstancesService @@ -186,6 +189,27 @@ type ProjectsLocationsService struct { Operations *ProjectsLocationsOperationsService } +func NewProjectsLocationsBackupCollectionsService(s *Service) *ProjectsLocationsBackupCollectionsService { + rs := &ProjectsLocationsBackupCollectionsService{s: s} + rs.Backups = NewProjectsLocationsBackupCollectionsBackupsService(s) + return rs +} + +type ProjectsLocationsBackupCollectionsService struct { + s *Service + + Backups *ProjectsLocationsBackupCollectionsBackupsService +} + +func NewProjectsLocationsBackupCollectionsBackupsService(s *Service) *ProjectsLocationsBackupCollectionsBackupsService { + rs := &ProjectsLocationsBackupCollectionsBackupsService{s: s} + return rs +} + +type ProjectsLocationsBackupCollectionsBackupsService struct { + s *Service +} + func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { rs := &ProjectsLocationsClustersService{s: s} return rs @@ -244,6 +268,42 @@ func (s AOFConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AutomatedBackupConfig: The automated backup config for a cluster. +type AutomatedBackupConfig struct { + // AutomatedBackupMode: Optional. The automated backup mode. If the mode is + // disabled, the other fields will be ignored. + // + // Possible values: + // "AUTOMATED_BACKUP_MODE_UNSPECIFIED" - Default value. Automated backup + // config is not specified. + // "DISABLED" - Automated backup config disabled. + // "ENABLED" - Automated backup config enabled. + AutomatedBackupMode string `json:"automatedBackupMode,omitempty"` + // FixedFrequencySchedule: Optional. Trigger automated backups at a fixed + // frequency. + FixedFrequencySchedule *FixedFrequencySchedule `json:"fixedFrequencySchedule,omitempty"` + // Retention: Optional. How long to keep automated backups before the backups + // are deleted. If not specified, the default value is 100 years which is also + // the maximum value supported. The minimum value is 1 day. + Retention string `json:"retention,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutomatedBackupMode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutomatedBackupMode") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutomatedBackupConfig) MarshalJSON() ([]byte, error) { + type NoMethod AutomatedBackupConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // AvailabilityConfiguration: Configuration for availability of database // instance type AvailabilityConfiguration struct { @@ -288,6 +348,133 @@ func (s AvailabilityConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Backup: Backup of a cluster. +type Backup struct { + // BackupFiles: Output only. List of backup files of the backup. + BackupFiles []*BackupFile `json:"backupFiles,omitempty"` + // BackupType: Output only. Type of the backup. + // + // Possible values: + // "BACKUP_TYPE_UNSPECIFIED" - The default value, not set. + // "ON_DEMAND" - On-demand backup. + // "AUTOMATED" - Automated backup. + BackupType string `json:"backupType,omitempty"` + // Cluster: Output only. Cluster resource path of this backup. + Cluster string `json:"cluster,omitempty"` + // ClusterUid: Output only. Cluster uid of this backup. + ClusterUid string `json:"clusterUid,omitempty"` + // CreateTime: Output only. The time when the backup was created. + CreateTime string `json:"createTime,omitempty"` + // EngineVersion: Output only. redis-7.2, valkey-7.5 + EngineVersion string `json:"engineVersion,omitempty"` + // ExpireTime: Output only. The time when the backup will expire. + ExpireTime string `json:"expireTime,omitempty"` + // Name: Identifier. Full resource path of the backup. the last part of the + // name is the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted + // Cluster UID] OR customer specified while backup cluster. Example: + // 20240515123000_1234 + Name string `json:"name,omitempty"` + // NodeType: Output only. Node type of the cluster. + // + // Possible values: + // "NODE_TYPE_UNSPECIFIED" - Node type unspecified + // "REDIS_SHARED_CORE_NANO" - Redis shared core nano node_type. + // "REDIS_HIGHMEM_MEDIUM" - Redis highmem medium node_type. + // "REDIS_HIGHMEM_XLARGE" - Redis highmem xlarge node_type. + // "REDIS_STANDARD_SMALL" - Redis standard small node_type. + NodeType string `json:"nodeType,omitempty"` + // ReplicaCount: Output only. Number of replicas for the cluster. + ReplicaCount int64 `json:"replicaCount,omitempty"` + // ShardCount: Output only. Number of shards for the cluster. + ShardCount int64 `json:"shardCount,omitempty"` + // State: Output only. State of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value, not set. + // "CREATING" - The backup is being created. + // "ACTIVE" - The backup is active to be used. + // "DELETING" - The backup is being deleted. + State string `json:"state,omitempty"` + // TotalSizeBytes: Output only. Total size of the backup in bytes. + TotalSizeBytes int64 `json:"totalSizeBytes,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BackupFiles") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupFiles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Backup) MarshalJSON() ([]byte, error) { + type NoMethod Backup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupClusterRequest: Request for [BackupCluster]. +type BackupClusterRequest struct { + // BackupId: Optional. The id of the backup to be created. If not specified, + // the default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. + BackupId string `json:"backupId,omitempty"` + // Ttl: Optional. TTL for the backup to expire. Value range is 1 day to 100 + // years. If not specified, the default value is 100 years. + Ttl string `json:"ttl,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod BackupClusterRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupCollection: BackupCollection of a cluster. +type BackupCollection struct { + // Cluster: Output only. The full resource path of the cluster the backup + // collection belongs to. Example: + // projects/{project}/locations/{location}/clusters/{cluster} + Cluster string `json:"cluster,omitempty"` + // ClusterUid: Output only. The cluster uid of the backup collection. + ClusterUid string `json:"clusterUid,omitempty"` + // Name: Identifier. Full resource path of the backup collection. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cluster") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupCollection) MarshalJSON() ([]byte, error) { + type NoMethod BackupCollection + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BackupConfiguration: Configuration for automatic backups type BackupConfiguration struct { // AutomatedBackupEnabled: Whether customer visible automated backups are @@ -317,6 +504,32 @@ func (s BackupConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BackupFile: Backup is consisted of multiple backup files. +type BackupFile struct { + // CreateTime: Output only. The time when the backup file was created. + CreateTime string `json:"createTime,omitempty"` + // FileName: Output only. e.g: .rdb + FileName string `json:"fileName,omitempty"` + // SizeBytes: Output only. Size of the backup file in bytes. + SizeBytes int64 `json:"sizeBytes,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupFile) MarshalJSON() ([]byte, error) { + type NoMethod BackupFile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BackupRun: A backup run. type BackupRun struct { // EndTime: The time the backup operation completed. REQUIRED @@ -412,6 +625,13 @@ type Cluster struct { // "AUTH_MODE_IAM_AUTH" - IAM basic authorization mode // "AUTH_MODE_DISABLED" - Authorization disabled mode AuthorizationMode string `json:"authorizationMode,omitempty"` + // AutomatedBackupConfig: Optional. The automated backup config for the + // cluster. + AutomatedBackupConfig *AutomatedBackupConfig `json:"automatedBackupConfig,omitempty"` + // BackupCollection: Optional. Output only. The backup collection full resource + // name. Example: + // projects/{project}/locations/{location}/backupCollections/{collection} + BackupCollection string `json:"backupCollection,omitempty"` // ClusterEndpoints: Optional. A list of cluster enpoints. ClusterEndpoints []*ClusterEndpoint `json:"clusterEndpoints,omitempty"` // CreateTime: Output only. The timestamp associated with the cluster creation @@ -426,12 +646,19 @@ type Cluster struct { // for Redis clients to connect to the cluster. Currently only one discovery // endpoint is supported. DiscoveryEndpoints []*DiscoveryEndpoint `json:"discoveryEndpoints,omitempty"` + // GcsSource: Optional. Backups stored in Cloud Storage buckets. The Cloud + // Storage buckets need to be the same region as the clusters. Read permission + // is required to import from the provided Cloud Storage objects. + GcsSource *GcsBackupSource `json:"gcsSource,omitempty"` // MaintenancePolicy: Optional. ClusterMaintenancePolicy determines when to // allow or deny updates. MaintenancePolicy *ClusterMaintenancePolicy `json:"maintenancePolicy,omitempty"` // MaintenanceSchedule: Output only. ClusterMaintenanceSchedule Output only // Published maintenance schedule. MaintenanceSchedule *ClusterMaintenanceSchedule `json:"maintenanceSchedule,omitempty"` + // ManagedBackupSource: Optional. Backups generated and managed by memorystore + // service. + ManagedBackupSource *ManagedBackupSource `json:"managedBackupSource,omitempty"` // Name: Required. Identifier. Unique name of the resource in this scope // including project and location using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` @@ -1645,6 +1872,28 @@ func (s Entitlement) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExportBackupRequest: Request for [ExportBackup]. +type ExportBackupRequest struct { + // GcsBucket: Google Cloud Storage bucket, like "my-bucket". + GcsBucket string `json:"gcsBucket,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsBucket") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsBucket") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportBackupRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportBackupRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ExportInstanceRequest: Request for Export. type ExportInstanceRequest struct { // OutputConfig: Required. Specify data to be exported. @@ -1701,6 +1950,57 @@ func (s FailoverInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// FixedFrequencySchedule: This schedule allows the backup to be triggered at a +// fixed frequency (currently only daily is supported). +type FixedFrequencySchedule struct { + // StartTime: Optional. The start time of every automated backup in UTC. It + // must be set to the start of an hour. If not specified, the default value is + // the start of the hour when the automated backup config is enabled. For + // example, if the automated backup config is enabled at 10:13 AM UTC without + // specifying start_time, the default start time is 10:00 AM UTC. + StartTime *TimeOfDay `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "StartTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "StartTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s FixedFrequencySchedule) MarshalJSON() ([]byte, error) { + type NoMethod FixedFrequencySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GcsBackupSource: Backups stored in Cloud Storage buckets. The Cloud Storage +// buckets need to be the same region as the clusters. +type GcsBackupSource struct { + // Uris: Optional. URIs of the GCS objects to import. Example: + // gs://bucket1/object1, gs://bucket2/folder2/object2 + Uris []string `json:"uris,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uris") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uris") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GcsBackupSource) MarshalJSON() ([]byte, error) { + type NoMethod GcsBackupSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GcsDestination: The Cloud Storage location for the output content type GcsDestination struct { // Uri: Required. Data destination URI (e.g. 'gs://my_bucket/my_object'). @@ -2126,6 +2426,74 @@ func (s InternalResourceMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListBackupCollectionsResponse: Response for [ListBackupCollections]. +type ListBackupCollectionsResponse struct { + // BackupCollections: A list of backupCollections in the project. If the + // `location_id` in the parent field of the request is "-", all regions + // available to the project are queried, and the results aggregated. If in such + // an aggregated query a location is unavailable, a placeholder + // backupCollection entry is included in the response with the `name` field set + // to a value of the form + // `projects/{project_id}/locations/{location_id}/backupCollections/`- and the + // `status` field set to ERROR and `status_message` field set to "location not + // available for ListBackupCollections". + BackupCollections []*BackupCollection `json:"backupCollections,omitempty"` + // NextPageToken: Token to retrieve the next page of results, or empty if there + // are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BackupCollections") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupCollections") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupCollectionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupCollectionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListBackupsResponse: Response for [ListBackups]. +type ListBackupsResponse struct { + // Backups: A list of backups in the project. + Backups []*Backup `json:"backups,omitempty"` + // NextPageToken: Token to retrieve the next page of results, or empty if there + // are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Backups that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListClustersResponse: Response for ListClusters. type ListClustersResponse struct { // Clusters: A list of Redis clusters in the project in the specified location, @@ -2308,6 +2676,9 @@ type MachineConfiguration struct { MemorySizeInBytes int64 `json:"memorySizeInBytes,omitempty,string"` // ShardCount: Optional. Number of shards (if applicable). ShardCount int64 `json:"shardCount,omitempty"` + // VcpuCount: Optional. The number of vCPUs. TODO(b/342344482, b/342346271) add + // proto validations again after bug fix. + VcpuCount float64 `json:"vcpuCount,omitempty"` // ForceSendFields is a list of field names (e.g. "CpuCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2326,6 +2697,20 @@ func (s MachineConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *MachineConfiguration) UnmarshalJSON(data []byte) error { + type NoMethod MachineConfiguration + var s1 struct { + VcpuCount gensupport.JSONFloat64 `json:"vcpuCount"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.VcpuCount = float64(s1.VcpuCount) + return nil +} + // MaintenancePolicy: Maintenance policy for an instance. type MaintenancePolicy struct { // CreateTime: Output only. The time when the policy was created. @@ -2390,6 +2775,34 @@ func (s MaintenanceSchedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ManagedBackupSource: Backups that generated and managed by memorystore. +type ManagedBackupSource struct { + // Backup: Optional. Example: + // //redis.googleapis.com/projects/{project}/locations/{location}/backupCollecti + // ons/{collection}/backups/{backup} A shorter version (without the prefix) of + // the backup name is also supported, like + // projects/{project}/locations/{location}/backupCollections/{collection}/backup + // s/{backup_id} In this case, it assumes the backup is under + // redis.googleapis.com. + Backup string `json:"backup,omitempty"` + // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ManagedBackupSource) MarshalJSON() ([]byte, error) { + type NoMethod ManagedBackupSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ManagedCertificateAuthority struct { // CaCerts: The PEM encoded CA certificate chains for redis managed server // authentication @@ -3701,6 +4114,838 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +type ProjectsLocationsBackupCollectionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a backup collection. +// +// - name: Redis backupCollection resource name using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}` where `location_id` refers to a GCP region. +func (r *ProjectsLocationsBackupCollectionsService) Get(name string) *ProjectsLocationsBackupCollectionsGetCall { + c := &ProjectsLocationsBackupCollectionsGetCall{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 +// details. +func (c *ProjectsLocationsBackupCollectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupCollectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupCollectionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "redis.projects.locations.backupCollections.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackupCollection.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 *ProjectsLocationsBackupCollectionsGetCall) Do(opts ...googleapi.CallOption) (*BackupCollection, 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 := &BackupCollection{ + 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 +} + +type ProjectsLocationsBackupCollectionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all backup collections owned by a consumer project in either the +// specified location (region) or all locations. If `location_id` is specified +// as `-` (wildcard), then all regions available to the project are queried, +// and the results are aggregated. +// +// - parent: The resource name of the backupCollection location using the form: +// `projects/{project_id}/locations/{location_id}` where `location_id` refers +// to a GCP region. +func (r *ProjectsLocationsBackupCollectionsService) List(parent string) *ProjectsLocationsBackupCollectionsListCall { + c := &ProjectsLocationsBackupCollectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If not specified, a default value of 1000 will be used by the +// service. Regardless of the page_size value, the response may include a +// partial list and a caller should only rely on response's `next_page_token` +// to determine if there are more clusters left to be queried. +func (c *ProjectsLocationsBackupCollectionsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupCollectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The `next_page_token` +// value returned from a previous [ListBackupCollections] request, if any. +func (c *ProjectsLocationsBackupCollectionsListCall) PageToken(pageToken string) *ProjectsLocationsBackupCollectionsListCall { + 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 +// details. +func (c *ProjectsLocationsBackupCollectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupCollectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupCollectionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsListCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/backupCollections") + 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 "redis.projects.locations.backupCollections.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupCollectionsResponse.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 *ProjectsLocationsBackupCollectionsListCall) Do(opts ...googleapi.CallOption) (*ListBackupCollectionsResponse, 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 := &ListBackupCollectionsResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupCollectionsListCall) Pages(ctx context.Context, f func(*ListBackupCollectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsBackupCollectionsBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a specific backup. +// +// - name: Redis backup resource name using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}/backups/{backup_id}`. +func (r *ProjectsLocationsBackupCollectionsBackupsService) Delete(name string) *ProjectsLocationsBackupCollectionsBackupsDeleteCall { + c := &ProjectsLocationsBackupCollectionsBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": Idempotent request UUID. +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsBackupCollectionsBackupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "redis.projects.locations.backupCollections.backups.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsBackupCollectionsBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsBackupCollectionsBackupsExportCall struct { + s *Service + name string + exportbackuprequest *ExportBackupRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports a specific backup to a customer target Cloud Storage URI. +// +// - name: Redis backup resource name using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}/backups/{backup_id}`. +func (r *ProjectsLocationsBackupCollectionsBackupsService) Export(name string, exportbackuprequest *ExportBackupRequest) *ProjectsLocationsBackupCollectionsBackupsExportCall { + c := &ProjectsLocationsBackupCollectionsBackupsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.exportbackuprequest = exportbackuprequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupCollectionsBackupsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsBackupsExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsBackupsExportCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsBackupsExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsBackupsExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsBackupsExportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportbackuprequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") + 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 "redis.projects.locations.backupCollections.backups.export" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsBackupCollectionsBackupsExportCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsBackupCollectionsBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a specific backup. +// +// - name: Redis backup resource name using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}/backups/{backup_id}`. +func (r *ProjectsLocationsBackupCollectionsBackupsService) Get(name string) *ProjectsLocationsBackupCollectionsBackupsGetCall { + c := &ProjectsLocationsBackupCollectionsBackupsGetCall{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 +// details. +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupCollectionsBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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 "redis.projects.locations.backupCollections.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Backup.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 *ProjectsLocationsBackupCollectionsBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, 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 := &Backup{ + 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 +} + +type ProjectsLocationsBackupCollectionsBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all backups owned by a backup collection. +// +// - parent: The resource name of the backupCollection using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}`. +func (r *ProjectsLocationsBackupCollectionsBackupsService) List(parent string) *ProjectsLocationsBackupCollectionsBackupsListCall { + c := &ProjectsLocationsBackupCollectionsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If not specified, a default value of 1000 will be used by the +// service. Regardless of the page_size value, the response may include a +// partial list and a caller should only rely on response's `next_page_token` +// to determine if there are more clusters left to be queried. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupCollectionsBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The `next_page_token` +// value returned from a previous [ListBackupCollections] request, if any. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupCollectionsBackupsListCall { + 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 +// details. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupCollectionsBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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}/backups") + 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 "redis.projects.locations.backupCollections.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupsResponse.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 *ProjectsLocationsBackupCollectionsBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, 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 := &ListBackupsResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupCollectionsBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsClustersBackupCall struct { + s *Service + name string + backupclusterrequest *BackupClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Backup: Backup Redis Cluster. If this is the first time a backup is being +// created, a backup collection will be created at the backend, and this backup +// belongs to this collection. Both collection and backup will have a resource +// name. Backup will be executed for each shard. A replica (primary if nonHA) +// will be selected to perform the execution. Backup call will be rejected if +// there is an ongoing backup or update operation. +// +// - name: Redis cluster resource name using the form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` +// where `location_id` refers to a GCP region. +func (r *ProjectsLocationsClustersService) Backup(name string, backupclusterrequest *BackupClusterRequest) *ProjectsLocationsClustersBackupCall { + c := &ProjectsLocationsClustersBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backupclusterrequest = backupclusterrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersBackupCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersBackupCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersBackupCall) Context(ctx context.Context) *ProjectsLocationsClustersBackupCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersBackupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersBackupCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backupclusterrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:backup") + 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 "redis.projects.locations.clusters.backup" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsClustersBackupCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + type ProjectsLocationsClustersCreateCall struct { s *Service parent string @@ -5780,7 +7025,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index 39d9be037d4..91592012e40 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -177,8 +177,226 @@ } }, "resources": { + "backupCollections": { + "methods": { + "get": { + "description": "Get a backup collection.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}", + "httpMethod": "GET", + "id": "redis.projects.locations.backupCollections.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis backupCollection resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "BackupCollection" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all backup collections owned by a consumer project in either the specified location (region) or all locations. If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupCollections", + "httpMethod": "GET", + "id": "redis.projects.locations.backupCollections.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The `next_page_token` value returned from a previous [ListBackupCollections] request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the backupCollection location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/backupCollections", + "response": { + "$ref": "ListBackupCollectionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "delete": { + "description": "Deletes a specific backup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "redis.projects.locations.backupCollections.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. Idempotent request UUID.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "export": { + "description": "Exports a specific backup to a customer target Cloud Storage URI.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}/backups/{backupsId}:export", + "httpMethod": "POST", + "id": "redis.projects.locations.backupCollections.backups.export", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:export", + "request": { + "$ref": "ExportBackupRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a specific backup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "redis.projects.locations.backupCollections.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all backups owned by a backup collection.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/backupCollections/{backupCollectionsId}/backups", + "httpMethod": "GET", + "id": "redis.projects.locations.backupCollections.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. The `next_page_token` value returned from a previous [ListBackupCollections] request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The resource name of the backupCollection using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/backupCollections/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/backups", + "response": { + "$ref": "ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "clusters": { "methods": { + "backup": { + "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:backup", + "httpMethod": "POST", + "id": "redis.projects.locations.clusters.backup", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:backup", + "request": { + "$ref": "BackupClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "create": { "description": "Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", @@ -727,7 +945,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "redis.projects.locations.operations.cancel", @@ -849,7 +1067,7 @@ } } }, - "revision": "20241017", + "revision": "20241114", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -875,6 +1093,36 @@ }, "type": "object" }, + "AutomatedBackupConfig": { + "description": "The automated backup config for a cluster.", + "id": "AutomatedBackupConfig", + "properties": { + "automatedBackupMode": { + "description": "Optional. The automated backup mode. If the mode is disabled, the other fields will be ignored.", + "enum": [ + "AUTOMATED_BACKUP_MODE_UNSPECIFIED", + "DISABLED", + "ENABLED" + ], + "enumDescriptions": [ + "Default value. Automated backup config is not specified.", + "Automated backup config disabled.", + "Automated backup config enabled." + ], + "type": "string" + }, + "fixedFrequencySchedule": { + "$ref": "FixedFrequencySchedule", + "description": "Optional. Trigger automated backups at a fixed frequency." + }, + "retention": { + "description": "Optional. How long to keep automated backups before the backups are deleted. If not specified, the default value is 100 years which is also the maximum value supported. The minimum value is 1 day.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, "AvailabilityConfiguration": { "description": "Configuration for availability of database instance", "id": "AvailabilityConfiguration", @@ -914,6 +1162,158 @@ }, "type": "object" }, + "Backup": { + "description": "Backup of a cluster.", + "id": "Backup", + "properties": { + "backupFiles": { + "description": "Output only. List of backup files of the backup.", + "items": { + "$ref": "BackupFile" + }, + "readOnly": true, + "type": "array" + }, + "backupType": { + "description": "Output only. Type of the backup.", + "enum": [ + "BACKUP_TYPE_UNSPECIFIED", + "ON_DEMAND", + "AUTOMATED" + ], + "enumDescriptions": [ + "The default value, not set.", + "On-demand backup.", + "Automated backup." + ], + "readOnly": true, + "type": "string" + }, + "cluster": { + "description": "Output only. Cluster resource path of this backup.", + "readOnly": true, + "type": "string" + }, + "clusterUid": { + "description": "Output only. Cluster uid of this backup.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time when the backup was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "engineVersion": { + "description": "Output only. redis-7.2, valkey-7.5", + "readOnly": true, + "type": "string" + }, + "expireTime": { + "description": "Output only. The time when the backup will expire.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. Full resource path of the backup. the last part of the name is the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster UID] OR customer specified while backup cluster. Example: 20240515123000_1234", + "type": "string" + }, + "nodeType": { + "description": "Output only. Node type of the cluster.", + "enum": [ + "NODE_TYPE_UNSPECIFIED", + "REDIS_SHARED_CORE_NANO", + "REDIS_HIGHMEM_MEDIUM", + "REDIS_HIGHMEM_XLARGE", + "REDIS_STANDARD_SMALL" + ], + "enumDescriptions": [ + "Node type unspecified", + "Redis shared core nano node_type.", + "Redis highmem medium node_type.", + "Redis highmem xlarge node_type.", + "Redis standard small node_type." + ], + "readOnly": true, + "type": "string" + }, + "replicaCount": { + "description": "Output only. Number of replicas for the cluster.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "shardCount": { + "description": "Output only. Number of shards for the cluster.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "state": { + "description": "Output only. State of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING" + ], + "enumDescriptions": [ + "The default value, not set.", + "The backup is being created.", + "The backup is active to be used.", + "The backup is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "totalSizeBytes": { + "description": "Output only. Total size of the backup in bytes.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "BackupClusterRequest": { + "description": "Request for [BackupCluster].", + "id": "BackupClusterRequest", + "properties": { + "backupId": { + "description": "Optional. The id of the backup to be created. If not specified, the default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used.", + "type": "string" + }, + "ttl": { + "description": "Optional. TTL for the backup to expire. Value range is 1 day to 100 years. If not specified, the default value is 100 years.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "BackupCollection": { + "description": "BackupCollection of a cluster.", + "id": "BackupCollection", + "properties": { + "cluster": { + "description": "Output only. The full resource path of the cluster the backup collection belongs to. Example: projects/{project}/locations/{location}/clusters/{cluster}", + "readOnly": true, + "type": "string" + }, + "clusterUid": { + "description": "Output only. The cluster uid of the backup collection.", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Identifier. Full resource path of the backup collection.", + "type": "string" + } + }, + "type": "object" + }, "BackupConfiguration": { "description": "Configuration for automatic backups", "id": "BackupConfiguration", @@ -933,6 +1333,30 @@ }, "type": "object" }, + "BackupFile": { + "description": "Backup is consisted of multiple backup files.", + "id": "BackupFile", + "properties": { + "createTime": { + "description": "Output only. The time when the backup file was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "fileName": { + "description": "Output only. e.g: .rdb", + "readOnly": true, + "type": "string" + }, + "sizeBytes": { + "description": "Output only. Size of the backup file in bytes.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "BackupRun": { "description": "A backup run.", "id": "BackupRun", @@ -1013,6 +1437,15 @@ ], "type": "string" }, + "automatedBackupConfig": { + "$ref": "AutomatedBackupConfig", + "description": "Optional. The automated backup config for the cluster." + }, + "backupCollection": { + "description": "Optional. Output only. The backup collection full resource name. Example: projects/{project}/locations/{location}/backupCollections/{collection}", + "readOnly": true, + "type": "string" + }, "clusterEndpoints": { "description": "Optional. A list of cluster enpoints.", "items": { @@ -1042,6 +1475,10 @@ "readOnly": true, "type": "array" }, + "gcsSource": { + "$ref": "GcsBackupSource", + "description": "Optional. Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters. Read permission is required to import from the provided Cloud Storage objects." + }, "maintenancePolicy": { "$ref": "ClusterMaintenancePolicy", "description": "Optional. ClusterMaintenancePolicy determines when to allow or deny updates." @@ -1051,6 +1488,10 @@ "description": "Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule.", "readOnly": true }, + "managedBackupSource": { + "$ref": "ManagedBackupSource", + "description": "Optional. Backups generated and managed by memorystore service." + }, "name": { "description": "Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", "type": "string" @@ -2389,6 +2830,17 @@ }, "type": "object" }, + "ExportBackupRequest": { + "description": "Request for [ExportBackup].", + "id": "ExportBackupRequest", + "properties": { + "gcsBucket": { + "description": "Google Cloud Storage bucket, like \"my-bucket\".", + "type": "string" + } + }, + "type": "object" + }, "ExportInstanceRequest": { "description": "Request for Export.", "id": "ExportInstanceRequest", @@ -2421,6 +2873,31 @@ }, "type": "object" }, + "FixedFrequencySchedule": { + "description": "This schedule allows the backup to be triggered at a fixed frequency (currently only daily is supported).", + "id": "FixedFrequencySchedule", + "properties": { + "startTime": { + "$ref": "TimeOfDay", + "description": "Optional. The start time of every automated backup in UTC. It must be set to the start of an hour. If not specified, the default value is the start of the hour when the automated backup config is enabled. For example, if the automated backup config is enabled at 10:13 AM UTC without specifying start_time, the default start time is 10:00 AM UTC." + } + }, + "type": "object" + }, + "GcsBackupSource": { + "description": "Backups stored in Cloud Storage buckets. The Cloud Storage buckets need to be the same region as the clusters.", + "id": "GcsBackupSource", + "properties": { + "uris": { + "description": "Optional. URIs of the GCS objects to import. Example: gs://bucket1/object1, gs://bucket2/folder2/object2", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GcsDestination": { "description": "The Cloud Storage location for the output content", "id": "GcsDestination", @@ -2453,7 +2930,7 @@ "type": "string" }, "cancelRequested": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have google.longrunning.Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "readOnly": true, "type": "boolean" }, @@ -2828,6 +3305,56 @@ }, "type": "object" }, + "ListBackupCollectionsResponse": { + "description": "Response for [ListBackupCollections].", + "id": "ListBackupCollectionsResponse", + "properties": { + "backupCollections": { + "description": "A list of backupCollections in the project. If the `location_id` in the parent field of the request is \"-\", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder backupCollection entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/backupCollections/`- and the `status` field set to ERROR and `status_message` field set to \"location not available for ListBackupCollections\".", + "items": { + "$ref": "BackupCollection" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListBackupsResponse": { + "description": "Response for [ListBackups].", + "id": "ListBackupsResponse", + "properties": { + "backups": { + "description": "A list of backups in the project.", + "items": { + "$ref": "Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", + "type": "string" + }, + "unreachable": { + "description": "Backups that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "ListClustersResponse": { "description": "Response for ListClusters.", "id": "ListClustersResponse", @@ -2966,6 +3493,11 @@ "description": "Optional. Number of shards (if applicable).", "format": "int32", "type": "integer" + }, + "vcpuCount": { + "description": "Optional. The number of vCPUs. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", + "format": "double", + "type": "number" } }, "type": "object" @@ -3030,6 +3562,17 @@ }, "type": "object" }, + "ManagedBackupSource": { + "description": "Backups that generated and managed by memorystore.", + "id": "ManagedBackupSource", + "properties": { + "backup": { + "description": "Optional. Example: //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} A shorter version (without the prefix) of the backup name is also supported, like projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} In this case, it assumes the backup is under redis.googleapis.com.", + "type": "string" + } + }, + "type": "object" + }, "ManagedCertificateAuthority": { "id": "ManagedCertificateAuthority", "properties": { diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index 6338f7276ce..456514d5eb7 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -170,6 +170,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} + rs.BackupCollections = NewProjectsLocationsBackupCollectionsService(s) rs.Clusters = NewProjectsLocationsClustersService(s) rs.Instances = NewProjectsLocationsInstancesService(s) rs.Operations = NewProjectsLocationsOperationsService(s) @@ -179,6 +180,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service + BackupCollections *ProjectsLocationsBackupCollectionsService + Clusters *ProjectsLocationsClustersService Instances *ProjectsLocationsInstancesService @@ -186,6 +189,27 @@ type ProjectsLocationsService struct { Operations *ProjectsLocationsOperationsService } +func NewProjectsLocationsBackupCollectionsService(s *Service) *ProjectsLocationsBackupCollectionsService { + rs := &ProjectsLocationsBackupCollectionsService{s: s} + rs.Backups = NewProjectsLocationsBackupCollectionsBackupsService(s) + return rs +} + +type ProjectsLocationsBackupCollectionsService struct { + s *Service + + Backups *ProjectsLocationsBackupCollectionsBackupsService +} + +func NewProjectsLocationsBackupCollectionsBackupsService(s *Service) *ProjectsLocationsBackupCollectionsBackupsService { + rs := &ProjectsLocationsBackupCollectionsBackupsService{s: s} + return rs +} + +type ProjectsLocationsBackupCollectionsBackupsService struct { + s *Service +} + func NewProjectsLocationsClustersService(s *Service) *ProjectsLocationsClustersService { rs := &ProjectsLocationsClustersService{s: s} return rs @@ -244,6 +268,42 @@ func (s AOFConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// AutomatedBackupConfig: The automated backup config for a cluster. +type AutomatedBackupConfig struct { + // AutomatedBackupMode: Optional. The automated backup mode. If the mode is + // disabled, the other fields will be ignored. + // + // Possible values: + // "AUTOMATED_BACKUP_MODE_UNSPECIFIED" - Default value. Automated backup + // config is not specified. + // "DISABLED" - Automated backup config disabled. + // "ENABLED" - Automated backup config enabled. + AutomatedBackupMode string `json:"automatedBackupMode,omitempty"` + // FixedFrequencySchedule: Optional. Trigger automated backups at a fixed + // frequency. + FixedFrequencySchedule *FixedFrequencySchedule `json:"fixedFrequencySchedule,omitempty"` + // Retention: Optional. How long to keep automated backups before the backups + // are deleted. If not specified, the default value is 100 years which is also + // the maximum value supported. The minimum value is 1 day. + Retention string `json:"retention,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutomatedBackupMode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutomatedBackupMode") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s AutomatedBackupConfig) MarshalJSON() ([]byte, error) { + type NoMethod AutomatedBackupConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // AvailabilityConfiguration: Configuration for availability of database // instance type AvailabilityConfiguration struct { @@ -288,6 +348,133 @@ func (s AvailabilityConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// Backup: Backup of a cluster. +type Backup struct { + // BackupFiles: Output only. List of backup files of the backup. + BackupFiles []*BackupFile `json:"backupFiles,omitempty"` + // BackupType: Output only. Type of the backup. + // + // Possible values: + // "BACKUP_TYPE_UNSPECIFIED" - The default value, not set. + // "ON_DEMAND" - On-demand backup. + // "AUTOMATED" - Automated backup. + BackupType string `json:"backupType,omitempty"` + // Cluster: Output only. Cluster resource path of this backup. + Cluster string `json:"cluster,omitempty"` + // ClusterUid: Output only. Cluster uid of this backup. + ClusterUid string `json:"clusterUid,omitempty"` + // CreateTime: Output only. The time when the backup was created. + CreateTime string `json:"createTime,omitempty"` + // EngineVersion: Output only. redis-7.2, valkey-7.5 + EngineVersion string `json:"engineVersion,omitempty"` + // ExpireTime: Output only. The time when the backup will expire. + ExpireTime string `json:"expireTime,omitempty"` + // Name: Identifier. Full resource path of the backup. the last part of the + // name is the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted + // Cluster UID] OR customer specified while backup cluster. Example: + // 20240515123000_1234 + Name string `json:"name,omitempty"` + // NodeType: Output only. Node type of the cluster. + // + // Possible values: + // "NODE_TYPE_UNSPECIFIED" - Node type unspecified + // "REDIS_SHARED_CORE_NANO" - Redis shared core nano node_type. + // "REDIS_HIGHMEM_MEDIUM" - Redis highmem medium node_type. + // "REDIS_HIGHMEM_XLARGE" - Redis highmem xlarge node_type. + // "REDIS_STANDARD_SMALL" - Redis standard small node_type. + NodeType string `json:"nodeType,omitempty"` + // ReplicaCount: Output only. Number of replicas for the cluster. + ReplicaCount int64 `json:"replicaCount,omitempty"` + // ShardCount: Output only. Number of shards for the cluster. + ShardCount int64 `json:"shardCount,omitempty"` + // State: Output only. State of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value, not set. + // "CREATING" - The backup is being created. + // "ACTIVE" - The backup is active to be used. + // "DELETING" - The backup is being deleted. + State string `json:"state,omitempty"` + // TotalSizeBytes: Output only. Total size of the backup in bytes. + TotalSizeBytes int64 `json:"totalSizeBytes,omitempty,string"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BackupFiles") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupFiles") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s Backup) MarshalJSON() ([]byte, error) { + type NoMethod Backup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupClusterRequest: Request for [BackupCluster]. +type BackupClusterRequest struct { + // BackupId: Optional. The id of the backup to be created. If not specified, + // the default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. + BackupId string `json:"backupId,omitempty"` + // Ttl: Optional. TTL for the backup to expire. Value range is 1 day to 100 + // years. If not specified, the default value is 100 years. + Ttl string `json:"ttl,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupClusterRequest) MarshalJSON() ([]byte, error) { + type NoMethod BackupClusterRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// BackupCollection: BackupCollection of a cluster. +type BackupCollection struct { + // Cluster: Output only. The full resource path of the cluster the backup + // collection belongs to. Example: + // projects/{project}/locations/{location}/clusters/{cluster} + Cluster string `json:"cluster,omitempty"` + // ClusterUid: Output only. The cluster uid of the backup collection. + ClusterUid string `json:"clusterUid,omitempty"` + // Name: Identifier. Full resource path of the backup collection. + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Cluster") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cluster") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupCollection) MarshalJSON() ([]byte, error) { + type NoMethod BackupCollection + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BackupConfiguration: Configuration for automatic backups type BackupConfiguration struct { // AutomatedBackupEnabled: Whether customer visible automated backups are @@ -317,6 +504,32 @@ func (s BackupConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// BackupFile: Backup is consisted of multiple backup files. +type BackupFile struct { + // CreateTime: Output only. The time when the backup file was created. + CreateTime string `json:"createTime,omitempty"` + // FileName: Output only. e.g: .rdb + FileName string `json:"fileName,omitempty"` + // SizeBytes: Output only. Size of the backup file in bytes. + SizeBytes int64 `json:"sizeBytes,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackupFile) MarshalJSON() ([]byte, error) { + type NoMethod BackupFile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // BackupRun: A backup run. type BackupRun struct { // EndTime: The time the backup operation completed. REQUIRED @@ -412,6 +625,13 @@ type Cluster struct { // "AUTH_MODE_IAM_AUTH" - IAM basic authorization mode // "AUTH_MODE_DISABLED" - Authorization disabled mode AuthorizationMode string `json:"authorizationMode,omitempty"` + // AutomatedBackupConfig: Optional. The automated backup config for the + // cluster. + AutomatedBackupConfig *AutomatedBackupConfig `json:"automatedBackupConfig,omitempty"` + // BackupCollection: Optional. Output only. The backup collection full resource + // name. Example: + // projects/{project}/locations/{location}/backupCollections/{collection} + BackupCollection string `json:"backupCollection,omitempty"` // ClusterEndpoints: Optional. A list of cluster enpoints. ClusterEndpoints []*ClusterEndpoint `json:"clusterEndpoints,omitempty"` // CreateTime: Output only. The timestamp associated with the cluster creation @@ -426,12 +646,19 @@ type Cluster struct { // for Redis clients to connect to the cluster. Currently only one discovery // endpoint is supported. DiscoveryEndpoints []*DiscoveryEndpoint `json:"discoveryEndpoints,omitempty"` + // GcsSource: Optional. Backups stored in Cloud Storage buckets. The Cloud + // Storage buckets need to be the same region as the clusters. Read permission + // is required to import from the provided Cloud Storage objects. + GcsSource *GcsBackupSource `json:"gcsSource,omitempty"` // MaintenancePolicy: Optional. ClusterMaintenancePolicy determines when to // allow or deny updates. MaintenancePolicy *ClusterMaintenancePolicy `json:"maintenancePolicy,omitempty"` // MaintenanceSchedule: Output only. ClusterMaintenanceSchedule Output only // Published maintenance schedule. MaintenanceSchedule *ClusterMaintenanceSchedule `json:"maintenanceSchedule,omitempty"` + // ManagedBackupSource: Optional. Backups generated and managed by memorystore + // service. + ManagedBackupSource *ManagedBackupSource `json:"managedBackupSource,omitempty"` // Name: Required. Identifier. Unique name of the resource in this scope // including project and location using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` @@ -1645,6 +1872,28 @@ func (s Entitlement) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ExportBackupRequest: Request for [ExportBackup]. +type ExportBackupRequest struct { + // GcsBucket: Google Cloud Storage bucket, like "my-bucket". + GcsBucket string `json:"gcsBucket,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsBucket") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsBucket") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ExportBackupRequest) MarshalJSON() ([]byte, error) { + type NoMethod ExportBackupRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ExportInstanceRequest: Request for Export. type ExportInstanceRequest struct { // OutputConfig: Required. Specify data to be exported. @@ -1701,6 +1950,57 @@ func (s FailoverInstanceRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// FixedFrequencySchedule: This schedule allows the backup to be triggered at a +// fixed frequency (currently only daily is supported). +type FixedFrequencySchedule struct { + // StartTime: Optional. The start time of every automated backup in UTC. It + // must be set to the start of an hour. If not specified, the default value is + // the start of the hour when the automated backup config is enabled. For + // example, if the automated backup config is enabled at 10:13 AM UTC without + // specifying start_time, the default start time is 10:00 AM UTC. + StartTime *TimeOfDay `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "StartTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "StartTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s FixedFrequencySchedule) MarshalJSON() ([]byte, error) { + type NoMethod FixedFrequencySchedule + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GcsBackupSource: Backups stored in Cloud Storage buckets. The Cloud Storage +// buckets need to be the same region as the clusters. +type GcsBackupSource struct { + // Uris: Optional. URIs of the GCS objects to import. Example: + // gs://bucket1/object1, gs://bucket2/folder2/object2 + Uris []string `json:"uris,omitempty"` + // ForceSendFields is a list of field names (e.g. "Uris") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Uris") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GcsBackupSource) MarshalJSON() ([]byte, error) { + type NoMethod GcsBackupSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GcsDestination: The Cloud Storage location for the output content type GcsDestination struct { // Uri: Required. Data destination URI (e.g. 'gs://my_bucket/my_object'). @@ -1753,8 +2053,8 @@ type GoogleCloudCommonOperationMetadata struct { ApiVersion string `json:"apiVersion,omitempty"` // CancelRequested: Output only. Identifies whether the user has requested // cancellation of the operation. Operations that have been cancelled - // successfully have Operation.error value with a google.rpc.Status.code of 1, - // corresponding to `Code.CANCELLED`. + // successfully have google.longrunning.Operation.error value with a + // google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. CancelRequested bool `json:"cancelRequested,omitempty"` // CreateTime: Output only. The time the operation was created. CreateTime string `json:"createTime,omitempty"` @@ -2130,6 +2430,74 @@ func (s InternalResourceMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListBackupCollectionsResponse: Response for [ListBackupCollections]. +type ListBackupCollectionsResponse struct { + // BackupCollections: A list of backupCollections in the project. If the + // `location_id` in the parent field of the request is "-", all regions + // available to the project are queried, and the results aggregated. If in such + // an aggregated query a location is unavailable, a placeholder + // backupCollection entry is included in the response with the `name` field set + // to a value of the form + // `projects/{project_id}/locations/{location_id}/backupCollections/`- and the + // `status` field set to ERROR and `status_message` field set to "location not + // available for ListBackupCollections". + BackupCollections []*BackupCollection `json:"backupCollections,omitempty"` + // NextPageToken: Token to retrieve the next page of results, or empty if there + // are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BackupCollections") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupCollections") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupCollectionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupCollectionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListBackupsResponse: Response for [ListBackups]. +type ListBackupsResponse struct { + // Backups: A list of backups in the project. + Backups []*Backup `json:"backups,omitempty"` + // NextPageToken: Token to retrieve the next page of results, or empty if there + // are no more results in the list. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Backups that could not be reached. + Unreachable []string `json:"unreachable,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListClustersResponse: Response for ListClusters. type ListClustersResponse struct { // Clusters: A list of Redis clusters in the project in the specified location, @@ -2312,6 +2680,9 @@ type MachineConfiguration struct { MemorySizeInBytes int64 `json:"memorySizeInBytes,omitempty,string"` // ShardCount: Optional. Number of shards (if applicable). ShardCount int64 `json:"shardCount,omitempty"` + // VcpuCount: Optional. The number of vCPUs. TODO(b/342344482, b/342346271) add + // proto validations again after bug fix. + VcpuCount float64 `json:"vcpuCount,omitempty"` // ForceSendFields is a list of field names (e.g. "CpuCount") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -2330,6 +2701,20 @@ func (s MachineConfiguration) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *MachineConfiguration) UnmarshalJSON(data []byte) error { + type NoMethod MachineConfiguration + var s1 struct { + VcpuCount gensupport.JSONFloat64 `json:"vcpuCount"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.VcpuCount = float64(s1.VcpuCount) + return nil +} + // MaintenancePolicy: Maintenance policy for an instance. type MaintenancePolicy struct { // CreateTime: Output only. The time when the policy was created. @@ -2394,6 +2779,34 @@ func (s MaintenanceSchedule) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ManagedBackupSource: Backups that generated and managed by memorystore. +type ManagedBackupSource struct { + // Backup: Optional. Example: + // //redis.googleapis.com/projects/{project}/locations/{location}/backupCollecti + // ons/{collection}/backups/{backup} A shorter version (without the prefix) of + // the backup name is also supported, like + // projects/{project}/locations/{location}/backupCollections/{collection}/backup + // s/{backup_id} In this case, it assumes the backup is under + // redis.googleapis.com. + Backup string `json:"backup,omitempty"` + // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ManagedBackupSource) MarshalJSON() ([]byte, error) { + type NoMethod ManagedBackupSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ManagedCertificateAuthority struct { // CaCerts: The PEM encoded CA certificate chains for redis managed server // authentication @@ -3705,6 +4118,838 @@ func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocat } } +type ProjectsLocationsBackupCollectionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Get a backup collection. +// +// - name: Redis backupCollection resource name using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}` where `location_id` refers to a GCP region. +func (r *ProjectsLocationsBackupCollectionsService) Get(name string) *ProjectsLocationsBackupCollectionsGetCall { + c := &ProjectsLocationsBackupCollectionsGetCall{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 +// details. +func (c *ProjectsLocationsBackupCollectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupCollectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupCollectionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "redis.projects.locations.backupCollections.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackupCollection.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 *ProjectsLocationsBackupCollectionsGetCall) Do(opts ...googleapi.CallOption) (*BackupCollection, 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 := &BackupCollection{ + 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 +} + +type ProjectsLocationsBackupCollectionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all backup collections owned by a consumer project in either the +// specified location (region) or all locations. If `location_id` is specified +// as `-` (wildcard), then all regions available to the project are queried, +// and the results are aggregated. +// +// - parent: The resource name of the backupCollection location using the form: +// `projects/{project_id}/locations/{location_id}` where `location_id` refers +// to a GCP region. +func (r *ProjectsLocationsBackupCollectionsService) List(parent string) *ProjectsLocationsBackupCollectionsListCall { + c := &ProjectsLocationsBackupCollectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If not specified, a default value of 1000 will be used by the +// service. Regardless of the page_size value, the response may include a +// partial list and a caller should only rely on response's `next_page_token` +// to determine if there are more clusters left to be queried. +func (c *ProjectsLocationsBackupCollectionsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupCollectionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The `next_page_token` +// value returned from a previous [ListBackupCollections] request, if any. +func (c *ProjectsLocationsBackupCollectionsListCall) PageToken(pageToken string) *ProjectsLocationsBackupCollectionsListCall { + 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 +// details. +func (c *ProjectsLocationsBackupCollectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupCollectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupCollectionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsListCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/backupCollections") + 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 "redis.projects.locations.backupCollections.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupCollectionsResponse.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 *ProjectsLocationsBackupCollectionsListCall) Do(opts ...googleapi.CallOption) (*ListBackupCollectionsResponse, 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 := &ListBackupCollectionsResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupCollectionsListCall) Pages(ctx context.Context, f func(*ListBackupCollectionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsBackupCollectionsBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a specific backup. +// +// - name: Redis backup resource name using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}/backups/{backup_id}`. +func (r *ProjectsLocationsBackupCollectionsBackupsService) Delete(name string) *ProjectsLocationsBackupCollectionsBackupsDeleteCall { + c := &ProjectsLocationsBackupCollectionsBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": Idempotent request UUID. +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsBackupCollectionsBackupsDeleteCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "redis.projects.locations.backupCollections.backups.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsBackupCollectionsBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsBackupCollectionsBackupsExportCall struct { + s *Service + name string + exportbackuprequest *ExportBackupRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports a specific backup to a customer target Cloud Storage URI. +// +// - name: Redis backup resource name using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}/backups/{backup_id}`. +func (r *ProjectsLocationsBackupCollectionsBackupsService) Export(name string, exportbackuprequest *ExportBackupRequest) *ProjectsLocationsBackupCollectionsBackupsExportCall { + c := &ProjectsLocationsBackupCollectionsBackupsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.exportbackuprequest = exportbackuprequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBackupCollectionsBackupsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsBackupsExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsBackupsExportCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsBackupsExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsBackupsExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsBackupsExportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportbackuprequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:export") + 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 "redis.projects.locations.backupCollections.backups.export" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsBackupCollectionsBackupsExportCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + +type ProjectsLocationsBackupCollectionsBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a specific backup. +// +// - name: Redis backup resource name using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}/backups/{backup_id}`. +func (r *ProjectsLocationsBackupCollectionsBackupsService) Get(name string) *ProjectsLocationsBackupCollectionsBackupsGetCall { + c := &ProjectsLocationsBackupCollectionsBackupsGetCall{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 +// details. +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupCollectionsBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+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 "redis.projects.locations.backupCollections.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *Backup.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 *ProjectsLocationsBackupCollectionsBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, 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 := &Backup{ + 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 +} + +type ProjectsLocationsBackupCollectionsBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all backups owned by a backup collection. +// +// - parent: The resource name of the backupCollection using the form: +// `projects/{project_id}/locations/{location_id}/backupCollections/{backup_co +// llection_id}`. +func (r *ProjectsLocationsBackupCollectionsBackupsService) List(parent string) *ProjectsLocationsBackupCollectionsBackupsListCall { + c := &ProjectsLocationsBackupCollectionsBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of items +// to return. If not specified, a default value of 1000 will be used by the +// service. Regardless of the page_size value, the response may include a +// partial list and a caller should only rely on response's `next_page_token` +// to determine if there are more clusters left to be queried. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsBackupCollectionsBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The `next_page_token` +// value returned from a previous [ListBackupCollections] request, if any. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) PageToken(pageToken string) *ProjectsLocationsBackupCollectionsBackupsListCall { + 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 +// details. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBackupCollectionsBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an 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. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBackupCollectionsBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) Context(ctx context.Context) *ProjectsLocationsBackupCollectionsBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsBackupCollectionsBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + 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, "v1beta1/{+parent}/backups") + 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 "redis.projects.locations.backupCollections.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListBackupsResponse.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 *ProjectsLocationsBackupCollectionsBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, 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 := &ListBackupsResponse{ + 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 +} + +// 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 *ProjectsLocationsBackupCollectionsBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + 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) + } +} + +type ProjectsLocationsClustersBackupCall struct { + s *Service + name string + backupclusterrequest *BackupClusterRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Backup: Backup Redis Cluster. If this is the first time a backup is being +// created, a backup collection will be created at the backend, and this backup +// belongs to this collection. Both collection and backup will have a resource +// name. Backup will be executed for each shard. A replica (primary if nonHA) +// will be selected to perform the execution. Backup call will be rejected if +// there is an ongoing backup or update operation. +// +// - name: Redis cluster resource name using the form: +// `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` +// where `location_id` refers to a GCP region. +func (r *ProjectsLocationsClustersService) Backup(name string, backupclusterrequest *BackupClusterRequest) *ProjectsLocationsClustersBackupCall { + c := &ProjectsLocationsClustersBackupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.backupclusterrequest = backupclusterrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsClustersBackupCall) Fields(s ...googleapi.Field) *ProjectsLocationsClustersBackupCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsClustersBackupCall) Context(ctx context.Context) *ProjectsLocationsClustersBackupCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsClustersBackupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsClustersBackupCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backupclusterrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:backup") + 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 "redis.projects.locations.clusters.backup" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.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 *ProjectsLocationsClustersBackupCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{ + 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 +} + type ProjectsLocationsClustersCreateCall struct { s *Service parent string @@ -5785,7 +7030,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json index bce68870a0b..71d7f4a5571 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-api.json @@ -108,7 +108,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "serviceconsumermanagement.operations.cancel", @@ -542,7 +542,7 @@ } } }, - "revision": "20240929", + "revision": "20241115", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "AddTenantProjectRequest": { @@ -1348,6 +1348,10 @@ "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", "id": "ExperimentalFeatures", "properties": { + "protobufPythonicTypesEnabled": { + "description": "Enables generation of protobuf code using new types that are more Pythonic which are included in `protobuf\u003e=5.29.x`. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + }, "restAsyncIoEnabled": { "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", "type": "boolean" @@ -1487,6 +1491,13 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "renamedServices": { + "additionalProperties": { + "type": "string" + }, + "description": "Map of service names to renamed services. Keys are the package relative service names and values are the name to be used for the service client and call options. publishing: go_settings: renamed_services: Publisher: TopicAdmin", + "type": "object" } }, "type": "object" @@ -2427,7 +2438,7 @@ "type": "string" }, "unit": { - "description": "Specify the unit of the quota limit. It uses the same syntax as Metric.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", + "description": "Specify the unit of the quota limit. It uses the same syntax as MetricDescriptor.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", "type": "string" }, "values": { diff --git a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go index a9b331788e8..81f8cf22be5 100644 --- a/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1/serviceconsumermanagement-gen.go @@ -1381,20 +1381,25 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { // library generation. These fields will be deprecated once the feature // graduates and is enabled by default. type ExperimentalFeatures struct { + // ProtobufPythonicTypesEnabled: Enables generation of protobuf code using new + // types that are more Pythonic which are included in `protobuf>=5.29.x`. This + // feature will be enabled by default 1 month after launching the feature in + // preview packages. + ProtobufPythonicTypesEnabled bool `json:"protobufPythonicTypesEnabled,omitempty"` // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if // `rest` transport is enabled. By default, asynchronous REST clients will not // be generated. This feature will be enabled by default 1 month after // launching the feature in preview packages. RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. + // ForceSendFields is a list of field names (e.g. + // "ProtobufPythonicTypesEnabled") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RestAsyncIoEnabled") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "ProtobufPythonicTypesEnabled") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1520,6 +1525,11 @@ func (s FieldPolicy) MarshalJSON() ([]byte, error) { type GoSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // RenamedServices: Map of service names to renamed services. Keys are the + // package relative service names and values are the name to be used for the + // service client and call options. publishing: go_settings: renamed_services: + // Publisher: TopicAdmin + RenamedServices map[string]string `json:"renamedServices,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -3087,10 +3097,10 @@ type QuotaLimit struct { // as well as '-'. The maximum length of the limit name is 64 characters. Name string `json:"name,omitempty"` // Unit: Specify the unit of the quota limit. It uses the same syntax as - // Metric.unit. The supported unit kinds are determined by the quota backend - // system. Here are some examples: * "1/min/{project}" for quota per minute per - // project. Note: the order of unit components is insignificant. The "1" at the - // beginning is required to follow the metric unit syntax. + // MetricDescriptor.unit. The supported unit kinds are determined by the quota + // backend system. Here are some examples: * "1/min/{project}" for quota per + // minute per project. Note: the order of unit components is insignificant. The + // "1" at the beginning is required to follow the metric unit syntax. Unit string `json:"unit,omitempty"` // Values: Tiered limit values. You must specify this as a key:value pair, with // an integer value that is the maximum number of requests allowed for the @@ -4297,7 +4307,7 @@ type OperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json index 6aceb181f52..29662e61011 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-api.json @@ -715,7 +715,7 @@ } } }, - "revision": "20240929", + "revision": "20241115", "rootUrl": "https://serviceconsumermanagement.googleapis.com/", "schemas": { "Api": { @@ -1433,6 +1433,10 @@ "description": "Experimental features to be included during client library generation. These fields will be deprecated once the feature graduates and is enabled by default.", "id": "ExperimentalFeatures", "properties": { + "protobufPythonicTypesEnabled": { + "description": "Enables generation of protobuf code using new types that are more Pythonic which are included in `protobuf\u003e=5.29.x`. This feature will be enabled by default 1 month after launching the feature in preview packages.", + "type": "boolean" + }, "restAsyncIoEnabled": { "description": "Enables generation of asynchronous REST clients if `rest` transport is enabled. By default, asynchronous REST clients will not be generated. This feature will be enabled by default 1 month after launching the feature in preview packages.", "type": "boolean" @@ -1572,6 +1576,13 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "renamedServices": { + "additionalProperties": { + "type": "string" + }, + "description": "Map of service names to renamed services. Keys are the package relative service names and values are the name to be used for the service client and call options. publishing: go_settings: renamed_services: Publisher: TopicAdmin", + "type": "object" } }, "type": "object" @@ -2458,7 +2469,7 @@ "type": "string" }, "unit": { - "description": "Specify the unit of the quota limit. It uses the same syntax as Metric.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", + "description": "Specify the unit of the quota limit. It uses the same syntax as MetricDescriptor.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", "type": "string" }, "values": { @@ -3012,13 +3023,17 @@ "id": "V1Beta1ImportProducerQuotaPoliciesRequest", "properties": { "force": { - "description": "Whether to force the import of the quota policies. If the policy import would decrease the default limit of any consumer tier by more than 10 percent, the call is rejected, as a safety measure to avoid accidentally decreasing quota too quickly. Setting the force parameter to true ignores this restriction.", + "description": "Whether quota policy can result in a decrease of effective limit. Don't allow any decreases if force is not specified. If force is specified, then don't allow any decreases below 120% of the 7d quota usage, or for cases where usage cannot be examined (custom dimensions/ per user/per resource), only allow a 10% decrease.", "type": "boolean" }, "forceJustification": { - "description": "If force option is set to true, force_justification is suggested to be set to log the reason in audit logs.", + "description": "If force or force_skip_quota_usage_check option is set to true, force_justification is suggested to be set to log the reason in audit logs.", "type": "string" }, + "forceSkipQuotaUsageCheck": { + "description": "If set to true, skip the quota usage check. This field is only used when the effective limit can be decreased. If the force field is not set, this field will be ignored.", + "type": "boolean" + }, "inlineSource": { "$ref": "V1Beta1PolicyInlineSource", "description": "The import data is specified in the request message itself" diff --git a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go index 9940dfefb72..0f0b9c7ecef 100644 --- a/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go +++ b/serviceconsumermanagement/v1beta1/serviceconsumermanagement-gen.go @@ -1250,20 +1250,25 @@ func (s EnumValue) MarshalJSON() ([]byte, error) { // library generation. These fields will be deprecated once the feature // graduates and is enabled by default. type ExperimentalFeatures struct { + // ProtobufPythonicTypesEnabled: Enables generation of protobuf code using new + // types that are more Pythonic which are included in `protobuf>=5.29.x`. This + // feature will be enabled by default 1 month after launching the feature in + // preview packages. + ProtobufPythonicTypesEnabled bool `json:"protobufPythonicTypesEnabled,omitempty"` // RestAsyncIoEnabled: Enables generation of asynchronous REST clients if // `rest` transport is enabled. By default, asynchronous REST clients will not // be generated. This feature will be enabled by default 1 month after // launching the feature in preview packages. RestAsyncIoEnabled bool `json:"restAsyncIoEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "RestAsyncIoEnabled") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. + // ForceSendFields is a list of field names (e.g. + // "ProtobufPythonicTypesEnabled") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RestAsyncIoEnabled") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "ProtobufPythonicTypesEnabled") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1389,6 +1394,11 @@ func (s FieldPolicy) MarshalJSON() ([]byte, error) { type GoSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // RenamedServices: Map of service names to renamed services. Keys are the + // package relative service names and values are the name to be used for the + // service client and call options. publishing: go_settings: renamed_services: + // Publisher: TopicAdmin + RenamedServices map[string]string `json:"renamedServices,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -2873,10 +2883,10 @@ type QuotaLimit struct { // as well as '-'. The maximum length of the limit name is 64 characters. Name string `json:"name,omitempty"` // Unit: Specify the unit of the quota limit. It uses the same syntax as - // Metric.unit. The supported unit kinds are determined by the quota backend - // system. Here are some examples: * "1/min/{project}" for quota per minute per - // project. Note: the order of unit components is insignificant. The "1" at the - // beginning is required to follow the metric unit syntax. + // MetricDescriptor.unit. The supported unit kinds are determined by the quota + // backend system. Here are some examples: * "1/min/{project}" for quota per + // minute per project. Note: the order of unit components is insignificant. The + // "1" at the beginning is required to follow the metric unit syntax. Unit string `json:"unit,omitempty"` // Values: Tiered limit values. You must specify this as a key:value pair, with // an integer value that is the maximum number of requests allowed for the @@ -3584,15 +3594,20 @@ func (s V1Beta1ImportProducerOverridesResponse) MarshalJSON() ([]byte, error) { // V1Beta1ImportProducerQuotaPoliciesRequest: Request message for // ImportProducerQuotaPolicies type V1Beta1ImportProducerQuotaPoliciesRequest struct { - // Force: Whether to force the import of the quota policies. If the policy - // import would decrease the default limit of any consumer tier by more than 10 - // percent, the call is rejected, as a safety measure to avoid accidentally - // decreasing quota too quickly. Setting the force parameter to true ignores - // this restriction. + // Force: Whether quota policy can result in a decrease of effective limit. + // Don't allow any decreases if force is not specified. If force is specified, + // then don't allow any decreases below 120% of the 7d quota usage, or for + // cases where usage cannot be examined (custom dimensions/ per user/per + // resource), only allow a 10% decrease. Force bool `json:"force,omitempty"` - // ForceJustification: If force option is set to true, force_justification is - // suggested to be set to log the reason in audit logs. + // ForceJustification: If force or force_skip_quota_usage_check option is set + // to true, force_justification is suggested to be set to log the reason in + // audit logs. ForceJustification string `json:"forceJustification,omitempty"` + // ForceSkipQuotaUsageCheck: If set to true, skip the quota usage check. This + // field is only used when the effective limit can be decreased. If the force + // field is not set, this field will be ignored. + ForceSkipQuotaUsageCheck bool `json:"forceSkipQuotaUsageCheck,omitempty"` // InlineSource: The import data is specified in the request message itself InlineSource *V1Beta1PolicyInlineSource `json:"inlineSource,omitempty"` // ValidateOnly: If set to true, validate the request, but do not actually diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index 0aa64be7433..7c49b5735df 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -2681,7 +2681,7 @@ } } }, - "revision": "20241114", + "revision": "20241119", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -3921,6 +3921,13 @@ "$ref": "Image", "description": "The logo image of the ticket. This image is displayed in the card detail view of the app." }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the class. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -4257,6 +4264,13 @@ }, "type": "array" }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the object. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -4752,6 +4766,13 @@ }, "type": "array" }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the class. Any additional MerchantLocations added beyond the 10 will be rejected by the validator. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -5045,6 +5066,13 @@ }, "type": "array" }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the object. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -5237,6 +5265,13 @@ "$ref": "LinksModuleData", "description": "Links module data. If `linksModuleData` is also defined on the object, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object." }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the class. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -5449,6 +5484,13 @@ "$ref": "Image", "description": "The logo image of the pass. This image is displayed in the card detail view in upper left, and also on the list/thumbnail view. If the logo is not present, the first letter of `cardTitle` would be shown as logo." }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the object. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -5680,6 +5722,13 @@ }, "type": "array" }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the class. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "merchantName": { "description": "Merchant name, such as \"Adam's Apparel\". The app may display an ellipsis after the first 20 characters to ensure full string is displayed on smaller screens.", "type": "string" @@ -5962,6 +6011,13 @@ }, "type": "array" }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the object. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -6544,6 +6600,13 @@ }, "type": "array" }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the class. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -6841,6 +6904,13 @@ "$ref": "LoyaltyPoints", "description": "The loyalty reward points label, balance, and type." }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the object. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -7249,6 +7319,23 @@ }, "type": "object" }, + "MerchantLocation": { + "description": "Locations of interest for this class or object. Currently, this location is used for geofenced notifications. When a user is within a set radius of this lat/long, and dwells there, Google will trigger a notification. When a user exits this radius, the notification will be hidden.", + "id": "MerchantLocation", + "properties": { + "latitude": { + "description": "The latitude specified as any value in the range of -90.0 through +90.0, both inclusive. Values outside these bounds will be rejected.", + "format": "double", + "type": "number" + }, + "longitude": { + "description": "The longitude specified in the range -180.0 through +180.0, both inclusive. Values outside these bounds will be rejected.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, "Message": { "description": "A message that will be displayed with a Valuable", "id": "Message", @@ -7522,6 +7609,13 @@ }, "type": "array" }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the class. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -7828,6 +7922,13 @@ }, "type": "array" }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the object. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -8937,6 +9038,13 @@ "$ref": "Image", "description": "Required. The logo image of the ticket. This image is displayed in the card detail view of the app." }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the class. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { @@ -9288,6 +9396,13 @@ }, "type": "array" }, + "merchantLocations": { + "description": "Merchant locations. There is a maximum of ten on the object. Any additional MerchantLocations added beyond the 10 will be rejected. These locations will trigger a notification when a user enters within a Google-set radius of the point. This field replaces the deprecated LatLongPoints.", + "items": { + "$ref": "MerchantLocation" + }, + "type": "array" + }, "messages": { "description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", "items": { diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index e9aad2e539a..5cc9483eaf2 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -1890,6 +1890,12 @@ type EventTicketClass struct { // Logo: The logo image of the ticket. This image is displayed in the card // detail view of the app. Logo *Image `json:"logo,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // class. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -2181,6 +2187,12 @@ type EventTicketObject struct { // Locations: Note: This field is currently not supported to trigger geo // notifications. Locations []*LatLongPoint `json:"locations,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // object. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -2686,6 +2698,12 @@ type FlightClass struct { // Locations: Note: This field is currently not supported to trigger geo // notifications. Locations []*LatLongPoint `json:"locations,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // class. Any additional MerchantLocations added beyond the 10 will be rejected + // by the validator. These locations will trigger a notification when a user + // enters within a Google-set radius of the point. This field replaces the + // deprecated LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -2970,6 +2988,12 @@ type FlightObject struct { // Locations: Note: This field is currently not supported to trigger geo // notifications. Locations []*LatLongPoint `json:"locations,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // object. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -3171,6 +3195,12 @@ type GenericClass struct { // the object, both will be displayed. The maximum number of these fields // displayed is 10 from class and 10 from object. LinksModuleData *LinksModuleData `json:"linksModuleData,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // class. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -3386,6 +3416,12 @@ type GenericObject struct { // view in upper left, and also on the list/thumbnail view. If the logo is not // present, the first letter of `cardTitle` would be shown as logo. Logo *Image `json:"logo,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // object. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -3604,6 +3640,12 @@ type GiftCardClass struct { // Locations: Note: This field is currently not supported to trigger geo // notifications. Locations []*LatLongPoint `json:"locations,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // class. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // MerchantName: Merchant name, such as "Adam's Apparel". The app may display // an ellipsis after the first 20 characters to ensure full string is displayed // on smaller screens. @@ -3861,6 +3903,12 @@ type GiftCardObject struct { // Locations: Note: This field is currently not supported to trigger geo // notifications. Locations []*LatLongPoint `json:"locations,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // object. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -4585,6 +4633,12 @@ type LoyaltyClass struct { // Locations: Note: This field is currently not supported to trigger geo // notifications. Locations []*LatLongPoint `json:"locations,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // class. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -4858,6 +4912,12 @@ type LoyaltyObject struct { Locations []*LatLongPoint `json:"locations,omitempty"` // LoyaltyPoints: The loyalty reward points label, balance, and type. LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // object. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -5294,6 +5354,52 @@ func (s MediaRequestInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MerchantLocation: Locations of interest for this class or object. Currently, +// this location is used for geofenced notifications. When a user is within a +// set radius of this lat/long, and dwells there, Google will trigger a +// notification. When a user exits this radius, the notification will be +// hidden. +type MerchantLocation struct { + // Latitude: The latitude specified as any value in the range of -90.0 through + // +90.0, both inclusive. Values outside these bounds will be rejected. + Latitude float64 `json:"latitude,omitempty"` + // Longitude: The longitude specified in the range -180.0 through +180.0, both + // inclusive. Values outside these bounds will be rejected. + Longitude float64 `json:"longitude,omitempty"` + // ForceSendFields is a list of field names (e.g. "Latitude") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Latitude") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MerchantLocation) MarshalJSON() ([]byte, error) { + type NoMethod MerchantLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *MerchantLocation) UnmarshalJSON(data []byte) error { + type NoMethod MerchantLocation + var s1 struct { + Latitude gensupport.JSONFloat64 `json:"latitude"` + Longitude gensupport.JSONFloat64 `json:"longitude"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Latitude = float64(s1.Latitude) + s.Longitude = float64(s1.Longitude) + return nil +} + // Message: A message that will be displayed with a Valuable type Message struct { // Body: The message body. @@ -5597,6 +5703,12 @@ type OfferClass struct { // Locations: Note: This field is currently not supported to trigger geo // notifications. Locations []*LatLongPoint `json:"locations,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // class. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -5864,6 +5976,12 @@ type OfferObject struct { // Locations: Note: This field is currently not supported to trigger geo // notifications. Locations []*LatLongPoint `json:"locations,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // object. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -7039,6 +7157,12 @@ type TransitClass struct { // Logo: Required. The logo image of the ticket. This image is displayed in the // card detail view of the app. Logo *Image `json:"logo,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // class. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. @@ -7324,6 +7448,12 @@ type TransitObject struct { // Locations: Note: This field is currently not supported to trigger geo // notifications. Locations []*LatLongPoint `json:"locations,omitempty"` + // MerchantLocations: Merchant locations. There is a maximum of ten on the + // object. Any additional MerchantLocations added beyond the 10 will be + // rejected. These locations will trigger a notification when a user enters + // within a Google-set radius of the point. This field replaces the deprecated + // LatLongPoints. + MerchantLocations []*MerchantLocation `json:"merchantLocations,omitempty"` // Messages: An array of messages displayed in the app. All users of this // object will receive its associated messages. The maximum number of these // fields is 10. diff --git a/webrisk/v1/webrisk-api.json b/webrisk/v1/webrisk-api.json index 127789943a7..e1d508bd9c6 100644 --- a/webrisk/v1/webrisk-api.json +++ b/webrisk/v1/webrisk-api.json @@ -156,7 +156,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "webrisk.projects.operations.cancel", @@ -420,7 +420,7 @@ } } }, - "revision": "20230806", + "revision": "20241117", "rootUrl": "https://webrisk.googleapis.com/", "schemas": { "GoogleCloudWebriskV1ComputeThreatListDiffResponse": { diff --git a/webrisk/v1/webrisk-gen.go b/webrisk/v1/webrisk-gen.go index 2c0134ddc49..0dcb1094cdc 100644 --- a/webrisk/v1/webrisk-gen.go +++ b/webrisk/v1/webrisk-gen.go @@ -872,7 +872,7 @@ type ProjectsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled.