From 4340450c35bcdf87b92397ecab9b6988a28fb3cd Mon Sep 17 00:00:00 2001 From: Alex Hong <9397363+hongalex@users.noreply.github.com> Date: Fri, 5 Dec 2025 12:47:14 -0800 Subject: [PATCH] feat(maintenance): add new clients PiperOrigin-RevId: 840720260 --- .librarian/state.yaml | 16 +- .../MaintenanceClient/GetLocation/main.go | 53 + .../GetResourceMaintenance/main.go | 53 + .../MaintenanceClient/ListLocations/main.go | 66 + .../ListResourceMaintenances/main.go | 66 + .../SummarizeMaintenances/main.go | 66 + ...adata.google.cloud.maintenance.api.v1.json | 245 +++ maintenance/api/apiv1/.repo-metadata.json | 10 + .../api/apiv1/apipb/maintenance_service.pb.go | 1734 +++++++++++++++++ .../apipb/maintenance_service_grpc.pb.go | 202 ++ maintenance/api/apiv1/auxiliary.go | 164 ++ maintenance/api/apiv1/auxiliary_go123.go | 45 + maintenance/api/apiv1/doc.go | 89 + maintenance/api/apiv1/gapic_metadata.json | 73 + maintenance/api/apiv1/helpers.go | 105 + maintenance/api/apiv1/maintenance_client.go | 835 ++++++++ .../maintenance_client_example_go123_test.go | 105 + .../apiv1/maintenance_client_example_test.go | 221 +++ maintenance/api/apiv1/version.go | 23 + 19 files changed, 4168 insertions(+), 3 deletions(-) create mode 100644 internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/GetLocation/main.go create mode 100644 internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/GetResourceMaintenance/main.go create mode 100644 internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/ListLocations/main.go create mode 100644 internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/ListResourceMaintenances/main.go create mode 100644 internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/SummarizeMaintenances/main.go create mode 100644 internal/generated/snippets/maintenance/api/apiv1/snippet_metadata.google.cloud.maintenance.api.v1.json create mode 100644 maintenance/api/apiv1/.repo-metadata.json create mode 100644 maintenance/api/apiv1/apipb/maintenance_service.pb.go create mode 100644 maintenance/api/apiv1/apipb/maintenance_service_grpc.pb.go create mode 100644 maintenance/api/apiv1/auxiliary.go create mode 100644 maintenance/api/apiv1/auxiliary_go123.go create mode 100644 maintenance/api/apiv1/doc.go create mode 100644 maintenance/api/apiv1/gapic_metadata.json create mode 100644 maintenance/api/apiv1/helpers.go create mode 100644 maintenance/api/apiv1/maintenance_client.go create mode 100644 maintenance/api/apiv1/maintenance_client_example_go123_test.go create mode 100644 maintenance/api/apiv1/maintenance_client_example_test.go create mode 100644 maintenance/api/apiv1/version.go diff --git a/.librarian/state.yaml b/.librarian/state.yaml index 2fa7b07b7457..48dda8724634 100644 --- a/.librarian/state.yaml +++ b/.librarian/state.yaml @@ -3328,10 +3328,12 @@ libraries: tag_format: '{id}/v{version}' - id: maintenance version: 0.1.2 - last_generated_commit: c288189b43c016dd3cf1ec73ce3cadee8b732f07 + last_generated_commit: 534adc56f58b36a6a3e4b5b1cb7f9ee25a8e8a25 apis: - path: google/cloud/maintenance/api/v1beta service_config: maintenance_v1beta.yaml + - path: google/cloud/maintenance/api/v1 + service_config: maintenance_v1.yaml source_roots: - maintenance - internal/generated/snippets/maintenance @@ -3348,8 +3350,16 @@ libraries: - ^maintenance/api/apiv1beta/helpers\.go$ - ^maintenance/api/apiv1beta/apipb/.*$ - ^maintenance/api/apiv1beta/\.repo-metadata\.json$ - release_exclude_paths: - - internal/generated/snippets/maintenance/ + - ^maintenance/api/apiv1/[^/]*_client\.go$ + - ^maintenance/api/apiv1/[^/]*_client_example_go123_test\.go$ + - ^maintenance/api/apiv1/[^/]*_client_example_test\.go$ + - ^maintenance/api/apiv1/auxiliary\.go$ + - ^maintenance/api/apiv1/auxiliary_go123\.go$ + - ^maintenance/api/apiv1/doc\.go$ + - ^maintenance/api/apiv1/gapic_metadata\.json$ + - ^maintenance/api/apiv1/helpers\.go$ + - ^maintenance/api/apiv1/\.repo-metadata\.json$ + - ^maintenance/api/apiv1/apipb/.*$ tag_format: '{id}/v{version}' - id: managedidentities version: 1.7.7 diff --git a/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/GetLocation/main.go b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/GetLocation/main.go new file mode 100644 index 000000000000..a2140a7d37f7 --- /dev/null +++ b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/GetLocation/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START maintenance_v1_generated_Maintenance_GetLocation_sync] + +package main + +import ( + "context" + + api "cloud.google.com/go/maintenance/api/apiv1" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END maintenance_v1_generated_Maintenance_GetLocation_sync] diff --git a/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/GetResourceMaintenance/main.go b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/GetResourceMaintenance/main.go new file mode 100644 index 000000000000..d74fcd9ceeac --- /dev/null +++ b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/GetResourceMaintenance/main.go @@ -0,0 +1,53 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START maintenance_v1_generated_Maintenance_GetResourceMaintenance_sync] + +package main + +import ( + "context" + + api "cloud.google.com/go/maintenance/api/apiv1" + apipb "cloud.google.com/go/maintenance/api/apiv1/apipb" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apipb.GetResourceMaintenanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/maintenance/api/apiv1/apipb#GetResourceMaintenanceRequest. + } + resp, err := c.GetResourceMaintenance(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END maintenance_v1_generated_Maintenance_GetResourceMaintenance_sync] diff --git a/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/ListLocations/main.go b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/ListLocations/main.go new file mode 100644 index 000000000000..36199e7a429e --- /dev/null +++ b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/ListLocations/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START maintenance_v1_generated_Maintenance_ListLocations_sync] + +package main + +import ( + "context" + + api "cloud.google.com/go/maintenance/api/apiv1" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} + +// [END maintenance_v1_generated_Maintenance_ListLocations_sync] diff --git a/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/ListResourceMaintenances/main.go b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/ListResourceMaintenances/main.go new file mode 100644 index 000000000000..ef8d7e5beee2 --- /dev/null +++ b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/ListResourceMaintenances/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START maintenance_v1_generated_Maintenance_ListResourceMaintenances_sync] + +package main + +import ( + "context" + + api "cloud.google.com/go/maintenance/api/apiv1" + apipb "cloud.google.com/go/maintenance/api/apiv1/apipb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apipb.ListResourceMaintenancesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/maintenance/api/apiv1/apipb#ListResourceMaintenancesRequest. + } + it := c.ListResourceMaintenances(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*apipb.ListResourceMaintenancesResponse) + } +} + +// [END maintenance_v1_generated_Maintenance_ListResourceMaintenances_sync] diff --git a/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/SummarizeMaintenances/main.go b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/SummarizeMaintenances/main.go new file mode 100644 index 000000000000..955d73028476 --- /dev/null +++ b/internal/generated/snippets/maintenance/api/apiv1/MaintenanceClient/SummarizeMaintenances/main.go @@ -0,0 +1,66 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// [START maintenance_v1_generated_Maintenance_SummarizeMaintenances_sync] + +package main + +import ( + "context" + + api "cloud.google.com/go/maintenance/api/apiv1" + apipb "cloud.google.com/go/maintenance/api/apiv1/apipb" + "google.golang.org/api/iterator" +) + +func main() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apipb.SummarizeMaintenancesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/maintenance/api/apiv1/apipb#SummarizeMaintenancesRequest. + } + it := c.SummarizeMaintenances(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*apipb.SummarizeMaintenancesResponse) + } +} + +// [END maintenance_v1_generated_Maintenance_SummarizeMaintenances_sync] diff --git a/internal/generated/snippets/maintenance/api/apiv1/snippet_metadata.google.cloud.maintenance.api.v1.json b/internal/generated/snippets/maintenance/api/apiv1/snippet_metadata.google.cloud.maintenance.api.v1.json new file mode 100644 index 000000000000..94ea8b647dc6 --- /dev/null +++ b/internal/generated/snippets/maintenance/api/apiv1/snippet_metadata.google.cloud.maintenance.api.v1.json @@ -0,0 +1,245 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/maintenance/api/apiv1", + "version": "0.1.2", + "language": "GO", + "apis": [ + { + "id": "google.cloud.maintenance.api.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "maintenance_v1_generated_Maintenance_GetLocation_sync", + "title": "maintenance GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "MaintenanceClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "MaintenanceClient", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient" + }, + "method": { + "shortName": "GetLocation", + "fullName": "google.cloud.location.Locations.GetLocation", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "maintenance_v1_generated_Maintenance_GetResourceMaintenance_sync", + "title": "maintenance GetResourceMaintenance Sample", + "description": "GetResourceMaintenance retrieve a single resource maintenance.", + "file": "MaintenanceClient/GetResourceMaintenance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetResourceMaintenance", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient.GetResourceMaintenance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "apipb.GetResourceMaintenanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*apipb.ResourceMaintenance", + "client": { + "shortName": "MaintenanceClient", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient" + }, + "method": { + "shortName": "GetResourceMaintenance", + "fullName": "google.cloud.maintenance.api.v1.Maintenance.GetResourceMaintenance", + "service": { + "shortName": "Maintenance", + "fullName": "google.cloud.maintenance.api.v1.Maintenance" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "maintenance_v1_generated_Maintenance_ListLocations_sync", + "title": "maintenance ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "MaintenanceClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "MaintenanceClient", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "maintenance_v1_generated_Maintenance_ListResourceMaintenances_sync", + "title": "maintenance ListResourceMaintenances Sample", + "description": "ListResourceMaintenances retrieve a collection of resource maintenances.", + "file": "MaintenanceClient/ListResourceMaintenances/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListResourceMaintenances", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient.ListResourceMaintenances", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "apipb.ListResourceMaintenancesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ResourceMaintenanceIterator", + "client": { + "shortName": "MaintenanceClient", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient" + }, + "method": { + "shortName": "ListResourceMaintenances", + "fullName": "google.cloud.maintenance.api.v1.Maintenance.ListResourceMaintenances", + "service": { + "shortName": "Maintenance", + "fullName": "google.cloud.maintenance.api.v1.Maintenance" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + }, + { + "regionTag": "maintenance_v1_generated_Maintenance_SummarizeMaintenances_sync", + "title": "maintenance SummarizeMaintenances Sample", + "description": "SummarizeMaintenances retrieves the statistics of a specific maintenance.", + "file": "MaintenanceClient/SummarizeMaintenances/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SummarizeMaintenances", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient.SummarizeMaintenances", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "apipb.SummarizeMaintenancesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "MaintenanceSummaryIterator", + "client": { + "shortName": "MaintenanceClient", + "fullName": "google.cloud.maintenance.api.v1.MaintenanceClient" + }, + "method": { + "shortName": "SummarizeMaintenances", + "fullName": "google.cloud.maintenance.api.v1.Maintenance.SummarizeMaintenances", + "service": { + "shortName": "Maintenance", + "fullName": "google.cloud.maintenance.api.v1.Maintenance" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 66, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/maintenance/api/apiv1/.repo-metadata.json b/maintenance/api/apiv1/.repo-metadata.json new file mode 100644 index 000000000000..dfb702a73762 --- /dev/null +++ b/maintenance/api/apiv1/.repo-metadata.json @@ -0,0 +1,10 @@ +{ + "api_shortname": "maintenance", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maintenance/latest/api/apiv1", + "client_library_type": "generated", + "description": "Maintenance API", + "distribution_name": "cloud.google.com/go/maintenance/api/apiv1", + "language": "go", + "library_type": "GAPIC_AUTO", + "release_level": "preview" +} diff --git a/maintenance/api/apiv1/apipb/maintenance_service.pb.go b/maintenance/api/apiv1/apipb/maintenance_service.pb.go new file mode 100644 index 000000000000..5ef295a222c2 --- /dev/null +++ b/maintenance/api/apiv1/apipb/maintenance_service.pb.go @@ -0,0 +1,1734 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.7 +// source: google/cloud/maintenance/api/v1/maintenance_service.proto + +package apipb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// The Category of the maintenance. +type MaintenanceCategory int32 + +const ( + // Unspecified category. + MaintenanceCategory_MAINTENANCE_CATEGORY_UNSPECIFIED MaintenanceCategory = 0 + // Infrastructure maintenance events are times that Google Cloud performs + // regular maintenance on network equipment e.g. Google Cloud Interconnect + // These events are usually scheduled in advance and we provide + // notification, when possible, so that users can plan for the + // infrastructure maintenance event and prevent downtime. Infrastructure + // maintenance events don't have a set interval between occurrences, but + // generally occur several times a year. + MaintenanceCategory_INFRASTRUCTURE MaintenanceCategory = 1 + // Updates that can include bug fixes, changes, or new features that are + // backward compatible with existing versions (including patches). + // Some SPs allow users to control the scheduling of these maintenance + // events using maintenance windows and/or deny maintenance features. + MaintenanceCategory_SERVICE_UPDATE MaintenanceCategory = 3 +) + +// Enum value maps for MaintenanceCategory. +var ( + MaintenanceCategory_name = map[int32]string{ + 0: "MAINTENANCE_CATEGORY_UNSPECIFIED", + 1: "INFRASTRUCTURE", + 3: "SERVICE_UPDATE", + } + MaintenanceCategory_value = map[string]int32{ + "MAINTENANCE_CATEGORY_UNSPECIFIED": 0, + "INFRASTRUCTURE": 1, + "SERVICE_UPDATE": 3, + } +) + +func (x MaintenanceCategory) Enum() *MaintenanceCategory { + p := new(MaintenanceCategory) + *p = x + return p +} + +func (x MaintenanceCategory) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MaintenanceCategory) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_enumTypes[0].Descriptor() +} + +func (MaintenanceCategory) Type() protoreflect.EnumType { + return &file_google_cloud_maintenance_api_v1_maintenance_service_proto_enumTypes[0] +} + +func (x MaintenanceCategory) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MaintenanceCategory.Descriptor instead. +func (MaintenanceCategory) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{0} +} + +// State is the state of a resource maintenance. +type ResourceMaintenance_State int32 + +const ( + // Unspecified state. + ResourceMaintenance_STATE_UNSPECIFIED ResourceMaintenance_State = 0 + // Scheduled for a particular window. For disruptive maintenance it should + // respect maintenance policy, i.e. its available windows, exclusions and + // notification period. + ResourceMaintenance_SCHEDULED ResourceMaintenance_State = 1 + // Maintenance is ongoing. + ResourceMaintenance_RUNNING ResourceMaintenance_State = 2 + // No longer planned, typically when other maintenance (e.g. upgrade to + // newer version) already happened, or the user skipped the maintenance. + ResourceMaintenance_CANCELLED ResourceMaintenance_State = 3 + // Successfully completed. + ResourceMaintenance_SUCCEEDED ResourceMaintenance_State = 4 +) + +// Enum value maps for ResourceMaintenance_State. +var ( + ResourceMaintenance_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "SCHEDULED", + 2: "RUNNING", + 3: "CANCELLED", + 4: "SUCCEEDED", + } + ResourceMaintenance_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "RUNNING": 2, + "CANCELLED": 3, + "SUCCEEDED": 4, + } +) + +func (x ResourceMaintenance_State) Enum() *ResourceMaintenance_State { + p := new(ResourceMaintenance_State) + *p = x + return p +} + +func (x ResourceMaintenance_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ResourceMaintenance_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_enumTypes[1].Descriptor() +} + +func (ResourceMaintenance_State) Type() protoreflect.EnumType { + return &file_google_cloud_maintenance_api_v1_maintenance_service_proto_enumTypes[1] +} + +func (x ResourceMaintenance_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ResourceMaintenance_State.Descriptor instead. +func (ResourceMaintenance_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{3, 0} +} + +// Sets the type of control supported. comment (as in logs). +type MaintenanceControl_Control int32 + +const ( + // Unspecified control. + MaintenanceControl_CONTROL_UNSPECIFIED MaintenanceControl_Control = 0 + // Apply control. + MaintenanceControl_APPLY MaintenanceControl_Control = 1 + // Manage policy control. + MaintenanceControl_MANAGE_POLICY MaintenanceControl_Control = 2 + // Reschedule control. + MaintenanceControl_RESCHEDULE MaintenanceControl_Control = 3 +) + +// Enum value maps for MaintenanceControl_Control. +var ( + MaintenanceControl_Control_name = map[int32]string{ + 0: "CONTROL_UNSPECIFIED", + 1: "APPLY", + 2: "MANAGE_POLICY", + 3: "RESCHEDULE", + } + MaintenanceControl_Control_value = map[string]int32{ + "CONTROL_UNSPECIFIED": 0, + "APPLY": 1, + "MANAGE_POLICY": 2, + "RESCHEDULE": 3, + } +) + +func (x MaintenanceControl_Control) Enum() *MaintenanceControl_Control { + p := new(MaintenanceControl_Control) + *p = x + return p +} + +func (x MaintenanceControl_Control) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MaintenanceControl_Control) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_enumTypes[2].Descriptor() +} + +func (MaintenanceControl_Control) Type() protoreflect.EnumType { + return &file_google_cloud_maintenance_api_v1_maintenance_service_proto_enumTypes[2] +} + +func (x MaintenanceControl_Control) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MaintenanceControl_Control.Descriptor instead. +func (MaintenanceControl_Control) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{4, 0} +} + +// Request message for SummarizeMaintenances custom method. +type SummarizeMaintenancesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent of the resource maintenance. + // eg. `projects/123/locations/*` + Parent string `protobuf:"bytes,10006,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resource maintenances to send per page. The default + // page size is 20 and the maximum is 1000. + PageSize int32 `protobuf:"varint,10505,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The page token: If the next_page_token from a previous response + // is provided, this request will send the subsequent page. + PageToken string `protobuf:"bytes,10506,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Filter the list as specified in https://google.aip.dev/160. + // Supported fields include: + // - `state` + // - `resource.location` + // - `resource.resourceName` + // - `resource.type` + // - `maintenance.maintenanceName` + // - `maintenanceStartTime` + // - `maintenanceCompleteTime` + // Examples: + // - `state="SCHEDULED"` + // - `resource.location="us-central1-c"` + // - `resource.resourceName=~"*/instance-20241212-211259"` + // - `maintenanceStartTime>"2000-10-11T20:44:51Z"` + // - `state="SCHEDULED" OR resource.type="compute.googleapis.com/Instance"` + // - `maintenance.maitenanceName="eb3b709c-9ca1-5472-9fb6-800a3849eda1" AND + // maintenanceCompleteTime>"2000-10-11T20:44:51Z"` + Filter string `protobuf:"bytes,10507,opt,name=filter,proto3" json:"filter,omitempty"` + // Order results as specified in https://google.aip.dev/132. + OrderBy string `protobuf:"bytes,10508,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *SummarizeMaintenancesRequest) Reset() { + *x = SummarizeMaintenancesRequest{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SummarizeMaintenancesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SummarizeMaintenancesRequest) ProtoMessage() {} + +func (x *SummarizeMaintenancesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SummarizeMaintenancesRequest.ProtoReflect.Descriptor instead. +func (*SummarizeMaintenancesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{0} +} + +func (x *SummarizeMaintenancesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *SummarizeMaintenancesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *SummarizeMaintenancesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *SummarizeMaintenancesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *SummarizeMaintenancesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// Request message for SummarizeMaintenances custom method. +type SummarizeMaintenancesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resulting summaries. + Maintenances []*MaintenanceSummary `protobuf:"bytes,10509,rep,name=maintenances,proto3" json:"maintenances,omitempty"` + // If present, the next page token can be provided to a subsequent + // SummarizeMaintenances call to list the next page. + // If empty, there are no more pages. + NextPageToken string `protobuf:"bytes,10510,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Unordered list. Locations that could not be reached. + Unreachable []string `protobuf:"bytes,10511,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *SummarizeMaintenancesResponse) Reset() { + *x = SummarizeMaintenancesResponse{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SummarizeMaintenancesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SummarizeMaintenancesResponse) ProtoMessage() {} + +func (x *SummarizeMaintenancesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SummarizeMaintenancesResponse.ProtoReflect.Descriptor instead. +func (*SummarizeMaintenancesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{1} +} + +func (x *SummarizeMaintenancesResponse) GetMaintenances() []*MaintenanceSummary { + if x != nil { + return x.Maintenances + } + return nil +} + +func (x *SummarizeMaintenancesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *SummarizeMaintenancesResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// MaintenanceSummary contains maintenance statistics calculated based on +// ResourceMaintenances within the scope: project and location. +type MaintenanceSummary struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The name of the maintenance. + MaintenanceName string `protobuf:"bytes,1,opt,name=maintenance_name,json=maintenanceName,proto3" json:"maintenance_name,omitempty"` + // Output only. The title of the maintenance. + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // Output only. The description of the maintenance. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Output only. The category of the maintenance event. + Category MaintenanceCategory `protobuf:"varint,13,opt,name=category,proto3,enum=google.cloud.maintenance.api.v1.MaintenanceCategory" json:"category,omitempty"` + // Output only. Scheduled start time of the maintenance. The maintenance will + // start at `maintenanceScheduledStartTime` or later, with best effort to + // finish before `maintenanceScheduledEndTime`. + MaintenanceScheduledStartTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=maintenance_scheduled_start_time,json=maintenanceScheduledStartTime,proto3" json:"maintenance_scheduled_start_time,omitempty"` + // Output only. An estimated (best effort, not guaranteed) end time of the + // scheduled maintenance. + MaintenanceScheduledEndTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=maintenance_scheduled_end_time,json=maintenanceScheduledEndTime,proto3" json:"maintenance_scheduled_end_time,omitempty"` + // Output only. Actual date when the maintenance started. Field present only + // after the state changed to `RUNNING`. + MaintenanceStartTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=maintenance_start_time,json=maintenanceStartTime,proto3" json:"maintenance_start_time,omitempty"` + // Output only. Actual date when the maintenance successfully completed. Field + // present only after the state changed to `SUCCEEDED`. + MaintenanceEndTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=maintenance_end_time,json=maintenanceEndTime,proto3" json:"maintenance_end_time,omitempty"` + // Output only. Indicates whether the user has some control over that + // maintenance, either proactively before maintenance was scheduled with + // maintenance policy or with reactive controls after it was scheduled (see + // controls field). + UserControllable bool `protobuf:"varint,10,opt,name=user_controllable,json=userControllable,proto3" json:"user_controllable,omitempty"` + // Output only. Control available for that Maintenance (might not be available + // for every resource that maintenance is applied to). + Controls []*MaintenanceControl `protobuf:"bytes,14,rep,name=controls,proto3" json:"controls,omitempty"` + // Output only. Stats is a field of ResourceMaintenance used to aggregate the + // stats. + Stats []*MaintenanceSummary_Stats `protobuf:"bytes,12,rep,name=stats,proto3" json:"stats,omitempty"` +} + +func (x *MaintenanceSummary) Reset() { + *x = MaintenanceSummary{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MaintenanceSummary) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MaintenanceSummary) ProtoMessage() {} + +func (x *MaintenanceSummary) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MaintenanceSummary.ProtoReflect.Descriptor instead. +func (*MaintenanceSummary) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{2} +} + +func (x *MaintenanceSummary) GetMaintenanceName() string { + if x != nil { + return x.MaintenanceName + } + return "" +} + +func (x *MaintenanceSummary) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *MaintenanceSummary) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MaintenanceSummary) GetCategory() MaintenanceCategory { + if x != nil { + return x.Category + } + return MaintenanceCategory_MAINTENANCE_CATEGORY_UNSPECIFIED +} + +func (x *MaintenanceSummary) GetMaintenanceScheduledStartTime() *timestamppb.Timestamp { + if x != nil { + return x.MaintenanceScheduledStartTime + } + return nil +} + +func (x *MaintenanceSummary) GetMaintenanceScheduledEndTime() *timestamppb.Timestamp { + if x != nil { + return x.MaintenanceScheduledEndTime + } + return nil +} + +func (x *MaintenanceSummary) GetMaintenanceStartTime() *timestamppb.Timestamp { + if x != nil { + return x.MaintenanceStartTime + } + return nil +} + +func (x *MaintenanceSummary) GetMaintenanceEndTime() *timestamppb.Timestamp { + if x != nil { + return x.MaintenanceEndTime + } + return nil +} + +func (x *MaintenanceSummary) GetUserControllable() bool { + if x != nil { + return x.UserControllable + } + return false +} + +func (x *MaintenanceSummary) GetControls() []*MaintenanceControl { + if x != nil { + return x.Controls + } + return nil +} + +func (x *MaintenanceSummary) GetStats() []*MaintenanceSummary_Stats { + if x != nil { + return x.Stats + } + return nil +} + +// ResourceMaintenance is a resource that represents a maintenance operation +// on a resource. +type ResourceMaintenance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifier. The name of the resource_maintenance resource. + // Format: + // `"projects/{project}/locations/{location}/resourceMaintenance/{resource-maintenance-id}"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Output only. The resource spec of the resource maintenance. + Resource *ResourceMaintenance_Resource `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"` + // Output only. The details of the maintenance. + Maintenance *ResourceMaintenance_Maintenance `protobuf:"bytes,3,opt,name=maintenance,proto3" json:"maintenance,omitempty"` + // Output only. The state of the resource maintenance. + State ResourceMaintenance_State `protobuf:"varint,4,opt,name=state,proto3,enum=google.cloud.maintenance.api.v1.ResourceMaintenance_State" json:"state,omitempty"` + // Output only. The create time of the resource maintenance. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. The update time of the resource maintenance. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Output only. The time when the resource maintenance has started. + MaintenanceStartTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=maintenance_start_time,json=maintenanceStartTime,proto3" json:"maintenance_start_time,omitempty"` + // Output only. The time when the resource maintenance has completed. + MaintenanceEndTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=maintenance_end_time,json=maintenanceEndTime,proto3" json:"maintenance_end_time,omitempty"` + // Output only. The time when the resource maintenance was cancelled. + MaintenanceCancelTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=maintenance_cancel_time,json=maintenanceCancelTime,proto3" json:"maintenance_cancel_time,omitempty"` + // Output only. The time when the maintenance on the resource was scheduled to + // start. + MaintenanceScheduledStartTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=maintenance_scheduled_start_time,json=maintenanceScheduledStartTime,proto3" json:"maintenance_scheduled_start_time,omitempty"` + // Output only. The time when the maintenance on the resource was scheduled to + // end. + MaintenanceScheduledEndTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=maintenance_scheduled_end_time,json=maintenanceScheduledEndTime,proto3" json:"maintenance_scheduled_end_time,omitempty"` + // Output only. Indicates whether the user has some control over that + // maintenance, either proactively before maintenance was scheduled with + // maintenance policy or with reactive controls after it was scheduled (see + // controls field) + UserControllable bool `protobuf:"varint,12,opt,name=user_controllable,json=userControllable,proto3" json:"user_controllable,omitempty"` + // Output only. The controls of the maintenance. + Controls []*MaintenanceControl `protobuf:"bytes,13,rep,name=controls,proto3" json:"controls,omitempty"` + // Optional. The labels on the resource, which can be used for categorization. + // similar to Kubernetes resource labels. + Labels map[string]string `protobuf:"bytes,10401,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional. Annotations is an unstructured key-value map stored with a + // resource that may be set by external tools to store and retrieve arbitrary + // metadata. They are not queryable and should be preserved when modifying + // objects. + // + // More info: https://kubernetes.io/docs/user-guide/annotations + Annotations map[string]string `protobuf:"bytes,10402,rep,name=annotations,proto3" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Output only. The unique identifier of the resource. UID is unique in the + // time and space for this resource within the scope of the service. It is + // typically generated by the server on successful creation of a resource + // and must not be changed. UID is used to uniquely identify resources + // with resource name reuses. This should be a UUID4. + Uid string `protobuf:"bytes,10201,opt,name=uid,proto3" json:"uid,omitempty"` + // Output only. An opaque value that uniquely identifies a version or + // generation of a resource. It can be used to confirm that the client + // and server agree on the ordering of a resource being written. + Etag string `protobuf:"bytes,10202,opt,name=etag,proto3" json:"etag,omitempty"` +} + +func (x *ResourceMaintenance) Reset() { + *x = ResourceMaintenance{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceMaintenance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceMaintenance) ProtoMessage() {} + +func (x *ResourceMaintenance) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceMaintenance.ProtoReflect.Descriptor instead. +func (*ResourceMaintenance) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{3} +} + +func (x *ResourceMaintenance) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ResourceMaintenance) GetResource() *ResourceMaintenance_Resource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *ResourceMaintenance) GetMaintenance() *ResourceMaintenance_Maintenance { + if x != nil { + return x.Maintenance + } + return nil +} + +func (x *ResourceMaintenance) GetState() ResourceMaintenance_State { + if x != nil { + return x.State + } + return ResourceMaintenance_STATE_UNSPECIFIED +} + +func (x *ResourceMaintenance) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *ResourceMaintenance) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *ResourceMaintenance) GetMaintenanceStartTime() *timestamppb.Timestamp { + if x != nil { + return x.MaintenanceStartTime + } + return nil +} + +func (x *ResourceMaintenance) GetMaintenanceEndTime() *timestamppb.Timestamp { + if x != nil { + return x.MaintenanceEndTime + } + return nil +} + +func (x *ResourceMaintenance) GetMaintenanceCancelTime() *timestamppb.Timestamp { + if x != nil { + return x.MaintenanceCancelTime + } + return nil +} + +func (x *ResourceMaintenance) GetMaintenanceScheduledStartTime() *timestamppb.Timestamp { + if x != nil { + return x.MaintenanceScheduledStartTime + } + return nil +} + +func (x *ResourceMaintenance) GetMaintenanceScheduledEndTime() *timestamppb.Timestamp { + if x != nil { + return x.MaintenanceScheduledEndTime + } + return nil +} + +func (x *ResourceMaintenance) GetUserControllable() bool { + if x != nil { + return x.UserControllable + } + return false +} + +func (x *ResourceMaintenance) GetControls() []*MaintenanceControl { + if x != nil { + return x.Controls + } + return nil +} + +func (x *ResourceMaintenance) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +func (x *ResourceMaintenance) GetAnnotations() map[string]string { + if x != nil { + return x.Annotations + } + return nil +} + +func (x *ResourceMaintenance) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *ResourceMaintenance) GetEtag() string { + if x != nil { + return x.Etag + } + return "" +} + +// The control of the maintenance. +type MaintenanceControl struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The control of the resource maintenance. + Control MaintenanceControl_Control `protobuf:"varint,1,opt,name=control,proto3,enum=google.cloud.maintenance.api.v1.MaintenanceControl_Control" json:"control,omitempty"` + // Indicates whether the control is available only in Service Producer API + // (not through Unified Maintenance). + IsCustom bool `protobuf:"varint,2,opt,name=is_custom,json=isCustom,proto3" json:"is_custom,omitempty"` + // Link to Service Producer documentation about maintenance control. Provided + // only when `isCustom` is `true`. + Documentation string `protobuf:"bytes,3,opt,name=documentation,proto3" json:"documentation,omitempty"` +} + +func (x *MaintenanceControl) Reset() { + *x = MaintenanceControl{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MaintenanceControl) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MaintenanceControl) ProtoMessage() {} + +func (x *MaintenanceControl) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MaintenanceControl.ProtoReflect.Descriptor instead. +func (*MaintenanceControl) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{4} +} + +func (x *MaintenanceControl) GetControl() MaintenanceControl_Control { + if x != nil { + return x.Control + } + return MaintenanceControl_CONTROL_UNSPECIFIED +} + +func (x *MaintenanceControl) GetIsCustom() bool { + if x != nil { + return x.IsCustom + } + return false +} + +func (x *MaintenanceControl) GetDocumentation() string { + if x != nil { + return x.Documentation + } + return "" +} + +// The request structure for the ListResourceMaintenances method. +type ListResourceMaintenancesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The parent of the resource maintenance. + Parent string `protobuf:"bytes,10006,opt,name=parent,proto3" json:"parent,omitempty"` + // The maximum number of resource maintenances to send per page. + PageSize int32 `protobuf:"varint,10505,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // The page token: If the next_page_token from a previous response + // is provided, this request will send the subsequent page. + PageToken string `protobuf:"bytes,10506,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Filter the list as specified in https://google.aip.dev/160. + Filter string `protobuf:"bytes,10507,opt,name=filter,proto3" json:"filter,omitempty"` + // Order results as specified in https://google.aip.dev/132. + OrderBy string `protobuf:"bytes,10508,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` +} + +func (x *ListResourceMaintenancesRequest) Reset() { + *x = ListResourceMaintenancesRequest{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListResourceMaintenancesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResourceMaintenancesRequest) ProtoMessage() {} + +func (x *ListResourceMaintenancesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResourceMaintenancesRequest.ProtoReflect.Descriptor instead. +func (*ListResourceMaintenancesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{5} +} + +func (x *ListResourceMaintenancesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListResourceMaintenancesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListResourceMaintenancesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListResourceMaintenancesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +func (x *ListResourceMaintenancesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +// The response structure for the ListResourceMaintenances method. +type ListResourceMaintenancesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The resulting resource maintenances. + ResourceMaintenances []*ResourceMaintenance `protobuf:"bytes,10509,rep,name=resource_maintenances,json=resourceMaintenances,proto3" json:"resource_maintenances,omitempty"` + // If present, the next page token can be provided to a subsequent + // ListResourceMaintenances call to list the next page. + // If empty, there are no more pages. + NextPageToken string `protobuf:"bytes,10510,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. + Unreachable []string `protobuf:"bytes,10511,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListResourceMaintenancesResponse) Reset() { + *x = ListResourceMaintenancesResponse{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListResourceMaintenancesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListResourceMaintenancesResponse) ProtoMessage() {} + +func (x *ListResourceMaintenancesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListResourceMaintenancesResponse.ProtoReflect.Descriptor instead. +func (*ListResourceMaintenancesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{6} +} + +func (x *ListResourceMaintenancesResponse) GetResourceMaintenances() []*ResourceMaintenance { + if x != nil { + return x.ResourceMaintenances + } + return nil +} + +func (x *ListResourceMaintenancesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListResourceMaintenancesResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// The request structure for the GetResourceMaintenance method. +type GetResourceMaintenanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The resource name of the resource within a service. + Name string `protobuf:"bytes,10001,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetResourceMaintenanceRequest) Reset() { + *x = GetResourceMaintenanceRequest{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetResourceMaintenanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetResourceMaintenanceRequest) ProtoMessage() {} + +func (x *GetResourceMaintenanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetResourceMaintenanceRequest.ProtoReflect.Descriptor instead. +func (*GetResourceMaintenanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{7} +} + +func (x *GetResourceMaintenanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Stats indicates the type of aggregate and the corresponding aggregates. +type MaintenanceSummary_Stats struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // groupBy specifies the type of aggregate. + // For example a group_by might be `"state"` + GroupBy string `protobuf:"bytes,1,opt,name=group_by,json=groupBy,proto3" json:"group_by,omitempty"` + // Aggregates is a list pairs. For example, if the + // group_by is `"state"` a possible tuple in the aggregates list could be + // "SCHEDULED" : `11`, + Aggregates []*MaintenanceSummary_Aggregate `protobuf:"bytes,2,rep,name=aggregates,proto3" json:"aggregates,omitempty"` +} + +func (x *MaintenanceSummary_Stats) Reset() { + *x = MaintenanceSummary_Stats{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MaintenanceSummary_Stats) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MaintenanceSummary_Stats) ProtoMessage() {} + +func (x *MaintenanceSummary_Stats) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MaintenanceSummary_Stats.ProtoReflect.Descriptor instead. +func (*MaintenanceSummary_Stats) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{2, 0} +} + +func (x *MaintenanceSummary_Stats) GetGroupBy() string { + if x != nil { + return x.GroupBy + } + return "" +} + +func (x *MaintenanceSummary_Stats) GetAggregates() []*MaintenanceSummary_Aggregate { + if x != nil { + return x.Aggregates + } + return nil +} + +// Aggregate is a pair. +type MaintenanceSummary_Aggregate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies what specific value of the group_by the count represents. For + // example if group_by is `"state"` its corresponding group could be + // `"SCHEDULED"`. + Group string `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + // The count of the group. + Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` +} + +func (x *MaintenanceSummary_Aggregate) Reset() { + *x = MaintenanceSummary_Aggregate{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MaintenanceSummary_Aggregate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MaintenanceSummary_Aggregate) ProtoMessage() {} + +func (x *MaintenanceSummary_Aggregate) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MaintenanceSummary_Aggregate.ProtoReflect.Descriptor instead. +func (*MaintenanceSummary_Aggregate) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{2, 1} +} + +func (x *MaintenanceSummary_Aggregate) GetGroup() string { + if x != nil { + return x.Group + } + return "" +} + +func (x *MaintenanceSummary_Aggregate) GetCount() int64 { + if x != nil { + return x.Count + } + return 0 +} + +// Resource contains information about the resource affected by maintenance. +type ResourceMaintenance_Resource struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. Name is the reference to the consumer resource affected by + // the maintenance. Available values can be found here: + // https://cloud.google.com/asset-inventory/docs/asset-names + ResourceName string `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"` + // Output only. The location of the resource. + // Format: + // `us-central1` + Location string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"` + // Output only. The type of the resource. + // Available values can be found here: + // https://cloud.google.com/asset-inventory/docs/asset-types#supported_resource_types + // Please note that not all the resource types will have their maintenances + // reported. + Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` +} + +func (x *ResourceMaintenance_Resource) Reset() { + *x = ResourceMaintenance_Resource{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceMaintenance_Resource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceMaintenance_Resource) ProtoMessage() {} + +func (x *ResourceMaintenance_Resource) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceMaintenance_Resource.ProtoReflect.Descriptor instead. +func (*ResourceMaintenance_Resource) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *ResourceMaintenance_Resource) GetResourceName() string { + if x != nil { + return x.ResourceName + } + return "" +} + +func (x *ResourceMaintenance_Resource) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +func (x *ResourceMaintenance_Resource) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +// Maintenance is the maintenance details of a resource's maintenance. +type ResourceMaintenance_Maintenance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Maintenance is the name of the corresponding maintenance resource + // following the standard naming scheme: `"{maintenance-id}"` + MaintenanceName string `protobuf:"bytes,1,opt,name=maintenance_name,json=maintenanceName,proto3" json:"maintenance_name,omitempty"` + // Output only. The title of the maintenance. + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // Output only. The description of the maintenance. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Output only. The category of the maintenance. + Category MaintenanceCategory `protobuf:"varint,4,opt,name=category,proto3,enum=google.cloud.maintenance.api.v1.MaintenanceCategory" json:"category,omitempty"` +} + +func (x *ResourceMaintenance_Maintenance) Reset() { + *x = ResourceMaintenance_Maintenance{} + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourceMaintenance_Maintenance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourceMaintenance_Maintenance) ProtoMessage() {} + +func (x *ResourceMaintenance_Maintenance) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourceMaintenance_Maintenance.ProtoReflect.Descriptor instead. +func (*ResourceMaintenance_Maintenance) Descriptor() ([]byte, []int) { + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *ResourceMaintenance_Maintenance) GetMaintenanceName() string { + if x != nil { + return x.MaintenanceName + } + return "" +} + +func (x *ResourceMaintenance_Maintenance) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *ResourceMaintenance_Maintenance) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ResourceMaintenance_Maintenance) GetCategory() MaintenanceCategory { + if x != nil { + return x.Category + } + return MaintenanceCategory_MAINTENANCE_CATEGORY_UNSPECIFIED +} + +var File_google_cloud_maintenance_api_v1_maintenance_service_proto protoreflect.FileDescriptor + +var file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDesc = []byte{ + 0x0a, 0x39, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6d, + 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x01, + 0x0a, 0x1c, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x7a, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x96, 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x36, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x30, 0x12, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x89, 0x52, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, + 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x8a, 0x52, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x0a, + 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x8b, 0x52, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, + 0x62, 0x79, 0x18, 0x8c, 0x52, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, + 0x42, 0x79, 0x22, 0xca, 0x01, 0x0a, 0x1d, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x7a, 0x65, + 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x0c, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x18, 0x8d, 0x52, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x52, 0x0c, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x27, + 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x8e, 0x52, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, + 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x26, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, + 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x8f, 0x52, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x06, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, + 0xf2, 0x07, 0x0a, 0x12, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x2e, 0x0a, 0x10, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0f, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, + 0x67, 0x6f, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, + 0x68, 0x0a, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1d, 0x6d, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x64, 0x0a, 0x1e, 0x6d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x64, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x1b, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, + 0x55, 0x0a, 0x16, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, + 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x11, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0a, + 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x54, 0x0a, 0x08, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x73, 0x12, 0x54, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x39, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x03, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x81, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x12, 0x5d, 0x0a, 0x0a, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x2e, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x52, + 0x0a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x41, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x86, 0x10, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5e, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, + 0x03, 0x52, 0x0b, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x55, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x55, 0x0a, 0x16, 0x6d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x14, 0x6d, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x51, 0x0a, 0x14, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, + 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x12, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x17, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x68, 0x0a, 0x20, + 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x1d, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x64, 0x0a, 0x1e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x5f, + 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, + 0x1b, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x63, 0x68, 0x65, + 0x64, 0x75, 0x6c, 0x65, 0x64, 0x45, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x11, + 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x10, 0x75, 0x73, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x54, + 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x73, 0x12, 0x5e, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0xa1, + 0x51, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x73, 0x12, 0x6d, 0x0a, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0xa2, 0x51, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0xd9, 0x4f, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0b, 0xe0, 0x41, 0x03, 0xe2, 0x8c, 0xcf, 0xd7, 0x08, 0x02, 0x08, 0x01, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x04, 0x65, 0x74, 0x61, 0x67, 0x18, 0xda, 0x4f, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x65, 0x74, 0x61, 0x67, 0x1a, 0x6e, 0x0a, + 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x1a, 0xd1, 0x01, + 0x0a, 0x0b, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x29, 0x0a, + 0x10, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x55, 0x0a, 0x08, 0x63, 0x61, + 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, + 0x79, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, + 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x05, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, + 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, + 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, + 0x45, 0x44, 0x45, 0x44, 0x10, 0x04, 0x3a, 0xb4, 0x01, 0xea, 0x41, 0xb0, 0x01, 0x0a, 0x2e, 0x6d, + 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x53, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x7d, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, + 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x7d, 0x2a, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x32, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x80, 0x02, + 0x0a, 0x12, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x55, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x69, + 0x73, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, + 0x69, 0x73, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x50, + 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, + 0x54, 0x52, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x50, 0x50, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x11, 0x0a, + 0x0d, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x02, + 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x53, 0x43, 0x48, 0x45, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x03, + 0x22, 0xe5, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x4f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x96, + 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x30, 0x12, 0x2e, 0x6d, + 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x06, 0x70, + 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x89, 0x52, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, + 0x69, 0x7a, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, + 0x6e, 0x18, 0x8a, 0x52, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x8b, 0x52, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x8c, 0x52, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x22, 0xda, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, + 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x8d, 0x52, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6e, 0x65, 0x78, + 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x8e, 0x52, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x21, 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, + 0x65, 0x18, 0x8f, 0x52, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, + 0x68, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x6c, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x91, + 0x4e, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x30, 0x0a, 0x2e, 0x6d, + 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x2a, 0x63, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x0a, 0x20, 0x4d, 0x41, + 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, + 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x46, 0x52, 0x41, 0x53, 0x54, 0x52, 0x55, 0x43, 0x54, 0x55, + 0x52, 0x45, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, + 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x32, 0x92, 0x06, 0x0a, 0x0b, 0x4d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0xeb, 0x01, 0x0a, 0x15, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x69, 0x7a, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x7a, 0x65, 0x4d, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x3e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x7a, 0x65, 0x4d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x53, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x44, 0x12, 0x42, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x3a, 0x73, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x69, 0x7a, 0x65, 0x12, 0xea, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x49, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, + 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x76, 0x31, 0x2f, 0x7b, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x3d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, + 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x7d, 0x2f, 0x72, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x12, 0xd7, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3e, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, + 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6d, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, + 0x61, 0x6e, 0x63, 0x65, 0x22, 0x47, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x3a, 0x12, 0x38, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2f, 0x2a, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, + 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x1a, 0x4e, 0xca, + 0x41, 0x1a, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x2e, 0x68, + 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x42, 0x6f, 0x0a, + 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6d, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x55, 0x4d, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6d, 0x61, 0x69, + 0x6e, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x63, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x70, 0x69, + 0x76, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x70, 0x62, 0x3b, 0x61, 0x70, 0x69, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescOnce sync.Once + file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescData = file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDesc +) + +func file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescGZIP() []byte { + file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescOnce.Do(func() { + file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescData) + }) + return file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDescData +} + +var file_google_cloud_maintenance_api_v1_maintenance_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_google_cloud_maintenance_api_v1_maintenance_service_proto_goTypes = []any{ + (MaintenanceCategory)(0), // 0: google.cloud.maintenance.api.v1.MaintenanceCategory + (ResourceMaintenance_State)(0), // 1: google.cloud.maintenance.api.v1.ResourceMaintenance.State + (MaintenanceControl_Control)(0), // 2: google.cloud.maintenance.api.v1.MaintenanceControl.Control + (*SummarizeMaintenancesRequest)(nil), // 3: google.cloud.maintenance.api.v1.SummarizeMaintenancesRequest + (*SummarizeMaintenancesResponse)(nil), // 4: google.cloud.maintenance.api.v1.SummarizeMaintenancesResponse + (*MaintenanceSummary)(nil), // 5: google.cloud.maintenance.api.v1.MaintenanceSummary + (*ResourceMaintenance)(nil), // 6: google.cloud.maintenance.api.v1.ResourceMaintenance + (*MaintenanceControl)(nil), // 7: google.cloud.maintenance.api.v1.MaintenanceControl + (*ListResourceMaintenancesRequest)(nil), // 8: google.cloud.maintenance.api.v1.ListResourceMaintenancesRequest + (*ListResourceMaintenancesResponse)(nil), // 9: google.cloud.maintenance.api.v1.ListResourceMaintenancesResponse + (*GetResourceMaintenanceRequest)(nil), // 10: google.cloud.maintenance.api.v1.GetResourceMaintenanceRequest + (*MaintenanceSummary_Stats)(nil), // 11: google.cloud.maintenance.api.v1.MaintenanceSummary.Stats + (*MaintenanceSummary_Aggregate)(nil), // 12: google.cloud.maintenance.api.v1.MaintenanceSummary.Aggregate + (*ResourceMaintenance_Resource)(nil), // 13: google.cloud.maintenance.api.v1.ResourceMaintenance.Resource + (*ResourceMaintenance_Maintenance)(nil), // 14: google.cloud.maintenance.api.v1.ResourceMaintenance.Maintenance + nil, // 15: google.cloud.maintenance.api.v1.ResourceMaintenance.LabelsEntry + nil, // 16: google.cloud.maintenance.api.v1.ResourceMaintenance.AnnotationsEntry + (*timestamppb.Timestamp)(nil), // 17: google.protobuf.Timestamp +} +var file_google_cloud_maintenance_api_v1_maintenance_service_proto_depIdxs = []int32{ + 5, // 0: google.cloud.maintenance.api.v1.SummarizeMaintenancesResponse.maintenances:type_name -> google.cloud.maintenance.api.v1.MaintenanceSummary + 0, // 1: google.cloud.maintenance.api.v1.MaintenanceSummary.category:type_name -> google.cloud.maintenance.api.v1.MaintenanceCategory + 17, // 2: google.cloud.maintenance.api.v1.MaintenanceSummary.maintenance_scheduled_start_time:type_name -> google.protobuf.Timestamp + 17, // 3: google.cloud.maintenance.api.v1.MaintenanceSummary.maintenance_scheduled_end_time:type_name -> google.protobuf.Timestamp + 17, // 4: google.cloud.maintenance.api.v1.MaintenanceSummary.maintenance_start_time:type_name -> google.protobuf.Timestamp + 17, // 5: google.cloud.maintenance.api.v1.MaintenanceSummary.maintenance_end_time:type_name -> google.protobuf.Timestamp + 7, // 6: google.cloud.maintenance.api.v1.MaintenanceSummary.controls:type_name -> google.cloud.maintenance.api.v1.MaintenanceControl + 11, // 7: google.cloud.maintenance.api.v1.MaintenanceSummary.stats:type_name -> google.cloud.maintenance.api.v1.MaintenanceSummary.Stats + 13, // 8: google.cloud.maintenance.api.v1.ResourceMaintenance.resource:type_name -> google.cloud.maintenance.api.v1.ResourceMaintenance.Resource + 14, // 9: google.cloud.maintenance.api.v1.ResourceMaintenance.maintenance:type_name -> google.cloud.maintenance.api.v1.ResourceMaintenance.Maintenance + 1, // 10: google.cloud.maintenance.api.v1.ResourceMaintenance.state:type_name -> google.cloud.maintenance.api.v1.ResourceMaintenance.State + 17, // 11: google.cloud.maintenance.api.v1.ResourceMaintenance.create_time:type_name -> google.protobuf.Timestamp + 17, // 12: google.cloud.maintenance.api.v1.ResourceMaintenance.update_time:type_name -> google.protobuf.Timestamp + 17, // 13: google.cloud.maintenance.api.v1.ResourceMaintenance.maintenance_start_time:type_name -> google.protobuf.Timestamp + 17, // 14: google.cloud.maintenance.api.v1.ResourceMaintenance.maintenance_end_time:type_name -> google.protobuf.Timestamp + 17, // 15: google.cloud.maintenance.api.v1.ResourceMaintenance.maintenance_cancel_time:type_name -> google.protobuf.Timestamp + 17, // 16: google.cloud.maintenance.api.v1.ResourceMaintenance.maintenance_scheduled_start_time:type_name -> google.protobuf.Timestamp + 17, // 17: google.cloud.maintenance.api.v1.ResourceMaintenance.maintenance_scheduled_end_time:type_name -> google.protobuf.Timestamp + 7, // 18: google.cloud.maintenance.api.v1.ResourceMaintenance.controls:type_name -> google.cloud.maintenance.api.v1.MaintenanceControl + 15, // 19: google.cloud.maintenance.api.v1.ResourceMaintenance.labels:type_name -> google.cloud.maintenance.api.v1.ResourceMaintenance.LabelsEntry + 16, // 20: google.cloud.maintenance.api.v1.ResourceMaintenance.annotations:type_name -> google.cloud.maintenance.api.v1.ResourceMaintenance.AnnotationsEntry + 2, // 21: google.cloud.maintenance.api.v1.MaintenanceControl.control:type_name -> google.cloud.maintenance.api.v1.MaintenanceControl.Control + 6, // 22: google.cloud.maintenance.api.v1.ListResourceMaintenancesResponse.resource_maintenances:type_name -> google.cloud.maintenance.api.v1.ResourceMaintenance + 12, // 23: google.cloud.maintenance.api.v1.MaintenanceSummary.Stats.aggregates:type_name -> google.cloud.maintenance.api.v1.MaintenanceSummary.Aggregate + 0, // 24: google.cloud.maintenance.api.v1.ResourceMaintenance.Maintenance.category:type_name -> google.cloud.maintenance.api.v1.MaintenanceCategory + 3, // 25: google.cloud.maintenance.api.v1.Maintenance.SummarizeMaintenances:input_type -> google.cloud.maintenance.api.v1.SummarizeMaintenancesRequest + 8, // 26: google.cloud.maintenance.api.v1.Maintenance.ListResourceMaintenances:input_type -> google.cloud.maintenance.api.v1.ListResourceMaintenancesRequest + 10, // 27: google.cloud.maintenance.api.v1.Maintenance.GetResourceMaintenance:input_type -> google.cloud.maintenance.api.v1.GetResourceMaintenanceRequest + 4, // 28: google.cloud.maintenance.api.v1.Maintenance.SummarizeMaintenances:output_type -> google.cloud.maintenance.api.v1.SummarizeMaintenancesResponse + 9, // 29: google.cloud.maintenance.api.v1.Maintenance.ListResourceMaintenances:output_type -> google.cloud.maintenance.api.v1.ListResourceMaintenancesResponse + 6, // 30: google.cloud.maintenance.api.v1.Maintenance.GetResourceMaintenance:output_type -> google.cloud.maintenance.api.v1.ResourceMaintenance + 28, // [28:31] is the sub-list for method output_type + 25, // [25:28] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name +} + +func init() { file_google_cloud_maintenance_api_v1_maintenance_service_proto_init() } +func file_google_cloud_maintenance_api_v1_maintenance_service_proto_init() { + if File_google_cloud_maintenance_api_v1_maintenance_service_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDesc, + NumEnums: 3, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_maintenance_api_v1_maintenance_service_proto_goTypes, + DependencyIndexes: file_google_cloud_maintenance_api_v1_maintenance_service_proto_depIdxs, + EnumInfos: file_google_cloud_maintenance_api_v1_maintenance_service_proto_enumTypes, + MessageInfos: file_google_cloud_maintenance_api_v1_maintenance_service_proto_msgTypes, + }.Build() + File_google_cloud_maintenance_api_v1_maintenance_service_proto = out.File + file_google_cloud_maintenance_api_v1_maintenance_service_proto_rawDesc = nil + file_google_cloud_maintenance_api_v1_maintenance_service_proto_goTypes = nil + file_google_cloud_maintenance_api_v1_maintenance_service_proto_depIdxs = nil +} diff --git a/maintenance/api/apiv1/apipb/maintenance_service_grpc.pb.go b/maintenance/api/apiv1/apipb/maintenance_service_grpc.pb.go new file mode 100644 index 000000000000..5370f27b4691 --- /dev/null +++ b/maintenance/api/apiv1/apipb/maintenance_service_grpc.pb.go @@ -0,0 +1,202 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.7 +// source: google/cloud/maintenance/api/v1/maintenance_service.proto + +package apipb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + Maintenance_SummarizeMaintenances_FullMethodName = "/google.cloud.maintenance.api.v1.Maintenance/SummarizeMaintenances" + Maintenance_ListResourceMaintenances_FullMethodName = "/google.cloud.maintenance.api.v1.Maintenance/ListResourceMaintenances" + Maintenance_GetResourceMaintenance_FullMethodName = "/google.cloud.maintenance.api.v1.Maintenance/GetResourceMaintenance" +) + +// MaintenanceClient is the client API for Maintenance service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type MaintenanceClient interface { + // Retrieves the statistics of a specific maintenance. + SummarizeMaintenances(ctx context.Context, in *SummarizeMaintenancesRequest, opts ...grpc.CallOption) (*SummarizeMaintenancesResponse, error) + // Retrieve a collection of resource maintenances. + ListResourceMaintenances(ctx context.Context, in *ListResourceMaintenancesRequest, opts ...grpc.CallOption) (*ListResourceMaintenancesResponse, error) + // Retrieve a single resource maintenance. + GetResourceMaintenance(ctx context.Context, in *GetResourceMaintenanceRequest, opts ...grpc.CallOption) (*ResourceMaintenance, error) +} + +type maintenanceClient struct { + cc grpc.ClientConnInterface +} + +func NewMaintenanceClient(cc grpc.ClientConnInterface) MaintenanceClient { + return &maintenanceClient{cc} +} + +func (c *maintenanceClient) SummarizeMaintenances(ctx context.Context, in *SummarizeMaintenancesRequest, opts ...grpc.CallOption) (*SummarizeMaintenancesResponse, error) { + out := new(SummarizeMaintenancesResponse) + err := c.cc.Invoke(ctx, Maintenance_SummarizeMaintenances_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maintenanceClient) ListResourceMaintenances(ctx context.Context, in *ListResourceMaintenancesRequest, opts ...grpc.CallOption) (*ListResourceMaintenancesResponse, error) { + out := new(ListResourceMaintenancesResponse) + err := c.cc.Invoke(ctx, Maintenance_ListResourceMaintenances_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *maintenanceClient) GetResourceMaintenance(ctx context.Context, in *GetResourceMaintenanceRequest, opts ...grpc.CallOption) (*ResourceMaintenance, error) { + out := new(ResourceMaintenance) + err := c.cc.Invoke(ctx, Maintenance_GetResourceMaintenance_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MaintenanceServer is the server API for Maintenance service. +// All implementations should embed UnimplementedMaintenanceServer +// for forward compatibility +type MaintenanceServer interface { + // Retrieves the statistics of a specific maintenance. + SummarizeMaintenances(context.Context, *SummarizeMaintenancesRequest) (*SummarizeMaintenancesResponse, error) + // Retrieve a collection of resource maintenances. + ListResourceMaintenances(context.Context, *ListResourceMaintenancesRequest) (*ListResourceMaintenancesResponse, error) + // Retrieve a single resource maintenance. + GetResourceMaintenance(context.Context, *GetResourceMaintenanceRequest) (*ResourceMaintenance, error) +} + +// UnimplementedMaintenanceServer should be embedded to have forward compatible implementations. +type UnimplementedMaintenanceServer struct { +} + +func (UnimplementedMaintenanceServer) SummarizeMaintenances(context.Context, *SummarizeMaintenancesRequest) (*SummarizeMaintenancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SummarizeMaintenances not implemented") +} +func (UnimplementedMaintenanceServer) ListResourceMaintenances(context.Context, *ListResourceMaintenancesRequest) (*ListResourceMaintenancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListResourceMaintenances not implemented") +} +func (UnimplementedMaintenanceServer) GetResourceMaintenance(context.Context, *GetResourceMaintenanceRequest) (*ResourceMaintenance, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetResourceMaintenance not implemented") +} + +// UnsafeMaintenanceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MaintenanceServer will +// result in compilation errors. +type UnsafeMaintenanceServer interface { + mustEmbedUnimplementedMaintenanceServer() +} + +func RegisterMaintenanceServer(s grpc.ServiceRegistrar, srv MaintenanceServer) { + s.RegisterService(&Maintenance_ServiceDesc, srv) +} + +func _Maintenance_SummarizeMaintenances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SummarizeMaintenancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaintenanceServer).SummarizeMaintenances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Maintenance_SummarizeMaintenances_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaintenanceServer).SummarizeMaintenances(ctx, req.(*SummarizeMaintenancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Maintenance_ListResourceMaintenances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListResourceMaintenancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaintenanceServer).ListResourceMaintenances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Maintenance_ListResourceMaintenances_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaintenanceServer).ListResourceMaintenances(ctx, req.(*ListResourceMaintenancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Maintenance_GetResourceMaintenance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetResourceMaintenanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MaintenanceServer).GetResourceMaintenance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Maintenance_GetResourceMaintenance_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MaintenanceServer).GetResourceMaintenance(ctx, req.(*GetResourceMaintenanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Maintenance_ServiceDesc is the grpc.ServiceDesc for Maintenance service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Maintenance_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.maintenance.api.v1.Maintenance", + HandlerType: (*MaintenanceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SummarizeMaintenances", + Handler: _Maintenance_SummarizeMaintenances_Handler, + }, + { + MethodName: "ListResourceMaintenances", + Handler: _Maintenance_ListResourceMaintenances_Handler, + }, + { + MethodName: "GetResourceMaintenance", + Handler: _Maintenance_GetResourceMaintenance_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/maintenance/api/v1/maintenance_service.proto", +} diff --git a/maintenance/api/apiv1/auxiliary.go b/maintenance/api/apiv1/auxiliary.go new file mode 100644 index 000000000000..3725ff6beade --- /dev/null +++ b/maintenance/api/apiv1/auxiliary.go @@ -0,0 +1,164 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package api + +import ( + apipb "cloud.google.com/go/maintenance/api/apiv1/apipb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +// LocationIterator manages a stream of *locationpb.Location. +type LocationIterator struct { + items []*locationpb.Location + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *LocationIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *LocationIterator) Next() (*locationpb.Location, error) { + var item *locationpb.Location + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *LocationIterator) bufLen() int { + return len(it.items) +} + +func (it *LocationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// MaintenanceSummaryIterator manages a stream of *apipb.MaintenanceSummary. +type MaintenanceSummaryIterator struct { + items []*apipb.MaintenanceSummary + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apipb.MaintenanceSummary, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *MaintenanceSummaryIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *MaintenanceSummaryIterator) Next() (*apipb.MaintenanceSummary, error) { + var item *apipb.MaintenanceSummary + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *MaintenanceSummaryIterator) bufLen() int { + return len(it.items) +} + +func (it *MaintenanceSummaryIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ResourceMaintenanceIterator manages a stream of *apipb.ResourceMaintenance. +type ResourceMaintenanceIterator struct { + items []*apipb.ResourceMaintenance + pageInfo *iterator.PageInfo + nextFunc func() error + + // Response is the raw response for the current page. + // It must be cast to the RPC response type. + // Calling Next() or InternalFetch() updates this value. + Response interface{} + + // InternalFetch is for use by the Google Cloud Libraries only. + // It is not part of the stable interface of this package. + // + // InternalFetch returns results from a single call to the underlying RPC. + // The number of results is no greater than pageSize. + // If there are no more results, nextPageToken is empty and err is nil. + InternalFetch func(pageSize int, pageToken string) (results []*apipb.ResourceMaintenance, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. +func (it *ResourceMaintenanceIterator) PageInfo() *iterator.PageInfo { + return it.pageInfo +} + +// Next returns the next result. Its second return value is iterator.Done if there are no more +// results. Once Next returns Done, all subsequent calls will return Done. +func (it *ResourceMaintenanceIterator) Next() (*apipb.ResourceMaintenance, error) { + var item *apipb.ResourceMaintenance + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ResourceMaintenanceIterator) bufLen() int { + return len(it.items) +} + +func (it *ResourceMaintenanceIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/maintenance/api/apiv1/auxiliary_go123.go b/maintenance/api/apiv1/auxiliary_go123.go new file mode 100644 index 000000000000..db1b81c3e268 --- /dev/null +++ b/maintenance/api/apiv1/auxiliary_go123.go @@ -0,0 +1,45 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +//go:build go1.23 + +package api + +import ( + "iter" + + apipb "cloud.google.com/go/maintenance/api/apiv1/apipb" + "github.com/googleapis/gax-go/v2/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *MaintenanceSummaryIterator) All() iter.Seq2[*apipb.MaintenanceSummary, error] { + return iterator.RangeAdapter(it.Next) +} + +// All returns an iterator. If an error is returned by the iterator, the +// iterator will stop after that iteration. +func (it *ResourceMaintenanceIterator) All() iter.Seq2[*apipb.ResourceMaintenance, error] { + return iterator.RangeAdapter(it.Next) +} diff --git a/maintenance/api/apiv1/doc.go b/maintenance/api/apiv1/doc.go new file mode 100644 index 000000000000..2775e64ec4c7 --- /dev/null +++ b/maintenance/api/apiv1/doc.go @@ -0,0 +1,89 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package api is an auto-generated package for the +// Maintenance API. +// +// The Maintenance API provides a centralized view of planned disruptive +// maintenance events across supported Google Cloud products. It offers users +// visibility into upcoming, ongoing, and completed maintenance, along with +// controls to manage certain maintenance activities, such as mainteance +// windows, rescheduling, and on-demand updates. +// +// NOTE: This package is in beta. It is not stable, and may be subject to changes. +// +// # General documentation +// +// For information that is relevant for all client libraries please reference +// https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this +// page includes: +// +// - [Authentication and Authorization] +// - [Timeouts and Cancellation] +// - [Testing against Client Libraries] +// - [Debugging Client Libraries] +// - [Inspecting errors] +// +// # Example usage +// +// To get started with this package, create a client. +// +// // go get cloud.google.com/go/maintenance/api/apiv1@latest +// ctx := context.Background() +// // This snippet has been automatically generated and should be regarded as a code template only. +// // It will require modifications to work: +// // - It may require correct/in-range values for request initialization. +// // - It may require specifying regional endpoints when creating the service client as shown in: +// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options +// c, err := api.NewMaintenanceClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// The client will use your default application credentials. Clients should be reused instead of created as needed. +// The methods of Client are safe for concurrent use by multiple goroutines. +// The returned client must be Closed when it is done being used. +// +// # Using the Client +// +// The following is an example of making an API call with the newly created client, mentioned above. +// +// req := &apipb.GetResourceMaintenanceRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/cloud.google.com/go/maintenance/api/apiv1/apipb#GetResourceMaintenanceRequest. +// } +// resp, err := c.GetResourceMaintenance(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// +// # Use of Context +// +// The ctx passed to NewMaintenanceClient is used for authentication requests and +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// [Authentication and Authorization]: https://pkg.go.dev/cloud.google.com/go#hdr-Authentication_and_Authorization +// [Timeouts and Cancellation]: https://pkg.go.dev/cloud.google.com/go#hdr-Timeouts_and_Cancellation +// [Testing against Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Testing +// [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging +// [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors +package api // import "cloud.google.com/go/maintenance/api/apiv1" diff --git a/maintenance/api/apiv1/gapic_metadata.json b/maintenance/api/apiv1/gapic_metadata.json new file mode 100644 index 000000000000..cdf7ab563a97 --- /dev/null +++ b/maintenance/api/apiv1/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.maintenance.api.v1", + "libraryPackage": "cloud.google.com/go/maintenance/api/apiv1", + "services": { + "Maintenance": { + "clients": { + "grpc": { + "libraryClient": "MaintenanceClient", + "rpcs": { + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetResourceMaintenance": { + "methods": [ + "GetResourceMaintenance" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListResourceMaintenances": { + "methods": [ + "ListResourceMaintenances" + ] + }, + "SummarizeMaintenances": { + "methods": [ + "SummarizeMaintenances" + ] + } + } + }, + "rest": { + "libraryClient": "MaintenanceClient", + "rpcs": { + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetResourceMaintenance": { + "methods": [ + "GetResourceMaintenance" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListResourceMaintenances": { + "methods": [ + "ListResourceMaintenances" + ] + }, + "SummarizeMaintenances": { + "methods": [ + "SummarizeMaintenances" + ] + } + } + } + } + } + } +} diff --git a/maintenance/api/apiv1/helpers.go b/maintenance/api/apiv1/helpers.go new file mode 100644 index 000000000000..8b705667a3e7 --- /dev/null +++ b/maintenance/api/apiv1/helpers.go @@ -0,0 +1,105 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package api + +import ( + "context" + "fmt" + "io" + "log/slog" + "net/http" + + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" + "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/runtime/protoimpl" +) + +const serviceName = "maintenance.googleapis.com" + +var protoVersion = fmt.Sprintf("1.%d", protoimpl.MaxVersion) + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) + if err = googleapi.CheckResponseWithBody(resp, buf); err != nil { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/maintenance/api/apiv1/maintenance_client.go b/maintenance/api/apiv1/maintenance_client.go new file mode 100644 index 000000000000..beea1859f3e4 --- /dev/null +++ b/maintenance/api/apiv1/maintenance_client.go @@ -0,0 +1,835 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package api + +import ( + "context" + "fmt" + "log/slog" + "math" + "net/http" + "net/url" + + apipb "cloud.google.com/go/maintenance/api/apiv1/apipb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + httptransport "google.golang.org/api/transport/http" + locationpb "google.golang.org/genproto/googleapis/cloud/location" + "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newMaintenanceClientHook clientHook + +// MaintenanceCallOptions contains the retry settings for each method of MaintenanceClient. +type MaintenanceCallOptions struct { + SummarizeMaintenances []gax.CallOption + ListResourceMaintenances []gax.CallOption + GetResourceMaintenance []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption +} + +func defaultMaintenanceGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("maintenance.googleapis.com:443"), + internaloption.WithDefaultEndpointTemplate("maintenance.UNIVERSE_DOMAIN:443"), + internaloption.WithDefaultMTLSEndpoint("maintenance.mtls.googleapis.com:443"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://maintenance.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + internaloption.EnableNewAuthLibrary(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultMaintenanceCallOptions() *MaintenanceCallOptions { + return &MaintenanceCallOptions{ + SummarizeMaintenances: []gax.CallOption{}, + ListResourceMaintenances: []gax.CallOption{}, + GetResourceMaintenance: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + } +} + +func defaultMaintenanceRESTCallOptions() *MaintenanceCallOptions { + return &MaintenanceCallOptions{ + SummarizeMaintenances: []gax.CallOption{}, + ListResourceMaintenances: []gax.CallOption{}, + GetResourceMaintenance: []gax.CallOption{}, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + } +} + +// internalMaintenanceClient is an interface that defines the methods available from Maintenance API. +type internalMaintenanceClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + SummarizeMaintenances(context.Context, *apipb.SummarizeMaintenancesRequest, ...gax.CallOption) *MaintenanceSummaryIterator + ListResourceMaintenances(context.Context, *apipb.ListResourceMaintenancesRequest, ...gax.CallOption) *ResourceMaintenanceIterator + GetResourceMaintenance(context.Context, *apipb.GetResourceMaintenanceRequest, ...gax.CallOption) (*apipb.ResourceMaintenance, error) + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator +} + +// MaintenanceClient is a client for interacting with Maintenance API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// Unified Maintenance service +type MaintenanceClient struct { + // The internal transport-dependent client. + internalClient internalMaintenanceClient + + // The call options for this service. + CallOptions *MaintenanceCallOptions +} + +// Wrapper methods routed to the internal client. + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *MaintenanceClient) Close() error { + return c.internalClient.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *MaintenanceClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *MaintenanceClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// SummarizeMaintenances retrieves the statistics of a specific maintenance. +func (c *MaintenanceClient) SummarizeMaintenances(ctx context.Context, req *apipb.SummarizeMaintenancesRequest, opts ...gax.CallOption) *MaintenanceSummaryIterator { + return c.internalClient.SummarizeMaintenances(ctx, req, opts...) +} + +// ListResourceMaintenances retrieve a collection of resource maintenances. +func (c *MaintenanceClient) ListResourceMaintenances(ctx context.Context, req *apipb.ListResourceMaintenancesRequest, opts ...gax.CallOption) *ResourceMaintenanceIterator { + return c.internalClient.ListResourceMaintenances(ctx, req, opts...) +} + +// GetResourceMaintenance retrieve a single resource maintenance. +func (c *MaintenanceClient) GetResourceMaintenance(ctx context.Context, req *apipb.GetResourceMaintenanceRequest, opts ...gax.CallOption) (*apipb.ResourceMaintenance, error) { + return c.internalClient.GetResourceMaintenance(ctx, req, opts...) +} + +// GetLocation gets information about a location. +func (c *MaintenanceClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + return c.internalClient.GetLocation(ctx, req, opts...) +} + +// ListLocations lists information about the supported locations for this service. +func (c *MaintenanceClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// maintenanceGRPCClient is a client for interacting with Maintenance API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type maintenanceGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing MaintenanceClient + CallOptions **MaintenanceCallOptions + + // The gRPC API client. + maintenanceClient apipb.MaintenanceClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string + + logger *slog.Logger +} + +// NewMaintenanceClient creates a new maintenance client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// Unified Maintenance service +func NewMaintenanceClient(ctx context.Context, opts ...option.ClientOption) (*MaintenanceClient, error) { + clientOpts := defaultMaintenanceGRPCClientOptions() + if newMaintenanceClientHook != nil { + hookOpts, err := newMaintenanceClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := MaintenanceClient{CallOptions: defaultMaintenanceCallOptions()} + + c := &maintenanceGRPCClient{ + connPool: connPool, + maintenanceClient: apipb.NewMaintenanceClient(connPool), + CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + return &client, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: Connections are now pooled so this method does not always +// return the same resource. +func (c *maintenanceGRPCClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *maintenanceGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version, "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *maintenanceGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type maintenanceRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing MaintenanceClient + CallOptions **MaintenanceCallOptions + + logger *slog.Logger +} + +// NewMaintenanceRESTClient creates a new maintenance rest client. +// +// Unified Maintenance service +func NewMaintenanceRESTClient(ctx context.Context, opts ...option.ClientOption) (*MaintenanceClient, error) { + clientOpts := append(defaultMaintenanceRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultMaintenanceRESTCallOptions() + c := &maintenanceRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), + } + c.setGoogleClientInfo() + + return &MaintenanceClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultMaintenanceRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://maintenance.googleapis.com"), + internaloption.WithDefaultEndpointTemplate("https://maintenance.UNIVERSE_DOMAIN"), + internaloption.WithDefaultMTLSEndpoint("https://maintenance.mtls.googleapis.com"), + internaloption.WithDefaultUniverseDomain("googleapis.com"), + internaloption.WithDefaultAudience("https://maintenance.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableNewAuthLibrary(), + } +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *maintenanceRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN", "pb", protoVersion) + c.xGoogHeaders = []string{ + "x-goog-api-client", gax.XGoogHeader(kv...), + } +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *maintenanceRESTClient) Close() error { + // Replace httpClient with nil to force cleanup. + c.httpClient = nil + return nil +} + +// Connection returns a connection to the API service. +// +// Deprecated: This method always returns nil. +func (c *maintenanceRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *maintenanceGRPCClient) SummarizeMaintenances(ctx context.Context, req *apipb.SummarizeMaintenancesRequest, opts ...gax.CallOption) *MaintenanceSummaryIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).SummarizeMaintenances[0:len((*c.CallOptions).SummarizeMaintenances):len((*c.CallOptions).SummarizeMaintenances)], opts...) + it := &MaintenanceSummaryIterator{} + req = proto.Clone(req).(*apipb.SummarizeMaintenancesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apipb.MaintenanceSummary, string, error) { + resp := &apipb.SummarizeMaintenancesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.maintenanceClient.SummarizeMaintenances, req, settings.GRPC, c.logger, "SummarizeMaintenances") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetMaintenances(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *maintenanceGRPCClient) ListResourceMaintenances(ctx context.Context, req *apipb.ListResourceMaintenancesRequest, opts ...gax.CallOption) *ResourceMaintenanceIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListResourceMaintenances[0:len((*c.CallOptions).ListResourceMaintenances):len((*c.CallOptions).ListResourceMaintenances)], opts...) + it := &ResourceMaintenanceIterator{} + req = proto.Clone(req).(*apipb.ListResourceMaintenancesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*apipb.ResourceMaintenance, string, error) { + resp := &apipb.ListResourceMaintenancesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.maintenanceClient.ListResourceMaintenances, req, settings.GRPC, c.logger, "ListResourceMaintenances") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetResourceMaintenances(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +func (c *maintenanceGRPCClient) GetResourceMaintenance(ctx context.Context, req *apipb.GetResourceMaintenanceRequest, opts ...gax.CallOption) (*apipb.ResourceMaintenance, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetResourceMaintenance[0:len((*c.CallOptions).GetResourceMaintenance):len((*c.CallOptions).GetResourceMaintenance)], opts...) + var resp *apipb.ResourceMaintenance + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.maintenanceClient.GetResourceMaintenance, req, settings.GRPC, c.logger, "GetResourceMaintenance") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *maintenanceGRPCClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + var resp *locationpb.Location + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.GetLocation, req, settings.GRPC, c.logger, "GetLocation") + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *maintenanceGRPCClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).ListLocations[0:len((*c.CallOptions).ListLocations):len((*c.CallOptions).ListLocations)], opts...) + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = executeRPC(ctx, c.locationsClient.ListLocations, req, settings.GRPC, c.logger, "ListLocations") + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// SummarizeMaintenances retrieves the statistics of a specific maintenance. +func (c *maintenanceRESTClient) SummarizeMaintenances(ctx context.Context, req *apipb.SummarizeMaintenancesRequest, opts ...gax.CallOption) *MaintenanceSummaryIterator { + it := &MaintenanceSummaryIterator{} + req = proto.Clone(req).(*apipb.SummarizeMaintenancesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*apipb.MaintenanceSummary, string, error) { + resp := &apipb.SummarizeMaintenancesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/resourceMaintenances:summarize", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "SummarizeMaintenances") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetMaintenances(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// ListResourceMaintenances retrieve a collection of resource maintenances. +func (c *maintenanceRESTClient) ListResourceMaintenances(ctx context.Context, req *apipb.ListResourceMaintenancesRequest, opts ...gax.CallOption) *ResourceMaintenanceIterator { + it := &ResourceMaintenanceIterator{} + req = proto.Clone(req).(*apipb.ListResourceMaintenancesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*apipb.ResourceMaintenance, string, error) { + resp := &apipb.ListResourceMaintenancesResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/resourceMaintenances", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetOrderBy() != "" { + params.Add("orderBy", fmt.Sprintf("%v", req.GetOrderBy())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListResourceMaintenances") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetResourceMaintenances(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} + +// GetResourceMaintenance retrieve a single resource maintenance. +func (c *maintenanceRESTClient) GetResourceMaintenance(ctx context.Context, req *apipb.GetResourceMaintenanceRequest, opts ...gax.CallOption) (*apipb.ResourceMaintenance, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetResourceMaintenance[0:len((*c.CallOptions).GetResourceMaintenance):len((*c.CallOptions).GetResourceMaintenance)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &apipb.ResourceMaintenance{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetResourceMaintenance") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// GetLocation gets information about a location. +func (c *maintenanceRESTClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v1/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetLocation[0:len((*c.CallOptions).GetLocation):len((*c.CallOptions).GetLocation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &locationpb.Location{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetLocation") + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + return resp, nil +} + +// ListLocations lists information about the supported locations for this service. +func (c *maintenanceRESTClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + it := &LocationIterator{} + req = proto.Clone(req).(*locationpb.ListLocationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*locationpb.Location, string, error) { + resp := &locationpb.ListLocationsResponse{} + if pageToken != "" { + req.PageToken = pageToken + } + if pageSize > math.MaxInt32 { + req.PageSize = math.MaxInt32 + } else if pageSize != 0 { + req.PageSize = int32(pageSize) + } + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, "", err + } + baseUrl.Path += fmt.Sprintf("/v1/%v/locations", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetFilter() != "" { + params.Add("filter", fmt.Sprintf("%v", req.GetFilter())) + } + if req.GetPageSize() != 0 { + params.Add("pageSize", fmt.Sprintf("%v", req.GetPageSize())) + } + if req.GetPageToken() != "" { + params.Add("pageToken", fmt.Sprintf("%v", req.GetPageToken())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := append(c.xGoogHeaders, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("GET", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq.Header = headers + + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListLocations") + if err != nil { + return err + } + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, "", e + } + it.Response = resp + return resp.GetLocations(), resp.GetNextPageToken(), nil + } + + fetch := func(pageSize int, pageToken string) (string, error) { + items, nextPageToken, err := it.InternalFetch(pageSize, pageToken) + if err != nil { + return "", err + } + it.items = append(it.items, items...) + return nextPageToken, nil + } + + it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf) + it.pageInfo.MaxSize = int(req.GetPageSize()) + it.pageInfo.Token = req.GetPageToken() + + return it +} diff --git a/maintenance/api/apiv1/maintenance_client_example_go123_test.go b/maintenance/api/apiv1/maintenance_client_example_go123_test.go new file mode 100644 index 000000000000..0b2eecbfbeae --- /dev/null +++ b/maintenance/api/apiv1/maintenance_client_example_go123_test.go @@ -0,0 +1,105 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +//go:build go1.23 + +package api_test + +import ( + "context" + + api "cloud.google.com/go/maintenance/api/apiv1" + apipb "cloud.google.com/go/maintenance/api/apiv1/apipb" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleMaintenanceClient_ListResourceMaintenances_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apipb.ListResourceMaintenancesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/maintenance/api/apiv1/apipb#ListResourceMaintenancesRequest. + } + for resp, err := range c.ListResourceMaintenances(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleMaintenanceClient_SummarizeMaintenances_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apipb.SummarizeMaintenancesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/maintenance/api/apiv1/apipb#SummarizeMaintenancesRequest. + } + for resp, err := range c.SummarizeMaintenances(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleMaintenanceClient_ListLocations_all() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + for resp, err := range c.ListLocations(ctx, req).All() { + if err != nil { + // TODO: Handle error and break/return/continue. Iteration will stop after any error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/maintenance/api/apiv1/maintenance_client_example_test.go b/maintenance/api/apiv1/maintenance_client_example_test.go new file mode 100644 index 000000000000..4bf7df467cce --- /dev/null +++ b/maintenance/api/apiv1/maintenance_client_example_test.go @@ -0,0 +1,221 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package api_test + +import ( + "context" + + api "cloud.google.com/go/maintenance/api/apiv1" + apipb "cloud.google.com/go/maintenance/api/apiv1/apipb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleNewMaintenanceClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewMaintenanceRESTClient() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleMaintenanceClient_GetResourceMaintenance() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apipb.GetResourceMaintenanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/maintenance/api/apiv1/apipb#GetResourceMaintenanceRequest. + } + resp, err := c.GetResourceMaintenance(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleMaintenanceClient_ListResourceMaintenances() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apipb.ListResourceMaintenancesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/maintenance/api/apiv1/apipb#ListResourceMaintenancesRequest. + } + it := c.ListResourceMaintenances(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*apipb.ListResourceMaintenancesResponse) + } +} + +func ExampleMaintenanceClient_SummarizeMaintenances() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &apipb.SummarizeMaintenancesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/maintenance/api/apiv1/apipb#SummarizeMaintenancesRequest. + } + it := c.SummarizeMaintenances(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*apipb.SummarizeMaintenancesResponse) + } +} + +func ExampleMaintenanceClient_GetLocation() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.GetLocationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest. + } + resp, err := c.GetLocation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleMaintenanceClient_ListLocations() { + ctx := context.Background() + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in: + // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options + c, err := api.NewMaintenanceClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &locationpb.ListLocationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest. + } + it := c.ListLocations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + + // If you need to access the underlying RPC response, + // you can do so by casting the `Response` as below. + // Otherwise, remove this line. Only populated after + // first call to Next(). Not safe for concurrent access. + _ = it.Response.(*locationpb.ListLocationsResponse) + } +} diff --git a/maintenance/api/apiv1/version.go b/maintenance/api/apiv1/version.go new file mode 100644 index 000000000000..0d3a994ce354 --- /dev/null +++ b/maintenance/api/apiv1/version.go @@ -0,0 +1,23 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by gapicgen. DO NOT EDIT. + +package api + +import "cloud.google.com/go/maintenance/internal" + +func init() { + versionClient = internal.Version +}