diff --git a/internal/.repo-metadata-full.json b/internal/.repo-metadata-full.json index 89c78277c81e..5293e41e031d 100644 --- a/internal/.repo-metadata-full.json +++ b/internal/.repo-metadata-full.json @@ -1539,6 +1539,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/notebooks/apiv2": { + "api_shortname": "notebooks", + "distribution_name": "cloud.google.com/go/notebooks/apiv2", + "description": "Notebooks API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/notebooks/latest/apiv2", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/optimization/apiv1": { "api_shortname": "cloudoptimization", "distribution_name": "cloud.google.com/go/optimization/apiv1", diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/CancelOperation/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/CancelOperation/main.go new file mode 100644 index 000000000000..c02bdf4145b4 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/CancelOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_CancelOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + notebooks "cloud.google.com/go/notebooks/apiv2" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END notebooks_v2_generated_NotebookService_CancelOperation_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/CheckInstanceUpgradability/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/CheckInstanceUpgradability/main.go new file mode 100644 index 000000000000..10da2e1a0460 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/CheckInstanceUpgradability/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_CheckInstanceUpgradability_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.CheckInstanceUpgradabilityRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#CheckInstanceUpgradabilityRequest. + } + resp, err := c.CheckInstanceUpgradability(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_CheckInstanceUpgradability_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/CreateInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/CreateInstance/main.go new file mode 100644 index 000000000000..5bf5dc20e730 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/CreateInstance/main.go @@ -0,0 +1,58 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_CreateInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.CreateInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#CreateInstanceRequest. + } + op, err := c.CreateInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_CreateInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/DeleteInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/DeleteInstance/main.go new file mode 100644 index 000000000000..5b25311130f4 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/DeleteInstance/main.go @@ -0,0 +1,56 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_DeleteInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.DeleteInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#DeleteInstanceRequest. + } + op, err := c.DeleteInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END notebooks_v2_generated_NotebookService_DeleteInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/DeleteOperation/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/DeleteOperation/main.go new file mode 100644 index 000000000000..3bb95bebe0b7 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/DeleteOperation/main.go @@ -0,0 +1,51 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_DeleteOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + notebooks "cloud.google.com/go/notebooks/apiv2" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END notebooks_v2_generated_NotebookService_DeleteOperation_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/DiagnoseInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/DiagnoseInstance/main.go new file mode 100644 index 000000000000..aa9b40ae9fb5 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/DiagnoseInstance/main.go @@ -0,0 +1,58 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_DiagnoseInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.DiagnoseInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#DiagnoseInstanceRequest. + } + op, err := c.DiagnoseInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_DiagnoseInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetIamPolicy/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetIamPolicy/main.go new file mode 100644 index 000000000000..a55b5a83da97 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetIamPolicy/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_GetIamPolicy_sync] + +package main + +import ( + "context" + + iampb "cloud.google.com/go/iam/apiv1/iampb" + notebooks "cloud.google.com/go/notebooks/apiv2" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_GetIamPolicy_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetInstance/main.go new file mode 100644 index 000000000000..77a2925db3a3 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetInstance/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_GetInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.GetInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#GetInstanceRequest. + } + resp, err := c.GetInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_GetInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetLocation/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetLocation/main.go new file mode 100644 index 000000000000..7d2a704e21c6 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetLocation/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_GetLocation_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + 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 := notebooks.NewNotebookClient(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 notebooks_v2_generated_NotebookService_GetLocation_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetOperation/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetOperation/main.go new file mode 100644 index 000000000000..c7b850c31e1c --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/GetOperation/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_GetOperation_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + notebooks "cloud.google.com/go/notebooks/apiv2" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_GetOperation_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/ListInstances/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/ListInstances/main.go new file mode 100644 index 000000000000..bd835cdbd42b --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/ListInstances/main.go @@ -0,0 +1,60 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_ListInstances_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" + "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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.ListInstancesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#ListInstancesRequest. + } + it := c.ListInstances(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END notebooks_v2_generated_NotebookService_ListInstances_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/ListLocations/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/ListLocations/main.go new file mode 100644 index 000000000000..a001b53333c8 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/ListLocations/main.go @@ -0,0 +1,60 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_ListLocations_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + "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 := notebooks.NewNotebookClient(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 + } +} + +// [END notebooks_v2_generated_NotebookService_ListLocations_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/ListOperations/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/ListOperations/main.go new file mode 100644 index 000000000000..ee26a1a88f2e --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/ListOperations/main.go @@ -0,0 +1,60 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_ListOperations_sync] + +package main + +import ( + "context" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + notebooks "cloud.google.com/go/notebooks/apiv2" + "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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END notebooks_v2_generated_NotebookService_ListOperations_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/ResetInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/ResetInstance/main.go new file mode 100644 index 000000000000..54d96eb04e55 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/ResetInstance/main.go @@ -0,0 +1,58 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_ResetInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.ResetInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#ResetInstanceRequest. + } + op, err := c.ResetInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_ResetInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/RollbackInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/RollbackInstance/main.go new file mode 100644 index 000000000000..9c4d599b6dff --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/RollbackInstance/main.go @@ -0,0 +1,58 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_RollbackInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.RollbackInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#RollbackInstanceRequest. + } + op, err := c.RollbackInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_RollbackInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/SetIamPolicy/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/SetIamPolicy/main.go new file mode 100644 index 000000000000..101e69f122e5 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/SetIamPolicy/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_SetIamPolicy_sync] + +package main + +import ( + "context" + + iampb "cloud.google.com/go/iam/apiv1/iampb" + notebooks "cloud.google.com/go/notebooks/apiv2" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_SetIamPolicy_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/StartInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/StartInstance/main.go new file mode 100644 index 000000000000..957614c8e577 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/StartInstance/main.go @@ -0,0 +1,58 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_StartInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.StartInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#StartInstanceRequest. + } + op, err := c.StartInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_StartInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/StopInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/StopInstance/main.go new file mode 100644 index 000000000000..b1ac9c152657 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/StopInstance/main.go @@ -0,0 +1,58 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_StopInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.StopInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#StopInstanceRequest. + } + op, err := c.StopInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_StopInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/TestIamPermissions/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/TestIamPermissions/main.go new file mode 100644 index 000000000000..6f0a2bf9c176 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/TestIamPermissions/main.go @@ -0,0 +1,53 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_TestIamPermissions_sync] + +package main + +import ( + "context" + + iampb "cloud.google.com/go/iam/apiv1/iampb" + notebooks "cloud.google.com/go/notebooks/apiv2" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_TestIamPermissions_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/UpdateInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/UpdateInstance/main.go new file mode 100644 index 000000000000..2a4860c0d831 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/UpdateInstance/main.go @@ -0,0 +1,58 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_UpdateInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.UpdateInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#UpdateInstanceRequest. + } + op, err := c.UpdateInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_UpdateInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/NotebookClient/UpgradeInstance/main.go b/internal/generated/snippets/notebooks/apiv2/NotebookClient/UpgradeInstance/main.go new file mode 100644 index 000000000000..72013d159e92 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/NotebookClient/UpgradeInstance/main.go @@ -0,0 +1,58 @@ +// Copyright 2023 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 notebooks_v2_generated_NotebookService_UpgradeInstance_sync] + +package main + +import ( + "context" + + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" +) + +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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.UpgradeInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#UpgradeInstanceRequest. + } + op, err := c.UpgradeInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END notebooks_v2_generated_NotebookService_UpgradeInstance_sync] diff --git a/internal/generated/snippets/notebooks/apiv2/snippet_metadata.google.cloud.notebooks.v2.json b/internal/generated/snippets/notebooks/apiv2/snippet_metadata.google.cloud.notebooks.v2.json new file mode 100644 index 000000000000..f7424bdee106 --- /dev/null +++ b/internal/generated/snippets/notebooks/apiv2/snippet_metadata.google.cloud.notebooks.v2.json @@ -0,0 +1,979 @@ +{ + "clientLibrary": { + "name": "cloud.google.com/go/notebooks/apiv2", + "version": "1.9.1", + "language": "GO", + "apis": [ + { + "id": "google.cloud.notebooks.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "regionTag": "notebooks_v2_generated_NotebookService_CancelOperation_sync", + "title": "notebooks CancelOperation Sample", + "description": "CancelOperation is a utility method from google.longrunning.Operations.", + "file": "NotebookClient/CancelOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CancelOperation", + "fullName": "google.cloud.notebooks.v2.NotebookClient.CancelOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.CancelOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "CancelOperation", + "fullName": "google.longrunning.Operations.CancelOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_CheckInstanceUpgradability_sync", + "title": "notebooks CheckInstanceUpgradability Sample", + "description": "CheckInstanceUpgradability checks whether a notebook instance is upgradable.", + "file": "NotebookClient/CheckInstanceUpgradability/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CheckInstanceUpgradability", + "fullName": "google.cloud.notebooks.v2.NotebookClient.CheckInstanceUpgradability", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.CheckInstanceUpgradabilityRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*notebookspb.CheckInstanceUpgradabilityResponse", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "CheckInstanceUpgradability", + "fullName": "google.cloud.notebooks.v2.NotebookService.CheckInstanceUpgradability", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_CreateInstance_sync", + "title": "notebooks CreateInstance Sample", + "description": "CreateInstance creates a new Instance in a given project and location.", + "file": "NotebookClient/CreateInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "CreateInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.CreateInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.CreateInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "CreateInstanceOperation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "CreateInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.CreateInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_DeleteInstance_sync", + "title": "notebooks DeleteInstance Sample", + "description": "DeleteInstance deletes a single Instance.", + "file": "NotebookClient/DeleteInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.DeleteInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.DeleteInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DeleteInstanceOperation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "DeleteInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.DeleteInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 56, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_DeleteOperation_sync", + "title": "notebooks DeleteOperation Sample", + "description": "DeleteOperation is a utility method from google.longrunning.Operations.", + "file": "NotebookClient/DeleteOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DeleteOperation", + "fullName": "google.cloud.notebooks.v2.NotebookClient.DeleteOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.DeleteOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "DeleteOperation", + "fullName": "google.longrunning.Operations.DeleteOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 51, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_DiagnoseInstance_sync", + "title": "notebooks DiagnoseInstance Sample", + "description": "DiagnoseInstance creates a Diagnostic File and runs Diagnostic Tool given an Instance.", + "file": "NotebookClient/DiagnoseInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "DiagnoseInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.DiagnoseInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.DiagnoseInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "DiagnoseInstanceOperation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "DiagnoseInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.DiagnoseInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_GetIamPolicy_sync", + "title": "notebooks GetIamPolicy Sample", + "description": "GetIamPolicy gets the access control policy for a resource. Returns an empty policy\nif the resource exists and does not have a policy set.", + "file": "NotebookClient/GetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.notebooks.v2.NotebookClient.GetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.GetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.Policy", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.iam.v1.IAMPolicy.GetIamPolicy", + "service": { + "shortName": "IAMPolicy", + "fullName": "google.iam.v1.IAMPolicy" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_GetInstance_sync", + "title": "notebooks GetInstance Sample", + "description": "GetInstance gets details of a single Instance.", + "file": "NotebookClient/GetInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.GetInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.GetInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*notebookspb.Instance", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.GetInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_GetLocation_sync", + "title": "notebooks GetLocation Sample", + "description": "GetLocation gets information about a location.", + "file": "NotebookClient/GetLocation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetLocation", + "fullName": "google.cloud.notebooks.v2.NotebookClient.GetLocation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.GetLocationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*locationpb.Location", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "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": "notebooks_v2_generated_NotebookService_GetOperation_sync", + "title": "notebooks GetOperation Sample", + "description": "GetOperation is a utility method from google.longrunning.Operations.", + "file": "NotebookClient/GetOperation/main.go", + "language": "GO", + "clientMethod": { + "shortName": "GetOperation", + "fullName": "google.cloud.notebooks.v2.NotebookClient.GetOperation", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.GetOperationRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*longrunningpb.Operation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "GetOperation", + "fullName": "google.longrunning.Operations.GetOperation", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_ListInstances_sync", + "title": "notebooks ListInstances Sample", + "description": "ListInstances lists instances in a given project and location.", + "file": "NotebookClient/ListInstances/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListInstances", + "fullName": "google.cloud.notebooks.v2.NotebookClient.ListInstances", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.ListInstancesRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "InstanceIterator", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.notebooks.v2.NotebookService.ListInstances", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_ListLocations_sync", + "title": "notebooks ListLocations Sample", + "description": "ListLocations lists information about the supported locations for this service.", + "file": "NotebookClient/ListLocations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListLocations", + "fullName": "google.cloud.notebooks.v2.NotebookClient.ListLocations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "locationpb.ListLocationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "LocationIterator", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "ListLocations", + "fullName": "google.cloud.location.Locations.ListLocations", + "service": { + "shortName": "Locations", + "fullName": "google.cloud.location.Locations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_ListOperations_sync", + "title": "notebooks ListOperations Sample", + "description": "ListOperations is a utility method from google.longrunning.Operations.", + "file": "NotebookClient/ListOperations/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ListOperations", + "fullName": "google.cloud.notebooks.v2.NotebookClient.ListOperations", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "longrunningpb.ListOperationsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "OperationIterator", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "ListOperations", + "fullName": "google.longrunning.Operations.ListOperations", + "service": { + "shortName": "Operations", + "fullName": "google.longrunning.Operations" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 60, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_ResetInstance_sync", + "title": "notebooks ResetInstance Sample", + "description": "ResetInstance resets a notebook instance.", + "file": "NotebookClient/ResetInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "ResetInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.ResetInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.ResetInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "ResetInstanceOperation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "ResetInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.ResetInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_RollbackInstance_sync", + "title": "notebooks RollbackInstance Sample", + "description": "RollbackInstance rollbacks a notebook instance to the previous version.", + "file": "NotebookClient/RollbackInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "RollbackInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.RollbackInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.RollbackInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "RollbackInstanceOperation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "RollbackInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.RollbackInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_SetIamPolicy_sync", + "title": "notebooks SetIamPolicy Sample", + "description": "SetIamPolicy sets the access control policy on the specified resource. Replaces\nany existing policy.\n\nCan return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`\nerrors.", + "file": "NotebookClient/SetIamPolicy/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.notebooks.v2.NotebookClient.SetIamPolicy", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.SetIamPolicyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.Policy", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.iam.v1.IAMPolicy.SetIamPolicy", + "service": { + "shortName": "IAMPolicy", + "fullName": "google.iam.v1.IAMPolicy" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_StartInstance_sync", + "title": "notebooks StartInstance Sample", + "description": "StartInstance starts a notebook instance.", + "file": "NotebookClient/StartInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "StartInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.StartInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.StartInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "StartInstanceOperation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "StartInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.StartInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_StopInstance_sync", + "title": "notebooks StopInstance Sample", + "description": "StopInstance stops a notebook instance.", + "file": "NotebookClient/StopInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "StopInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.StopInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.StopInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "StopInstanceOperation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "StopInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.StopInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_TestIamPermissions_sync", + "title": "notebooks TestIamPermissions Sample", + "description": "TestIamPermissions returns permissions that a caller has on the specified resource. If the\nresource does not exist, this will return an empty set of\npermissions, not a `NOT_FOUND` error.\n\nNote: This operation is designed to be used for building\npermission-aware UIs and command-line tools, not for authorization\nchecking. This operation may \"fail open\" without warning.", + "file": "NotebookClient/TestIamPermissions/main.go", + "language": "GO", + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.notebooks.v2.NotebookClient.TestIamPermissions", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "iampb.TestIamPermissionsRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "*iampb.TestIamPermissionsResponse", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.iam.v1.IAMPolicy.TestIamPermissions", + "service": { + "shortName": "IAMPolicy", + "fullName": "google.iam.v1.IAMPolicy" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 53, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_UpdateInstance_sync", + "title": "notebooks UpdateInstance Sample", + "description": "UpdateInstance updateInstance updates an Instance.", + "file": "NotebookClient/UpdateInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.UpdateInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.UpdateInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "UpdateInstanceOperation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "UpdateInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.UpdateInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + }, + { + "regionTag": "notebooks_v2_generated_NotebookService_UpgradeInstance_sync", + "title": "notebooks UpgradeInstance Sample", + "description": "UpgradeInstance upgrades a notebook instance to the latest version.", + "file": "NotebookClient/UpgradeInstance/main.go", + "language": "GO", + "clientMethod": { + "shortName": "UpgradeInstance", + "fullName": "google.cloud.notebooks.v2.NotebookClient.UpgradeInstance", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "notebookspb.UpgradeInstanceRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "UpgradeInstanceOperation", + "client": { + "shortName": "NotebookClient", + "fullName": "google.cloud.notebooks.v2.NotebookClient" + }, + "method": { + "shortName": "UpgradeInstance", + "fullName": "google.cloud.notebooks.v2.NotebookService.UpgradeInstance", + "service": { + "shortName": "NotebookService", + "fullName": "google.cloud.notebooks.v2.NotebookService" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 58, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/internal/generated/snippets/policytroubleshooter/apiv1/snippet_metadata.google.cloud.policytroubleshooter.v1.json b/internal/generated/snippets/policytroubleshooter/apiv1/snippet_metadata.google.cloud.policytroubleshooter.v1.json index 169ff036bdd7..4b264b498c1d 100644 --- a/internal/generated/snippets/policytroubleshooter/apiv1/snippet_metadata.google.cloud.policytroubleshooter.v1.json +++ b/internal/generated/snippets/policytroubleshooter/apiv1/snippet_metadata.google.cloud.policytroubleshooter.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/policytroubleshooter/apiv1", - "version": "1.8.0", + "version": "1.9.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/policytroubleshooter/iam/apiv3/snippet_metadata.google.cloud.policytroubleshooter.iam.v3.json b/internal/generated/snippets/policytroubleshooter/iam/apiv3/snippet_metadata.google.cloud.policytroubleshooter.iam.v3.json index c82a95bcfedf..21caa03692f1 100644 --- a/internal/generated/snippets/policytroubleshooter/iam/apiv3/snippet_metadata.google.cloud.policytroubleshooter.iam.v3.json +++ b/internal/generated/snippets/policytroubleshooter/iam/apiv3/snippet_metadata.google.cloud.policytroubleshooter.iam.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/policytroubleshooter/iam/apiv3", - "version": "1.8.0", + "version": "1.9.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/spanner/admin/database/apiv1/snippet_metadata.google.spanner.admin.database.v1.json b/internal/generated/snippets/spanner/admin/database/apiv1/snippet_metadata.google.spanner.admin.database.v1.json index 348e5abd745b..e9f03c10e4ce 100644 --- a/internal/generated/snippets/spanner/admin/database/apiv1/snippet_metadata.google.spanner.admin.database.v1.json +++ b/internal/generated/snippets/spanner/admin/database/apiv1/snippet_metadata.google.spanner.admin.database.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/spanner/admin/database/apiv1", - "version": "1.47.0", + "version": "1.48.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/spanner/admin/instance/apiv1/snippet_metadata.google.spanner.admin.instance.v1.json b/internal/generated/snippets/spanner/admin/instance/apiv1/snippet_metadata.google.spanner.admin.instance.v1.json index 766248929ec9..94b71525903d 100644 --- a/internal/generated/snippets/spanner/admin/instance/apiv1/snippet_metadata.google.spanner.admin.instance.v1.json +++ b/internal/generated/snippets/spanner/admin/instance/apiv1/snippet_metadata.google.spanner.admin.instance.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/spanner/admin/instance/apiv1", - "version": "1.47.0", + "version": "1.48.0", "language": "GO", "apis": [ { diff --git a/internal/generated/snippets/spanner/apiv1/snippet_metadata.google.spanner.v1.json b/internal/generated/snippets/spanner/apiv1/snippet_metadata.google.spanner.v1.json index d494f1958af2..ed8b13a4a243 100644 --- a/internal/generated/snippets/spanner/apiv1/snippet_metadata.google.spanner.v1.json +++ b/internal/generated/snippets/spanner/apiv1/snippet_metadata.google.spanner.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "cloud.google.com/go/spanner/apiv1", - "version": "1.47.0", + "version": "1.48.0", "language": "GO", "apis": [ { diff --git a/notebooks/apiv2/doc.go b/notebooks/apiv2/doc.go new file mode 100755 index 000000000000..04bede54b9e2 --- /dev/null +++ b/notebooks/apiv2/doc.go @@ -0,0 +1,129 @@ +// Copyright 2023 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 notebooks is an auto-generated package for the +// Notebooks API. +// +// Notebooks API is used to manage notebook resources in Google Cloud. +// +// 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. +// +// 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 := notebooks.NewNotebookClient(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. +// +// 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 := notebooks.NewNotebookClient(ctx) +// if err != nil { +// // TODO: Handle error. +// } +// defer c.Close() +// +// req := ¬ebookspb.ListInstancesRequest{ +// // TODO: Fill request struct fields. +// // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#ListInstancesRequest. +// } +// it := c.ListInstances(ctx, req) +// for { +// resp, err := it.Next() +// if err == iterator.Done { +// break +// } +// if err != nil { +// // TODO: Handle error. +// } +// // TODO: Use resp. +// _ = resp +// } +// +// # Use of Context +// +// The ctx passed to NewNotebookClient 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 notebooks // import "cloud.google.com/go/notebooks/apiv2" + +import ( + "context" + + "google.golang.org/api/option" +) + +// 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", + } +} diff --git a/notebooks/apiv2/gapic_metadata.json b/notebooks/apiv2/gapic_metadata.json new file mode 100644 index 000000000000..78fc55d0ceac --- /dev/null +++ b/notebooks/apiv2/gapic_metadata.json @@ -0,0 +1,233 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods.", + "language": "go", + "protoPackage": "google.cloud.notebooks.v2", + "libraryPackage": "cloud.google.com/go/notebooks/apiv2", + "services": { + "NotebookService": { + "clients": { + "grpc": { + "libraryClient": "NotebookClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CheckInstanceUpgradability": { + "methods": [ + "CheckInstanceUpgradability" + ] + }, + "CreateInstance": { + "methods": [ + "CreateInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "DeleteInstance" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "DiagnoseInstance": { + "methods": [ + "DiagnoseInstance" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetInstance": { + "methods": [ + "GetInstance" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListInstances": { + "methods": [ + "ListInstances" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ResetInstance": { + "methods": [ + "ResetInstance" + ] + }, + "RollbackInstance": { + "methods": [ + "RollbackInstance" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "StartInstance": { + "methods": [ + "StartInstance" + ] + }, + "StopInstance": { + "methods": [ + "StopInstance" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateInstance": { + "methods": [ + "UpdateInstance" + ] + }, + "UpgradeInstance": { + "methods": [ + "UpgradeInstance" + ] + } + } + }, + "rest": { + "libraryClient": "NotebookClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "CancelOperation" + ] + }, + "CheckInstanceUpgradability": { + "methods": [ + "CheckInstanceUpgradability" + ] + }, + "CreateInstance": { + "methods": [ + "CreateInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "DeleteInstance" + ] + }, + "DeleteOperation": { + "methods": [ + "DeleteOperation" + ] + }, + "DiagnoseInstance": { + "methods": [ + "DiagnoseInstance" + ] + }, + "GetIamPolicy": { + "methods": [ + "GetIamPolicy" + ] + }, + "GetInstance": { + "methods": [ + "GetInstance" + ] + }, + "GetLocation": { + "methods": [ + "GetLocation" + ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, + "ListInstances": { + "methods": [ + "ListInstances" + ] + }, + "ListLocations": { + "methods": [ + "ListLocations" + ] + }, + "ListOperations": { + "methods": [ + "ListOperations" + ] + }, + "ResetInstance": { + "methods": [ + "ResetInstance" + ] + }, + "RollbackInstance": { + "methods": [ + "RollbackInstance" + ] + }, + "SetIamPolicy": { + "methods": [ + "SetIamPolicy" + ] + }, + "StartInstance": { + "methods": [ + "StartInstance" + ] + }, + "StopInstance": { + "methods": [ + "StopInstance" + ] + }, + "TestIamPermissions": { + "methods": [ + "TestIamPermissions" + ] + }, + "UpdateInstance": { + "methods": [ + "UpdateInstance" + ] + }, + "UpgradeInstance": { + "methods": [ + "UpgradeInstance" + ] + } + } + } + } + } + } +} diff --git a/notebooks/apiv2/notebook_client.go b/notebooks/apiv2/notebook_client.go new file mode 100755 index 000000000000..99fc2c8c9d27 --- /dev/null +++ b/notebooks/apiv2/notebook_client.go @@ -0,0 +1,3484 @@ +// Copyright 2023 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 notebooks + +import ( + "bytes" + "context" + "fmt" + "io" + "math" + "net/http" + "net/url" + "time" + + iampb "cloud.google.com/go/iam/apiv1/iampb" + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/googleapi" + "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/grpc/codes" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" +) + +var newNotebookClientHook clientHook + +// NotebookCallOptions contains the retry settings for each method of NotebookClient. +type NotebookCallOptions struct { + ListInstances []gax.CallOption + GetInstance []gax.CallOption + CreateInstance []gax.CallOption + UpdateInstance []gax.CallOption + DeleteInstance []gax.CallOption + StartInstance []gax.CallOption + StopInstance []gax.CallOption + ResetInstance []gax.CallOption + CheckInstanceUpgradability []gax.CallOption + UpgradeInstance []gax.CallOption + RollbackInstance []gax.CallOption + DiagnoseInstance []gax.CallOption + GetLocation []gax.CallOption + ListLocations []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + CancelOperation []gax.CallOption + DeleteOperation []gax.CallOption + GetOperation []gax.CallOption + ListOperations []gax.CallOption +} + +func defaultNotebookGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("notebooks.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("notebooks.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://notebooks.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultNotebookCallOptions() *NotebookCallOptions { + return &NotebookCallOptions{ + ListInstances: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + GetInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + CreateInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + UpdateInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + StartInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + StopInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + ResetInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + CheckInstanceUpgradability: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpgradeInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + RollbackInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + DiagnoseInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.DeadlineExceeded, + }, gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 300000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + } +} + +func defaultNotebookRESTCallOptions() *NotebookCallOptions { + return &NotebookCallOptions{ + ListInstances: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + GetInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + CreateInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + UpdateInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + DeleteInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + StartInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + StopInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + ResetInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + CheckInstanceUpgradability: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + UpgradeInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + RollbackInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + }, + DiagnoseInstance: []gax.CallOption{ + gax.WithTimeout(60000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable) + }), + }, + GetLocation: []gax.CallOption{}, + ListLocations: []gax.CallOption{}, + GetIamPolicy: []gax.CallOption{}, + SetIamPolicy: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + CancelOperation: []gax.CallOption{}, + DeleteOperation: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, + ListOperations: []gax.CallOption{ + gax.WithTimeout(300000 * time.Millisecond), + gax.WithRetry(func() gax.Retryer { + return gax.OnHTTPCodes(gax.Backoff{ + Initial: 100 * time.Millisecond, + Max: 300000 * time.Millisecond, + Multiplier: 1.30, + }, + http.StatusServiceUnavailable, + http.StatusGatewayTimeout) + }), + }, + } +} + +// internalNotebookClient is an interface that defines the methods available from Notebooks API. +type internalNotebookClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + ListInstances(context.Context, *notebookspb.ListInstancesRequest, ...gax.CallOption) *InstanceIterator + GetInstance(context.Context, *notebookspb.GetInstanceRequest, ...gax.CallOption) (*notebookspb.Instance, error) + CreateInstance(context.Context, *notebookspb.CreateInstanceRequest, ...gax.CallOption) (*CreateInstanceOperation, error) + CreateInstanceOperation(name string) *CreateInstanceOperation + UpdateInstance(context.Context, *notebookspb.UpdateInstanceRequest, ...gax.CallOption) (*UpdateInstanceOperation, error) + UpdateInstanceOperation(name string) *UpdateInstanceOperation + DeleteInstance(context.Context, *notebookspb.DeleteInstanceRequest, ...gax.CallOption) (*DeleteInstanceOperation, error) + DeleteInstanceOperation(name string) *DeleteInstanceOperation + StartInstance(context.Context, *notebookspb.StartInstanceRequest, ...gax.CallOption) (*StartInstanceOperation, error) + StartInstanceOperation(name string) *StartInstanceOperation + StopInstance(context.Context, *notebookspb.StopInstanceRequest, ...gax.CallOption) (*StopInstanceOperation, error) + StopInstanceOperation(name string) *StopInstanceOperation + ResetInstance(context.Context, *notebookspb.ResetInstanceRequest, ...gax.CallOption) (*ResetInstanceOperation, error) + ResetInstanceOperation(name string) *ResetInstanceOperation + CheckInstanceUpgradability(context.Context, *notebookspb.CheckInstanceUpgradabilityRequest, ...gax.CallOption) (*notebookspb.CheckInstanceUpgradabilityResponse, error) + UpgradeInstance(context.Context, *notebookspb.UpgradeInstanceRequest, ...gax.CallOption) (*UpgradeInstanceOperation, error) + UpgradeInstanceOperation(name string) *UpgradeInstanceOperation + RollbackInstance(context.Context, *notebookspb.RollbackInstanceRequest, ...gax.CallOption) (*RollbackInstanceOperation, error) + RollbackInstanceOperation(name string) *RollbackInstanceOperation + DiagnoseInstance(context.Context, *notebookspb.DiagnoseInstanceRequest, ...gax.CallOption) (*DiagnoseInstanceOperation, error) + DiagnoseInstanceOperation(name string) *DiagnoseInstanceOperation + GetLocation(context.Context, *locationpb.GetLocationRequest, ...gax.CallOption) (*locationpb.Location, error) + ListLocations(context.Context, *locationpb.ListLocationsRequest, ...gax.CallOption) *LocationIterator + GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) + TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + CancelOperation(context.Context, *longrunningpb.CancelOperationRequest, ...gax.CallOption) error + DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest, ...gax.CallOption) error + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) + ListOperations(context.Context, *longrunningpb.ListOperationsRequest, ...gax.CallOption) *OperationIterator +} + +// NotebookClient is a client for interacting with Notebooks API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// API v2 service for Workbench Notebooks Instances. +type NotebookClient struct { + // The internal transport-dependent client. + internalClient internalNotebookClient + + // The call options for this service. + CallOptions *NotebookCallOptions + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient *lroauto.OperationsClient +} + +// 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 *NotebookClient) 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 *NotebookClient) 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 *NotebookClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// ListInstances lists instances in a given project and location. +func (c *NotebookClient) ListInstances(ctx context.Context, req *notebookspb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator { + return c.internalClient.ListInstances(ctx, req, opts...) +} + +// GetInstance gets details of a single Instance. +func (c *NotebookClient) GetInstance(ctx context.Context, req *notebookspb.GetInstanceRequest, opts ...gax.CallOption) (*notebookspb.Instance, error) { + return c.internalClient.GetInstance(ctx, req, opts...) +} + +// CreateInstance creates a new Instance in a given project and location. +func (c *NotebookClient) CreateInstance(ctx context.Context, req *notebookspb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error) { + return c.internalClient.CreateInstance(ctx, req, opts...) +} + +// CreateInstanceOperation returns a new CreateInstanceOperation from a given name. +// The name must be that of a previously created CreateInstanceOperation, possibly from a different process. +func (c *NotebookClient) CreateInstanceOperation(name string) *CreateInstanceOperation { + return c.internalClient.CreateInstanceOperation(name) +} + +// UpdateInstance updateInstance updates an Instance. +func (c *NotebookClient) UpdateInstance(ctx context.Context, req *notebookspb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) { + return c.internalClient.UpdateInstance(ctx, req, opts...) +} + +// UpdateInstanceOperation returns a new UpdateInstanceOperation from a given name. +// The name must be that of a previously created UpdateInstanceOperation, possibly from a different process. +func (c *NotebookClient) UpdateInstanceOperation(name string) *UpdateInstanceOperation { + return c.internalClient.UpdateInstanceOperation(name) +} + +// DeleteInstance deletes a single Instance. +func (c *NotebookClient) DeleteInstance(ctx context.Context, req *notebookspb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error) { + return c.internalClient.DeleteInstance(ctx, req, opts...) +} + +// DeleteInstanceOperation returns a new DeleteInstanceOperation from a given name. +// The name must be that of a previously created DeleteInstanceOperation, possibly from a different process. +func (c *NotebookClient) DeleteInstanceOperation(name string) *DeleteInstanceOperation { + return c.internalClient.DeleteInstanceOperation(name) +} + +// StartInstance starts a notebook instance. +func (c *NotebookClient) StartInstance(ctx context.Context, req *notebookspb.StartInstanceRequest, opts ...gax.CallOption) (*StartInstanceOperation, error) { + return c.internalClient.StartInstance(ctx, req, opts...) +} + +// StartInstanceOperation returns a new StartInstanceOperation from a given name. +// The name must be that of a previously created StartInstanceOperation, possibly from a different process. +func (c *NotebookClient) StartInstanceOperation(name string) *StartInstanceOperation { + return c.internalClient.StartInstanceOperation(name) +} + +// StopInstance stops a notebook instance. +func (c *NotebookClient) StopInstance(ctx context.Context, req *notebookspb.StopInstanceRequest, opts ...gax.CallOption) (*StopInstanceOperation, error) { + return c.internalClient.StopInstance(ctx, req, opts...) +} + +// StopInstanceOperation returns a new StopInstanceOperation from a given name. +// The name must be that of a previously created StopInstanceOperation, possibly from a different process. +func (c *NotebookClient) StopInstanceOperation(name string) *StopInstanceOperation { + return c.internalClient.StopInstanceOperation(name) +} + +// ResetInstance resets a notebook instance. +func (c *NotebookClient) ResetInstance(ctx context.Context, req *notebookspb.ResetInstanceRequest, opts ...gax.CallOption) (*ResetInstanceOperation, error) { + return c.internalClient.ResetInstance(ctx, req, opts...) +} + +// ResetInstanceOperation returns a new ResetInstanceOperation from a given name. +// The name must be that of a previously created ResetInstanceOperation, possibly from a different process. +func (c *NotebookClient) ResetInstanceOperation(name string) *ResetInstanceOperation { + return c.internalClient.ResetInstanceOperation(name) +} + +// CheckInstanceUpgradability checks whether a notebook instance is upgradable. +func (c *NotebookClient) CheckInstanceUpgradability(ctx context.Context, req *notebookspb.CheckInstanceUpgradabilityRequest, opts ...gax.CallOption) (*notebookspb.CheckInstanceUpgradabilityResponse, error) { + return c.internalClient.CheckInstanceUpgradability(ctx, req, opts...) +} + +// UpgradeInstance upgrades a notebook instance to the latest version. +func (c *NotebookClient) UpgradeInstance(ctx context.Context, req *notebookspb.UpgradeInstanceRequest, opts ...gax.CallOption) (*UpgradeInstanceOperation, error) { + return c.internalClient.UpgradeInstance(ctx, req, opts...) +} + +// UpgradeInstanceOperation returns a new UpgradeInstanceOperation from a given name. +// The name must be that of a previously created UpgradeInstanceOperation, possibly from a different process. +func (c *NotebookClient) UpgradeInstanceOperation(name string) *UpgradeInstanceOperation { + return c.internalClient.UpgradeInstanceOperation(name) +} + +// RollbackInstance rollbacks a notebook instance to the previous version. +func (c *NotebookClient) RollbackInstance(ctx context.Context, req *notebookspb.RollbackInstanceRequest, opts ...gax.CallOption) (*RollbackInstanceOperation, error) { + return c.internalClient.RollbackInstance(ctx, req, opts...) +} + +// RollbackInstanceOperation returns a new RollbackInstanceOperation from a given name. +// The name must be that of a previously created RollbackInstanceOperation, possibly from a different process. +func (c *NotebookClient) RollbackInstanceOperation(name string) *RollbackInstanceOperation { + return c.internalClient.RollbackInstanceOperation(name) +} + +// DiagnoseInstance creates a Diagnostic File and runs Diagnostic Tool given an Instance. +func (c *NotebookClient) DiagnoseInstance(ctx context.Context, req *notebookspb.DiagnoseInstanceRequest, opts ...gax.CallOption) (*DiagnoseInstanceOperation, error) { + return c.internalClient.DiagnoseInstance(ctx, req, opts...) +} + +// DiagnoseInstanceOperation returns a new DiagnoseInstanceOperation from a given name. +// The name must be that of a previously created DiagnoseInstanceOperation, possibly from a different process. +func (c *NotebookClient) DiagnoseInstanceOperation(name string) *DiagnoseInstanceOperation { + return c.internalClient.DiagnoseInstanceOperation(name) +} + +// GetLocation gets information about a location. +func (c *NotebookClient) 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 *NotebookClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator { + return c.internalClient.ListLocations(ctx, req, opts...) +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *NotebookClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.GetIamPolicy(ctx, req, opts...) +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *NotebookClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + return c.internalClient.SetIamPolicy(ctx, req, opts...) +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *NotebookClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + return c.internalClient.TestIamPermissions(ctx, req, opts...) +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *NotebookClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.CancelOperation(ctx, req, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *NotebookClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + return c.internalClient.DeleteOperation(ctx, req, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *NotebookClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *NotebookClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + return c.internalClient.ListOperations(ctx, req, opts...) +} + +// notebookGRPCClient is a client for interacting with Notebooks API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type notebookGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // Points back to the CallOptions field of the containing NotebookClient + CallOptions **NotebookCallOptions + + // The gRPC API client. + notebookClient notebookspb.NotebookServiceClient + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + operationsClient longrunningpb.OperationsClient + + iamPolicyClient iampb.IAMPolicyClient + + locationsClient locationpb.LocationsClient + + // The x-goog-* metadata to be sent with each request. + xGoogHeaders []string +} + +// NewNotebookClient creates a new notebook service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// API v2 service for Workbench Notebooks Instances. +func NewNotebookClient(ctx context.Context, opts ...option.ClientOption) (*NotebookClient, error) { + clientOpts := defaultNotebookGRPCClientOptions() + if newNotebookClientHook != nil { + hookOpts, err := newNotebookClientHook(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 := NotebookClient{CallOptions: defaultNotebookCallOptions()} + + c := ¬ebookGRPCClient{ + connPool: connPool, + notebookClient: notebookspb.NewNotebookServiceClient(connPool), + CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), + iamPolicyClient: iampb.NewIAMPolicyClient(connPool), + locationsClient: locationpb.NewLocationsClient(connPool), + } + c.setGoogleClientInfo() + + client.internalClient = c + + client.LROClient, err = lroauto.NewOperationsClient(ctx, gtransport.WithConnPool(connPool)) + if err != nil { + // This error "should not happen", since we are just reusing old connection pool + // and never actually need to dial. + // If this does happen, we could leak connp. However, we cannot close conn: + // If the user invoked the constructor with option.WithGRPCConn, + // we would close a connection that's still in use. + // TODO: investigate error conditions. + return nil, err + } + c.LROClient = &client.LROClient + 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 *notebookGRPCClient) 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 *notebookGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "grpc", grpc.Version) + 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 *notebookGRPCClient) Close() error { + return c.connPool.Close() +} + +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type notebookRESTClient struct { + // The http endpoint to connect to. + endpoint string + + // The http client. + httpClient *http.Client + + // LROClient is used internally to handle long-running operations. + // It is exposed so that its CallOptions can be modified if required. + // Users should not Close this client. + LROClient **lroauto.OperationsClient + + // The x-goog-* headers to be sent with each request. + xGoogHeaders []string + + // Points back to the CallOptions field of the containing NotebookClient + CallOptions **NotebookCallOptions +} + +// NewNotebookRESTClient creates a new notebook service rest client. +// +// API v2 service for Workbench Notebooks Instances. +func NewNotebookRESTClient(ctx context.Context, opts ...option.ClientOption) (*NotebookClient, error) { + clientOpts := append(defaultNotebookRESTClientOptions(), opts...) + httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) + if err != nil { + return nil, err + } + + callOpts := defaultNotebookRESTCallOptions() + c := ¬ebookRESTClient{ + endpoint: endpoint, + httpClient: httpClient, + CallOptions: &callOpts, + } + c.setGoogleClientInfo() + + lroOpts := []option.ClientOption{ + option.WithHTTPClient(httpClient), + option.WithEndpoint(endpoint), + } + opClient, err := lroauto.NewOperationsRESTClient(ctx, lroOpts...) + if err != nil { + return nil, err + } + c.LROClient = &opClient + + return &NotebookClient{internalClient: c, CallOptions: callOpts}, nil +} + +func defaultNotebookRESTClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("https://notebooks.googleapis.com"), + internaloption.WithDefaultMTLSEndpoint("https://notebooks.mtls.googleapis.com"), + internaloption.WithDefaultAudience("https://notebooks.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + } +} + +// 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 *notebookRESTClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", gax.GoVersion}, keyval...) + kv = append(kv, "gapic", getVersionClient(), "gax", gax.Version, "rest", "UNKNOWN") + 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 *notebookRESTClient) 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 *notebookRESTClient) Connection() *grpc.ClientConn { + return nil +} +func (c *notebookGRPCClient) ListInstances(ctx context.Context, req *notebookspb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator { + 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).ListInstances[0:len((*c.CallOptions).ListInstances):len((*c.CallOptions).ListInstances)], opts...) + it := &InstanceIterator{} + req = proto.Clone(req).(*notebookspb.ListInstancesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*notebookspb.Instance, string, error) { + resp := ¬ebookspb.ListInstancesResponse{} + 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 = c.notebookClient.ListInstances(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetInstances(), 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 *notebookGRPCClient) GetInstance(ctx context.Context, req *notebookspb.GetInstanceRequest, opts ...gax.CallOption) (*notebookspb.Instance, 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).GetInstance[0:len((*c.CallOptions).GetInstance):len((*c.CallOptions).GetInstance)], opts...) + var resp *notebookspb.Instance + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.GetInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *notebookGRPCClient) CreateInstance(ctx context.Context, req *notebookspb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error) { + 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).CreateInstance[0:len((*c.CallOptions).CreateInstance):len((*c.CallOptions).CreateInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.CreateInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *notebookGRPCClient) UpdateInstance(ctx context.Context, req *notebookspb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "instance.name", url.QueryEscape(req.GetInstance().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).UpdateInstance[0:len((*c.CallOptions).UpdateInstance):len((*c.CallOptions).UpdateInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.UpdateInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &UpdateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *notebookGRPCClient) DeleteInstance(ctx context.Context, req *notebookspb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, 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).DeleteInstance[0:len((*c.CallOptions).DeleteInstance):len((*c.CallOptions).DeleteInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.DeleteInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *notebookGRPCClient) StartInstance(ctx context.Context, req *notebookspb.StartInstanceRequest, opts ...gax.CallOption) (*StartInstanceOperation, 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).StartInstance[0:len((*c.CallOptions).StartInstance):len((*c.CallOptions).StartInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.StartInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &StartInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *notebookGRPCClient) StopInstance(ctx context.Context, req *notebookspb.StopInstanceRequest, opts ...gax.CallOption) (*StopInstanceOperation, 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).StopInstance[0:len((*c.CallOptions).StopInstance):len((*c.CallOptions).StopInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.StopInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &StopInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *notebookGRPCClient) ResetInstance(ctx context.Context, req *notebookspb.ResetInstanceRequest, opts ...gax.CallOption) (*ResetInstanceOperation, 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).ResetInstance[0:len((*c.CallOptions).ResetInstance):len((*c.CallOptions).ResetInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.ResetInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ResetInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *notebookGRPCClient) CheckInstanceUpgradability(ctx context.Context, req *notebookspb.CheckInstanceUpgradabilityRequest, opts ...gax.CallOption) (*notebookspb.CheckInstanceUpgradabilityResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "notebook_instance", url.QueryEscape(req.GetNotebookInstance()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).CheckInstanceUpgradability[0:len((*c.CallOptions).CheckInstanceUpgradability):len((*c.CallOptions).CheckInstanceUpgradability)], opts...) + var resp *notebookspb.CheckInstanceUpgradabilityResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.CheckInstanceUpgradability(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *notebookGRPCClient) UpgradeInstance(ctx context.Context, req *notebookspb.UpgradeInstanceRequest, opts ...gax.CallOption) (*UpgradeInstanceOperation, 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).UpgradeInstance[0:len((*c.CallOptions).UpgradeInstance):len((*c.CallOptions).UpgradeInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.UpgradeInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &UpgradeInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *notebookGRPCClient) RollbackInstance(ctx context.Context, req *notebookspb.RollbackInstanceRequest, opts ...gax.CallOption) (*RollbackInstanceOperation, 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).RollbackInstance[0:len((*c.CallOptions).RollbackInstance):len((*c.CallOptions).RollbackInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.RollbackInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &RollbackInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *notebookGRPCClient) DiagnoseInstance(ctx context.Context, req *notebookspb.DiagnoseInstanceRequest, opts ...gax.CallOption) (*DiagnoseInstanceOperation, 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).DiagnoseInstance[0:len((*c.CallOptions).DiagnoseInstance):len((*c.CallOptions).DiagnoseInstance)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.notebookClient.DiagnoseInstance(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DiagnoseInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *notebookGRPCClient) 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 = c.locationsClient.GetLocation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *notebookGRPCClient) 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 = c.locationsClient.ListLocations(ctx, req, settings.GRPC...) + 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 +} + +func (c *notebookGRPCClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *notebookGRPCClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *notebookGRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + ctx = gax.InsertMetadataIntoOutgoingContext(ctx, hds...) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.iamPolicyClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *notebookGRPCClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) 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).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *notebookGRPCClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) 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).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +func (c *notebookGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, 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).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *notebookGRPCClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + 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).ListOperations[0:len((*c.CallOptions).ListOperations):len((*c.CallOptions).ListOperations)], opts...) + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + 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 = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetOperations(), 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 +} + +// ListInstances lists instances in a given project and location. +func (c *notebookRESTClient) ListInstances(ctx context.Context, req *notebookspb.ListInstancesRequest, opts ...gax.CallOption) *InstanceIterator { + it := &InstanceIterator{} + req = proto.Clone(req).(*notebookspb.ListInstancesRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*notebookspb.Instance, string, error) { + resp := ¬ebookspb.ListInstancesResponse{} + 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("/v2/%v/instances", 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 + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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.GetInstances(), 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 +} + +// GetInstance gets details of a single Instance. +func (c *notebookRESTClient) GetInstance(ctx context.Context, req *notebookspb.GetInstanceRequest, opts ...gax.CallOption) (*notebookspb.Instance, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%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).GetInstance[0:len((*c.CallOptions).GetInstance):len((*c.CallOptions).GetInstance)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := ¬ebookspb.Instance{} + 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 + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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 +} + +// CreateInstance creates a new Instance in a given project and location. +func (c *notebookRESTClient) CreateInstance(ctx context.Context, req *notebookspb.CreateInstanceRequest, opts ...gax.CallOption) (*CreateInstanceOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetInstance() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v/instances", req.GetParent()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + params.Add("instanceId", fmt.Sprintf("%v", req.GetInstanceId())) + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2/%s", resp.GetName()) + return &CreateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// UpdateInstance updateInstance updates an Instance. +func (c *notebookRESTClient) UpdateInstance(ctx context.Context, req *notebookspb.UpdateInstanceRequest, opts ...gax.CallOption) (*UpdateInstanceOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + body := req.GetInstance() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v", req.GetInstance().GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + if req.GetUpdateMask() != nil { + updateMask, err := protojson.Marshal(req.GetUpdateMask()) + if err != nil { + return nil, err + } + params.Add("updateMask", string(updateMask[1:len(updateMask)-1])) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "instance.name", url.QueryEscape(req.GetInstance().GetName()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("PATCH", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2/%s", resp.GetName()) + return &UpdateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DeleteInstance deletes a single Instance. +func (c *notebookRESTClient) DeleteInstance(ctx context.Context, req *notebookspb.DeleteInstanceRequest, opts ...gax.CallOption) (*DeleteInstanceOperation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v", req.GetName()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetRequestId() != "" { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + 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...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2/%s", resp.GetName()) + return &DeleteInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// StartInstance starts a notebook instance. +func (c *notebookRESTClient) StartInstance(ctx context.Context, req *notebookspb.StartInstanceRequest, opts ...gax.CallOption) (*StartInstanceOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:start", 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...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2/%s", resp.GetName()) + return &StartInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// StopInstance stops a notebook instance. +func (c *notebookRESTClient) StopInstance(ctx context.Context, req *notebookspb.StopInstanceRequest, opts ...gax.CallOption) (*StopInstanceOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:stop", 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...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2/%s", resp.GetName()) + return &StopInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// ResetInstance resets a notebook instance. +func (c *notebookRESTClient) ResetInstance(ctx context.Context, req *notebookspb.ResetInstanceRequest, opts ...gax.CallOption) (*ResetInstanceOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:reset", 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...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2/%s", resp.GetName()) + return &ResetInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// CheckInstanceUpgradability checks whether a notebook instance is upgradable. +func (c *notebookRESTClient) CheckInstanceUpgradability(ctx context.Context, req *notebookspb.CheckInstanceUpgradabilityRequest, opts ...gax.CallOption) (*notebookspb.CheckInstanceUpgradabilityResponse, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:checkUpgradability", req.GetNotebookInstance()) + + 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", "notebook_instance", url.QueryEscape(req.GetNotebookInstance()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).CheckInstanceUpgradability[0:len((*c.CallOptions).CheckInstanceUpgradability):len((*c.CallOptions).CheckInstanceUpgradability)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := ¬ebookspb.CheckInstanceUpgradabilityResponse{} + 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 + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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 +} + +// UpgradeInstance upgrades a notebook instance to the latest version. +func (c *notebookRESTClient) UpgradeInstance(ctx context.Context, req *notebookspb.UpgradeInstanceRequest, opts ...gax.CallOption) (*UpgradeInstanceOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:upgrade", 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...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2/%s", resp.GetName()) + return &UpgradeInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// RollbackInstance rollbacks a notebook instance to the previous version. +func (c *notebookRESTClient) RollbackInstance(ctx context.Context, req *notebookspb.RollbackInstanceRequest, opts ...gax.CallOption) (*RollbackInstanceOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:rollback", 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...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2/%s", resp.GetName()) + return &RollbackInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// DiagnoseInstance creates a Diagnostic File and runs Diagnostic Tool given an Instance. +func (c *notebookRESTClient) DiagnoseInstance(ctx context.Context, req *notebookspb.DiagnoseInstanceRequest, opts ...gax.CallOption) (*DiagnoseInstanceOperation, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:diagnose", 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...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return err + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + + override := fmt.Sprintf("/v2/%s", resp.GetName()) + return &DiagnoseInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + pollPath: override, + }, nil +} + +// GetLocation gets information about a location. +func (c *notebookRESTClient) 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("/v2/%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 + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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 *notebookRESTClient) 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("/v2/%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 + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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 +} + +// GetIamPolicy gets the access control policy for a resource. Returns an empty policy +// if the resource exists and does not have a policy set. +func (c *notebookRESTClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:getIamPolicy", req.GetResource()) + + params := url.Values{} + params.Add("$alt", "json;enum-encoding=int") + if req.GetOptions().GetRequestedPolicyVersion() != 0 { + params.Add("options.requestedPolicyVersion", fmt.Sprintf("%v", req.GetOptions().GetRequestedPolicyVersion())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).GetIamPolicy[0:len((*c.CallOptions).GetIamPolicy):len((*c.CallOptions).GetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + 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 + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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 +} + +// SetIamPolicy sets the access control policy on the specified resource. Replaces +// any existing policy. +// +// Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED +// errors. +func (c *notebookRESTClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:setIamPolicy", req.GetResource()) + + 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", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).SetIamPolicy[0:len((*c.CallOptions).SetIamPolicy):len((*c.CallOptions).SetIamPolicy)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.Policy{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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 +} + +// TestIamPermissions returns permissions that a caller has on the specified resource. If the +// resource does not exist, this will return an empty set of +// permissions, not a NOT_FOUND error. +// +// Note: This operation is designed to be used for building +// permission-aware UIs and command-line tools, not for authorization +// checking. This operation may “fail open” without warning. +func (c *notebookRESTClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:testIamPermissions", req.GetResource()) + + 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", "resource", url.QueryEscape(req.GetResource()))} + + hds = append(c.xGoogHeaders, hds...) + hds = append(hds, "Content-Type", "application/json") + headers := gax.BuildHeaders(ctx, hds...) + opts = append((*c.CallOptions).TestIamPermissions[0:len((*c.CallOptions).TestIamPermissions):len((*c.CallOptions).TestIamPermissions)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &iampb.TestIamPermissionsResponse{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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 +} + +// CancelOperation is a utility method from google.longrunning.Operations. +func (c *notebookRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { + m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} + jsonReq, err := m.Marshal(req) + if err != nil { + return err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2/%v:cancel", 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...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// DeleteOperation is a utility method from google.longrunning.Operations. +func (c *notebookRESTClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return err + } + baseUrl.Path += fmt.Sprintf("/v2/%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...) + return gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("DELETE", baseUrl.String(), nil) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + // Returns nil if there is no error, otherwise wraps + // the response code and body into a non-nil error + return googleapi.CheckResponse(httpRsp) + }, opts...) +} + +// GetOperation is a utility method from google.longrunning.Operations. +func (c *notebookRESTClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/v2/%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).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &longrunningpb.Operation{} + 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 + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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 +} + +// ListOperations is a utility method from google.longrunning.Operations. +func (c *notebookRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { + it := &OperationIterator{} + req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + it.InternalFetch = func(pageSize int, pageToken string) ([]*longrunningpb.Operation, string, error) { + resp := &longrunningpb.ListOperationsResponse{} + 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("/v2/%v/operations", 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 + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := io.ReadAll(httpRsp.Body) + 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.GetOperations(), 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 +} + +// CreateInstanceOperation manages a long-running operation from CreateInstance. +type CreateInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// CreateInstanceOperation returns a new CreateInstanceOperation from a given name. +// The name must be that of a previously created CreateInstanceOperation, possibly from a different process. +func (c *notebookGRPCClient) CreateInstanceOperation(name string) *CreateInstanceOperation { + return &CreateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// CreateInstanceOperation returns a new CreateInstanceOperation from a given name. +// The name must be that of a previously created CreateInstanceOperation, possibly from a different process. +func (c *notebookRESTClient) CreateInstanceOperation(name string) *CreateInstanceOperation { + override := fmt.Sprintf("/v2/%s", name) + return &CreateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *CreateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *CreateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *CreateInstanceOperation) Metadata() (*notebookspb.OperationMetadata, error) { + var meta notebookspb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *CreateInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *CreateInstanceOperation) Name() string { + return op.lro.Name() +} + +// DeleteInstanceOperation manages a long-running operation from DeleteInstance. +type DeleteInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DeleteInstanceOperation returns a new DeleteInstanceOperation from a given name. +// The name must be that of a previously created DeleteInstanceOperation, possibly from a different process. +func (c *notebookGRPCClient) DeleteInstanceOperation(name string) *DeleteInstanceOperation { + return &DeleteInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DeleteInstanceOperation returns a new DeleteInstanceOperation from a given name. +// The name must be that of a previously created DeleteInstanceOperation, possibly from a different process. +func (c *notebookRESTClient) DeleteInstanceOperation(name string) *DeleteInstanceOperation { + override := fmt.Sprintf("/v2/%s", name) + return &DeleteInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DeleteInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DeleteInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + return op.lro.Poll(ctx, nil, opts...) +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DeleteInstanceOperation) Metadata() (*notebookspb.OperationMetadata, error) { + var meta notebookspb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DeleteInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DeleteInstanceOperation) Name() string { + return op.lro.Name() +} + +// DiagnoseInstanceOperation manages a long-running operation from DiagnoseInstance. +type DiagnoseInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// DiagnoseInstanceOperation returns a new DiagnoseInstanceOperation from a given name. +// The name must be that of a previously created DiagnoseInstanceOperation, possibly from a different process. +func (c *notebookGRPCClient) DiagnoseInstanceOperation(name string) *DiagnoseInstanceOperation { + return &DiagnoseInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// DiagnoseInstanceOperation returns a new DiagnoseInstanceOperation from a given name. +// The name must be that of a previously created DiagnoseInstanceOperation, possibly from a different process. +func (c *notebookRESTClient) DiagnoseInstanceOperation(name string) *DiagnoseInstanceOperation { + override := fmt.Sprintf("/v2/%s", name) + return &DiagnoseInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *DiagnoseInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *DiagnoseInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *DiagnoseInstanceOperation) Metadata() (*notebookspb.OperationMetadata, error) { + var meta notebookspb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *DiagnoseInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *DiagnoseInstanceOperation) Name() string { + return op.lro.Name() +} + +// ResetInstanceOperation manages a long-running operation from ResetInstance. +type ResetInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// ResetInstanceOperation returns a new ResetInstanceOperation from a given name. +// The name must be that of a previously created ResetInstanceOperation, possibly from a different process. +func (c *notebookGRPCClient) ResetInstanceOperation(name string) *ResetInstanceOperation { + return &ResetInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// ResetInstanceOperation returns a new ResetInstanceOperation from a given name. +// The name must be that of a previously created ResetInstanceOperation, possibly from a different process. +func (c *notebookRESTClient) ResetInstanceOperation(name string) *ResetInstanceOperation { + override := fmt.Sprintf("/v2/%s", name) + return &ResetInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *ResetInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *ResetInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *ResetInstanceOperation) Metadata() (*notebookspb.OperationMetadata, error) { + var meta notebookspb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *ResetInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *ResetInstanceOperation) Name() string { + return op.lro.Name() +} + +// RollbackInstanceOperation manages a long-running operation from RollbackInstance. +type RollbackInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// RollbackInstanceOperation returns a new RollbackInstanceOperation from a given name. +// The name must be that of a previously created RollbackInstanceOperation, possibly from a different process. +func (c *notebookGRPCClient) RollbackInstanceOperation(name string) *RollbackInstanceOperation { + return &RollbackInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// RollbackInstanceOperation returns a new RollbackInstanceOperation from a given name. +// The name must be that of a previously created RollbackInstanceOperation, possibly from a different process. +func (c *notebookRESTClient) RollbackInstanceOperation(name string) *RollbackInstanceOperation { + override := fmt.Sprintf("/v2/%s", name) + return &RollbackInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *RollbackInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *RollbackInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *RollbackInstanceOperation) Metadata() (*notebookspb.OperationMetadata, error) { + var meta notebookspb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *RollbackInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *RollbackInstanceOperation) Name() string { + return op.lro.Name() +} + +// StartInstanceOperation manages a long-running operation from StartInstance. +type StartInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// StartInstanceOperation returns a new StartInstanceOperation from a given name. +// The name must be that of a previously created StartInstanceOperation, possibly from a different process. +func (c *notebookGRPCClient) StartInstanceOperation(name string) *StartInstanceOperation { + return &StartInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// StartInstanceOperation returns a new StartInstanceOperation from a given name. +// The name must be that of a previously created StartInstanceOperation, possibly from a different process. +func (c *notebookRESTClient) StartInstanceOperation(name string) *StartInstanceOperation { + override := fmt.Sprintf("/v2/%s", name) + return &StartInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *StartInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *StartInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *StartInstanceOperation) Metadata() (*notebookspb.OperationMetadata, error) { + var meta notebookspb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *StartInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *StartInstanceOperation) Name() string { + return op.lro.Name() +} + +// StopInstanceOperation manages a long-running operation from StopInstance. +type StopInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// StopInstanceOperation returns a new StopInstanceOperation from a given name. +// The name must be that of a previously created StopInstanceOperation, possibly from a different process. +func (c *notebookGRPCClient) StopInstanceOperation(name string) *StopInstanceOperation { + return &StopInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// StopInstanceOperation returns a new StopInstanceOperation from a given name. +// The name must be that of a previously created StopInstanceOperation, possibly from a different process. +func (c *notebookRESTClient) StopInstanceOperation(name string) *StopInstanceOperation { + override := fmt.Sprintf("/v2/%s", name) + return &StopInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *StopInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *StopInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *StopInstanceOperation) Metadata() (*notebookspb.OperationMetadata, error) { + var meta notebookspb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *StopInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *StopInstanceOperation) Name() string { + return op.lro.Name() +} + +// UpdateInstanceOperation manages a long-running operation from UpdateInstance. +type UpdateInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// UpdateInstanceOperation returns a new UpdateInstanceOperation from a given name. +// The name must be that of a previously created UpdateInstanceOperation, possibly from a different process. +func (c *notebookGRPCClient) UpdateInstanceOperation(name string) *UpdateInstanceOperation { + return &UpdateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// UpdateInstanceOperation returns a new UpdateInstanceOperation from a given name. +// The name must be that of a previously created UpdateInstanceOperation, possibly from a different process. +func (c *notebookRESTClient) UpdateInstanceOperation(name string) *UpdateInstanceOperation { + override := fmt.Sprintf("/v2/%s", name) + return &UpdateInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UpdateInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UpdateInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UpdateInstanceOperation) Metadata() (*notebookspb.OperationMetadata, error) { + var meta notebookspb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UpdateInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UpdateInstanceOperation) Name() string { + return op.lro.Name() +} + +// UpgradeInstanceOperation manages a long-running operation from UpgradeInstance. +type UpgradeInstanceOperation struct { + lro *longrunning.Operation + pollPath string +} + +// UpgradeInstanceOperation returns a new UpgradeInstanceOperation from a given name. +// The name must be that of a previously created UpgradeInstanceOperation, possibly from a different process. +func (c *notebookGRPCClient) UpgradeInstanceOperation(name string) *UpgradeInstanceOperation { + return &UpgradeInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// UpgradeInstanceOperation returns a new UpgradeInstanceOperation from a given name. +// The name must be that of a previously created UpgradeInstanceOperation, possibly from a different process. +func (c *notebookRESTClient) UpgradeInstanceOperation(name string) *UpgradeInstanceOperation { + override := fmt.Sprintf("/v2/%s", name) + return &UpgradeInstanceOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + pollPath: override, + } +} + +// Wait blocks until the long-running operation is completed, returning the response and any errors encountered. +// +// See documentation of Poll for error-handling information. +func (op *UpgradeInstanceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { + return nil, err + } + return &resp, nil +} + +// Poll fetches the latest state of the long-running operation. +// +// Poll also fetches the latest metadata, which can be retrieved by Metadata. +// +// If Poll fails, the error is returned and op is unmodified. If Poll succeeds and +// the operation has completed with failure, the error is returned and op.Done will return true. +// If Poll succeeds and the operation has completed successfully, +// op.Done will return true, and the response of the operation is returned. +// If Poll succeeds and the operation has not completed, the returned response and error are both nil. +func (op *UpgradeInstanceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*notebookspb.Instance, error) { + opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) + var resp notebookspb.Instance + if err := op.lro.Poll(ctx, &resp, opts...); err != nil { + return nil, err + } + if !op.Done() { + return nil, nil + } + return &resp, nil +} + +// Metadata returns metadata associated with the long-running operation. +// Metadata itself does not contact the server, but Poll does. +// To get the latest metadata, call this method after a successful call to Poll. +// If the metadata is not available, the returned metadata and error are both nil. +func (op *UpgradeInstanceOperation) Metadata() (*notebookspb.OperationMetadata, error) { + var meta notebookspb.OperationMetadata + if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { + return nil, nil + } else if err != nil { + return nil, err + } + return &meta, nil +} + +// Done reports whether the long-running operation has completed. +func (op *UpgradeInstanceOperation) Done() bool { + return op.lro.Done() +} + +// Name returns the name of the long-running operation. +// The name is assigned by the server and is unique within the service from which the operation is created. +func (op *UpgradeInstanceOperation) Name() string { + return op.lro.Name() +} + +// InstanceIterator manages a stream of *notebookspb.Instance. +type InstanceIterator struct { + items []*notebookspb.Instance + 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 []*notebookspb.Instance, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *InstanceIterator) 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 *InstanceIterator) Next() (*notebookspb.Instance, error) { + var item *notebookspb.Instance + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *InstanceIterator) bufLen() int { + return len(it.items) +} + +func (it *InstanceIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// 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 +} + +// OperationIterator manages a stream of *longrunningpb.Operation. +type OperationIterator struct { + items []*longrunningpb.Operation + 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 []*longrunningpb.Operation, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *OperationIterator) 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 *OperationIterator) Next() (*longrunningpb.Operation, error) { + var item *longrunningpb.Operation + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *OperationIterator) bufLen() int { + return len(it.items) +} + +func (it *OperationIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/notebooks/apiv2/notebook_client_example_test.go b/notebooks/apiv2/notebook_client_example_test.go new file mode 100644 index 000000000000..5cf9759908c9 --- /dev/null +++ b/notebooks/apiv2/notebook_client_example_test.go @@ -0,0 +1,644 @@ +// Copyright 2023 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 notebooks_test + +import ( + "context" + + iampb "cloud.google.com/go/iam/apiv1/iampb" + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + notebooks "cloud.google.com/go/notebooks/apiv2" + notebookspb "cloud.google.com/go/notebooks/apiv2/notebookspb" + "google.golang.org/api/iterator" + locationpb "google.golang.org/genproto/googleapis/cloud/location" +) + +func ExampleNewNotebookClient() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNewNotebookRESTClient() { + 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 := notebooks.NewNotebookRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleNotebookClient_ListInstances() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.ListInstancesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#ListInstancesRequest. + } + it := c.ListInstances(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleNotebookClient_GetInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.GetInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#GetInstanceRequest. + } + resp, err := c.GetInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_CreateInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.CreateInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#CreateInstanceRequest. + } + op, err := c.CreateInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_UpdateInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.UpdateInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#UpdateInstanceRequest. + } + op, err := c.UpdateInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_DeleteInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.DeleteInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#DeleteInstanceRequest. + } + op, err := c.DeleteInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleNotebookClient_StartInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.StartInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#StartInstanceRequest. + } + op, err := c.StartInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_StopInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.StopInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#StopInstanceRequest. + } + op, err := c.StopInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_ResetInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.ResetInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#ResetInstanceRequest. + } + op, err := c.ResetInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_CheckInstanceUpgradability() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.CheckInstanceUpgradabilityRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#CheckInstanceUpgradabilityRequest. + } + resp, err := c.CheckInstanceUpgradability(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_UpgradeInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.UpgradeInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#UpgradeInstanceRequest. + } + op, err := c.UpgradeInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_RollbackInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.RollbackInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#RollbackInstanceRequest. + } + op, err := c.RollbackInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_DiagnoseInstance() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := ¬ebookspb.DiagnoseInstanceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/notebooks/apiv2/notebookspb#DiagnoseInstanceRequest. + } + op, err := c.DiagnoseInstance(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_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 := notebooks.NewNotebookClient(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 ExampleNotebookClient_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 := notebooks.NewNotebookClient(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 + } +} + +func ExampleNotebookClient_GetIamPolicy() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_SetIamPolicy() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_TestIamPermissions() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_CancelOperation() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.CancelOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest. + } + err = c.CancelOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleNotebookClient_DeleteOperation() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.DeleteOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest. + } + err = c.DeleteOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleNotebookClient_GetOperation() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleNotebookClient_ListOperations() { + 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 := notebooks.NewNotebookClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.ListOperationsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest. + } + it := c.ListOperations(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} diff --git a/notebooks/apiv2/notebookspb/diagnostic_config.pb.go b/notebooks/apiv2/notebookspb/diagnostic_config.pb.go new file mode 100755 index 000000000000..a7cb88d5eabb --- /dev/null +++ b/notebooks/apiv2/notebookspb/diagnostic_config.pb.go @@ -0,0 +1,245 @@ +// Copyright 2023 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.31.0 +// protoc v4.23.2 +// source: google/cloud/notebooks/v2/diagnostic_config.proto + +package notebookspb + +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" +) + +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) +) + +// Defines flags that are used to run the diagnostic tool +type DiagnosticConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. User Cloud Storage bucket location (REQUIRED). + // Must be formatted with path prefix (`gs://$GCS_BUCKET`). + // + // Permissions: + // User Managed Notebooks: + // - storage.buckets.writer: Must be given to the project's service account + // attached to VM. + // Google Managed Notebooks: + // - storage.buckets.writer: Must be given to the project's service account or + // user credentials attached to VM depending on authentication mode. + // + // Cloud Storage bucket Log file will be written to + // `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz` + GcsBucket string `protobuf:"bytes,1,opt,name=gcs_bucket,json=gcsBucket,proto3" json:"gcs_bucket,omitempty"` + // Optional. Defines the relative storage path in the Cloud Storage bucket + // where the diagnostic logs will be written: Default path will be the root + // directory of the Cloud Storage bucket + // (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file + // will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/` + RelativePath string `protobuf:"bytes,2,opt,name=relative_path,json=relativePath,proto3" json:"relative_path,omitempty"` + // Optional. Enables flag to repair service for instance + EnableRepairFlag bool `protobuf:"varint,3,opt,name=enable_repair_flag,json=enableRepairFlag,proto3" json:"enable_repair_flag,omitempty"` + // Optional. Enables flag to capture packets from the instance for 30 seconds + EnablePacketCaptureFlag bool `protobuf:"varint,4,opt,name=enable_packet_capture_flag,json=enablePacketCaptureFlag,proto3" json:"enable_packet_capture_flag,omitempty"` + // Optional. Enables flag to copy all `/home/jupyter` folder contents + EnableCopyHomeFilesFlag bool `protobuf:"varint,5,opt,name=enable_copy_home_files_flag,json=enableCopyHomeFilesFlag,proto3" json:"enable_copy_home_files_flag,omitempty"` +} + +func (x *DiagnosticConfig) Reset() { + *x = DiagnosticConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_diagnostic_config_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiagnosticConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiagnosticConfig) ProtoMessage() {} + +func (x *DiagnosticConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_diagnostic_config_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiagnosticConfig.ProtoReflect.Descriptor instead. +func (*DiagnosticConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDescGZIP(), []int{0} +} + +func (x *DiagnosticConfig) GetGcsBucket() string { + if x != nil { + return x.GcsBucket + } + return "" +} + +func (x *DiagnosticConfig) GetRelativePath() string { + if x != nil { + return x.RelativePath + } + return "" +} + +func (x *DiagnosticConfig) GetEnableRepairFlag() bool { + if x != nil { + return x.EnableRepairFlag + } + return false +} + +func (x *DiagnosticConfig) GetEnablePacketCaptureFlag() bool { + if x != nil { + return x.EnablePacketCaptureFlag + } + return false +} + +func (x *DiagnosticConfig) GetEnableCopyHomeFilesFlag() bool { + if x != nil { + return x.EnableCopyHomeFilesFlag + } + return false +} + +var File_google_cloud_notebooks_v2_diagnostic_config_proto protoreflect.FileDescriptor + +var file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDesc = []byte{ + 0x0a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, + 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x64, 0x69, 0x61, 0x67, + 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 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, 0x22, + 0x98, 0x02, 0x0a, 0x10, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x22, 0x0a, 0x0a, 0x67, 0x63, 0x73, 0x5f, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x67, + 0x63, 0x73, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x28, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x31, 0x0a, 0x12, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x70, + 0x61, 0x69, 0x72, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x61, 0x69, + 0x72, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x40, 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, 0x61, 0x70, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x66, + 0x6c, 0x61, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x17, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x43, 0x61, 0x70, 0x74, + 0x75, 0x72, 0x65, 0x46, 0x6c, 0x61, 0x67, 0x12, 0x41, 0x0a, 0x1b, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x5f, 0x63, 0x6f, 0x70, 0x79, 0x5f, 0x68, 0x6f, 0x6d, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, + 0x73, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x70, 0x79, 0x48, 0x6f, 0x6d, + 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x46, 0x6c, 0x61, 0x67, 0x42, 0xcc, 0x01, 0x0a, 0x1d, 0x63, + 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x15, 0x44, 0x69, + 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, + 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, + 0x6f, 0x6f, 0x6b, 0x73, 0x70, 0x62, 0x3b, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, + 0x70, 0x62, 0xaa, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x56, 0x32, 0xca, 0x02, + 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4e, 0x6f, + 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x5c, 0x56, 0x32, 0xea, 0x02, 0x1c, 0x47, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4e, 0x6f, 0x74, 0x65, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDescOnce sync.Once + file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDescData = file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDesc +) + +func file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDescGZIP() []byte { + file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDescOnce.Do(func() { + file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDescData) + }) + return file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDescData +} + +var file_google_cloud_notebooks_v2_diagnostic_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_cloud_notebooks_v2_diagnostic_config_proto_goTypes = []interface{}{ + (*DiagnosticConfig)(nil), // 0: google.cloud.notebooks.v2.DiagnosticConfig +} +var file_google_cloud_notebooks_v2_diagnostic_config_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_cloud_notebooks_v2_diagnostic_config_proto_init() } +func file_google_cloud_notebooks_v2_diagnostic_config_proto_init() { + if File_google_cloud_notebooks_v2_diagnostic_config_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_notebooks_v2_diagnostic_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiagnosticConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_notebooks_v2_diagnostic_config_proto_goTypes, + DependencyIndexes: file_google_cloud_notebooks_v2_diagnostic_config_proto_depIdxs, + MessageInfos: file_google_cloud_notebooks_v2_diagnostic_config_proto_msgTypes, + }.Build() + File_google_cloud_notebooks_v2_diagnostic_config_proto = out.File + file_google_cloud_notebooks_v2_diagnostic_config_proto_rawDesc = nil + file_google_cloud_notebooks_v2_diagnostic_config_proto_goTypes = nil + file_google_cloud_notebooks_v2_diagnostic_config_proto_depIdxs = nil +} diff --git a/notebooks/apiv2/notebookspb/event.pb.go b/notebooks/apiv2/notebookspb/event.pb.go new file mode 100755 index 000000000000..762f11ca819d --- /dev/null +++ b/notebooks/apiv2/notebookspb/event.pb.go @@ -0,0 +1,300 @@ +// Copyright 2023 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.31.0 +// protoc v4.23.2 +// source: google/cloud/notebooks/v2/event.proto + +package notebookspb + +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 definition of the event types. +type Event_EventType int32 + +const ( + // Event is not specified. + Event_EVENT_TYPE_UNSPECIFIED Event_EventType = 0 + // The instance / runtime is idle + Event_IDLE Event_EventType = 1 + // The instance / runtime is available. + // This event indicates that instance / runtime underlying compute is + // operational. + Event_HEARTBEAT Event_EventType = 2 + // The instance / runtime health is available. + // This event indicates that instance / runtime health information. + Event_HEALTH Event_EventType = 3 + // The instance / runtime is available. + // This event allows instance / runtime to send Host maintenance + // information to Control Plane. + // https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance + Event_MAINTENANCE Event_EventType = 4 + // The instance / runtime is available. + // This event indicates that the instance had metadata that needs to be + // modified. + Event_METADATA_CHANGE Event_EventType = 5 +) + +// Enum value maps for Event_EventType. +var ( + Event_EventType_name = map[int32]string{ + 0: "EVENT_TYPE_UNSPECIFIED", + 1: "IDLE", + 2: "HEARTBEAT", + 3: "HEALTH", + 4: "MAINTENANCE", + 5: "METADATA_CHANGE", + } + Event_EventType_value = map[string]int32{ + "EVENT_TYPE_UNSPECIFIED": 0, + "IDLE": 1, + "HEARTBEAT": 2, + "HEALTH": 3, + "MAINTENANCE": 4, + "METADATA_CHANGE": 5, + } +) + +func (x Event_EventType) Enum() *Event_EventType { + p := new(Event_EventType) + *p = x + return p +} + +func (x Event_EventType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Event_EventType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_notebooks_v2_event_proto_enumTypes[0].Descriptor() +} + +func (Event_EventType) Type() protoreflect.EnumType { + return &file_google_cloud_notebooks_v2_event_proto_enumTypes[0] +} + +func (x Event_EventType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Event_EventType.Descriptor instead. +func (Event_EventType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_event_proto_rawDescGZIP(), []int{0, 0} +} + +// The definition of an Event for a managed / semi-managed notebook instance. +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Event report time. + ReportTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=report_time,json=reportTime,proto3" json:"report_time,omitempty"` + // Optional. Event type. + Type Event_EventType `protobuf:"varint,2,opt,name=type,proto3,enum=google.cloud.notebooks.v2.Event_EventType" json:"type,omitempty"` + // Optional. Event details. This field is used to pass event information. + Details map[string]string `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_event_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +func (x *Event) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_event_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_event_proto_rawDescGZIP(), []int{0} +} + +func (x *Event) GetReportTime() *timestamppb.Timestamp { + if x != nil { + return x.ReportTime + } + return nil +} + +func (x *Event) GetType() Event_EventType { + if x != nil { + return x.Type + } + return Event_EVENT_TYPE_UNSPECIFIED +} + +func (x *Event) GetDetails() map[string]string { + if x != nil { + return x.Details + } + return nil +} + +var File_google_cloud_notebooks_v2_event_proto protoreflect.FileDescriptor + +var file_google_cloud_notebooks_v2_event_proto_rawDesc = []byte{ + 0x0a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, + 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 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, 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, 0x8c, 0x03, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x40, + 0x0a, 0x0b, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 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, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x12, 0x43, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, + 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, + 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4c, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, + 0x69, 0x6c, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x44, 0x65, 0x74, 0x61, 0x69, 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, 0x22, + 0x72, 0x0a, 0x09, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x16, + 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x44, 0x4c, 0x45, + 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x45, 0x41, 0x52, 0x54, 0x42, 0x45, 0x41, 0x54, 0x10, + 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x10, 0x03, 0x12, 0x0f, 0x0a, + 0x0b, 0x4d, 0x41, 0x49, 0x4e, 0x54, 0x45, 0x4e, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x04, 0x12, 0x13, + 0x0a, 0x0f, 0x4d, 0x45, 0x54, 0x41, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, + 0x45, 0x10, 0x05, 0x42, 0xc1, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x70, 0x62, 0x3b, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x70, 0x62, + 0xaa, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x19, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4e, 0x6f, 0x74, 0x65, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x5c, 0x56, 0x32, 0xea, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_notebooks_v2_event_proto_rawDescOnce sync.Once + file_google_cloud_notebooks_v2_event_proto_rawDescData = file_google_cloud_notebooks_v2_event_proto_rawDesc +) + +func file_google_cloud_notebooks_v2_event_proto_rawDescGZIP() []byte { + file_google_cloud_notebooks_v2_event_proto_rawDescOnce.Do(func() { + file_google_cloud_notebooks_v2_event_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_notebooks_v2_event_proto_rawDescData) + }) + return file_google_cloud_notebooks_v2_event_proto_rawDescData +} + +var file_google_cloud_notebooks_v2_event_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_google_cloud_notebooks_v2_event_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_google_cloud_notebooks_v2_event_proto_goTypes = []interface{}{ + (Event_EventType)(0), // 0: google.cloud.notebooks.v2.Event.EventType + (*Event)(nil), // 1: google.cloud.notebooks.v2.Event + nil, // 2: google.cloud.notebooks.v2.Event.DetailsEntry + (*timestamppb.Timestamp)(nil), // 3: google.protobuf.Timestamp +} +var file_google_cloud_notebooks_v2_event_proto_depIdxs = []int32{ + 3, // 0: google.cloud.notebooks.v2.Event.report_time:type_name -> google.protobuf.Timestamp + 0, // 1: google.cloud.notebooks.v2.Event.type:type_name -> google.cloud.notebooks.v2.Event.EventType + 2, // 2: google.cloud.notebooks.v2.Event.details:type_name -> google.cloud.notebooks.v2.Event.DetailsEntry + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_google_cloud_notebooks_v2_event_proto_init() } +func file_google_cloud_notebooks_v2_event_proto_init() { + if File_google_cloud_notebooks_v2_event_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_notebooks_v2_event_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_notebooks_v2_event_proto_rawDesc, + NumEnums: 1, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_notebooks_v2_event_proto_goTypes, + DependencyIndexes: file_google_cloud_notebooks_v2_event_proto_depIdxs, + EnumInfos: file_google_cloud_notebooks_v2_event_proto_enumTypes, + MessageInfos: file_google_cloud_notebooks_v2_event_proto_msgTypes, + }.Build() + File_google_cloud_notebooks_v2_event_proto = out.File + file_google_cloud_notebooks_v2_event_proto_rawDesc = nil + file_google_cloud_notebooks_v2_event_proto_goTypes = nil + file_google_cloud_notebooks_v2_event_proto_depIdxs = nil +} diff --git a/notebooks/apiv2/notebookspb/gce_setup.pb.go b/notebooks/apiv2/notebookspb/gce_setup.pb.go new file mode 100755 index 000000000000..b568fb4e6f70 --- /dev/null +++ b/notebooks/apiv2/notebookspb/gce_setup.pb.go @@ -0,0 +1,1581 @@ +// Copyright 2023 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.31.0 +// protoc v4.23.2 +// source: google/cloud/notebooks/v2/gce_setup.proto + +package notebookspb + +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" +) + +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) +) + +// Definition of the disk encryption options. +type DiskEncryption int32 + +const ( + // Disk encryption is not specified. + DiskEncryption_DISK_ENCRYPTION_UNSPECIFIED DiskEncryption = 0 + // Use Google managed encryption keys to encrypt the boot disk. + DiskEncryption_GMEK DiskEncryption = 1 + // Use customer managed encryption keys to encrypt the boot disk. + DiskEncryption_CMEK DiskEncryption = 2 +) + +// Enum value maps for DiskEncryption. +var ( + DiskEncryption_name = map[int32]string{ + 0: "DISK_ENCRYPTION_UNSPECIFIED", + 1: "GMEK", + 2: "CMEK", + } + DiskEncryption_value = map[string]int32{ + "DISK_ENCRYPTION_UNSPECIFIED": 0, + "GMEK": 1, + "CMEK": 2, + } +) + +func (x DiskEncryption) Enum() *DiskEncryption { + p := new(DiskEncryption) + *p = x + return p +} + +func (x DiskEncryption) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DiskEncryption) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes[0].Descriptor() +} + +func (DiskEncryption) Type() protoreflect.EnumType { + return &file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes[0] +} + +func (x DiskEncryption) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DiskEncryption.Descriptor instead. +func (DiskEncryption) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{0} +} + +// Possible disk types. +type DiskType int32 + +const ( + // Disk type not set. + DiskType_DISK_TYPE_UNSPECIFIED DiskType = 0 + // Standard persistent disk type. + DiskType_PD_STANDARD DiskType = 1 + // SSD persistent disk type. + DiskType_PD_SSD DiskType = 2 + // Balanced persistent disk type. + DiskType_PD_BALANCED DiskType = 3 + // Extreme persistent disk type. + DiskType_PD_EXTREME DiskType = 4 +) + +// Enum value maps for DiskType. +var ( + DiskType_name = map[int32]string{ + 0: "DISK_TYPE_UNSPECIFIED", + 1: "PD_STANDARD", + 2: "PD_SSD", + 3: "PD_BALANCED", + 4: "PD_EXTREME", + } + DiskType_value = map[string]int32{ + "DISK_TYPE_UNSPECIFIED": 0, + "PD_STANDARD": 1, + "PD_SSD": 2, + "PD_BALANCED": 3, + "PD_EXTREME": 4, + } +) + +func (x DiskType) Enum() *DiskType { + p := new(DiskType) + *p = x + return p +} + +func (x DiskType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DiskType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes[1].Descriptor() +} + +func (DiskType) Type() protoreflect.EnumType { + return &file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes[1] +} + +func (x DiskType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DiskType.Descriptor instead. +func (DiskType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{1} +} + +// The type of vNIC driver. +// Default should be NIC_TYPE_UNSPECIFIED. +type NetworkInterface_NicType int32 + +const ( + // No type specified. + NetworkInterface_NIC_TYPE_UNSPECIFIED NetworkInterface_NicType = 0 + // VIRTIO + NetworkInterface_VIRTIO_NET NetworkInterface_NicType = 1 + // GVNIC + NetworkInterface_GVNIC NetworkInterface_NicType = 2 +) + +// Enum value maps for NetworkInterface_NicType. +var ( + NetworkInterface_NicType_name = map[int32]string{ + 0: "NIC_TYPE_UNSPECIFIED", + 1: "VIRTIO_NET", + 2: "GVNIC", + } + NetworkInterface_NicType_value = map[string]int32{ + "NIC_TYPE_UNSPECIFIED": 0, + "VIRTIO_NET": 1, + "GVNIC": 2, + } +) + +func (x NetworkInterface_NicType) Enum() *NetworkInterface_NicType { + p := new(NetworkInterface_NicType) + *p = x + return p +} + +func (x NetworkInterface_NicType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (NetworkInterface_NicType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes[2].Descriptor() +} + +func (NetworkInterface_NicType) Type() protoreflect.EnumType { + return &file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes[2] +} + +func (x NetworkInterface_NicType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use NetworkInterface_NicType.Descriptor instead. +func (NetworkInterface_NicType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{0, 0} +} + +// Definition of the types of hardware accelerators that can be used on +// this instance. +type AcceleratorConfig_AcceleratorType int32 + +const ( + // Accelerator type is not specified. + AcceleratorConfig_ACCELERATOR_TYPE_UNSPECIFIED AcceleratorConfig_AcceleratorType = 0 + // Accelerator type is Nvidia Tesla P100. + AcceleratorConfig_NVIDIA_TESLA_P100 AcceleratorConfig_AcceleratorType = 2 + // Accelerator type is Nvidia Tesla V100. + AcceleratorConfig_NVIDIA_TESLA_V100 AcceleratorConfig_AcceleratorType = 3 + // Accelerator type is Nvidia Tesla P4. + AcceleratorConfig_NVIDIA_TESLA_P4 AcceleratorConfig_AcceleratorType = 4 + // Accelerator type is Nvidia Tesla T4. + AcceleratorConfig_NVIDIA_TESLA_T4 AcceleratorConfig_AcceleratorType = 5 + // Accelerator type is Nvidia Tesla A100 - 40GB. + AcceleratorConfig_NVIDIA_TESLA_A100 AcceleratorConfig_AcceleratorType = 11 + // Accelerator type is Nvidia Tesla A100 - 80GB. + AcceleratorConfig_NVIDIA_A100_80GB AcceleratorConfig_AcceleratorType = 12 + // Accelerator type is Nvidia Tesla L4. + AcceleratorConfig_NVIDIA_L4 AcceleratorConfig_AcceleratorType = 13 + // Accelerator type is NVIDIA Tesla T4 Virtual Workstations. + AcceleratorConfig_NVIDIA_TESLA_T4_VWS AcceleratorConfig_AcceleratorType = 8 + // Accelerator type is NVIDIA Tesla P100 Virtual Workstations. + AcceleratorConfig_NVIDIA_TESLA_P100_VWS AcceleratorConfig_AcceleratorType = 9 + // Accelerator type is NVIDIA Tesla P4 Virtual Workstations. + AcceleratorConfig_NVIDIA_TESLA_P4_VWS AcceleratorConfig_AcceleratorType = 10 +) + +// Enum value maps for AcceleratorConfig_AcceleratorType. +var ( + AcceleratorConfig_AcceleratorType_name = map[int32]string{ + 0: "ACCELERATOR_TYPE_UNSPECIFIED", + 2: "NVIDIA_TESLA_P100", + 3: "NVIDIA_TESLA_V100", + 4: "NVIDIA_TESLA_P4", + 5: "NVIDIA_TESLA_T4", + 11: "NVIDIA_TESLA_A100", + 12: "NVIDIA_A100_80GB", + 13: "NVIDIA_L4", + 8: "NVIDIA_TESLA_T4_VWS", + 9: "NVIDIA_TESLA_P100_VWS", + 10: "NVIDIA_TESLA_P4_VWS", + } + AcceleratorConfig_AcceleratorType_value = map[string]int32{ + "ACCELERATOR_TYPE_UNSPECIFIED": 0, + "NVIDIA_TESLA_P100": 2, + "NVIDIA_TESLA_V100": 3, + "NVIDIA_TESLA_P4": 4, + "NVIDIA_TESLA_T4": 5, + "NVIDIA_TESLA_A100": 11, + "NVIDIA_A100_80GB": 12, + "NVIDIA_L4": 13, + "NVIDIA_TESLA_T4_VWS": 8, + "NVIDIA_TESLA_P100_VWS": 9, + "NVIDIA_TESLA_P4_VWS": 10, + } +) + +func (x AcceleratorConfig_AcceleratorType) Enum() *AcceleratorConfig_AcceleratorType { + p := new(AcceleratorConfig_AcceleratorType) + *p = x + return p +} + +func (x AcceleratorConfig_AcceleratorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AcceleratorConfig_AcceleratorType) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes[3].Descriptor() +} + +func (AcceleratorConfig_AcceleratorType) Type() protoreflect.EnumType { + return &file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes[3] +} + +func (x AcceleratorConfig_AcceleratorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AcceleratorConfig_AcceleratorType.Descriptor instead. +func (AcceleratorConfig_AcceleratorType) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{3, 0} +} + +// The definition of a network interface resource attached to a VM. +type NetworkInterface struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The name of the VPC that this VM instance is in. + // Format: + // `projects/{project_id}/global/networks/{network_id}` + Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` + // Optional. The name of the subnet that this VM instance is in. + // Format: + // `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}` + Subnet string `protobuf:"bytes,2,opt,name=subnet,proto3" json:"subnet,omitempty"` + // Optional. The type of vNIC to be used on this interface. This may be gVNIC + // or VirtioNet. + NicType NetworkInterface_NicType `protobuf:"varint,3,opt,name=nic_type,json=nicType,proto3,enum=google.cloud.notebooks.v2.NetworkInterface_NicType" json:"nic_type,omitempty"` +} + +func (x *NetworkInterface) Reset() { + *x = NetworkInterface{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInterface) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInterface) ProtoMessage() {} + +func (x *NetworkInterface) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NetworkInterface.ProtoReflect.Descriptor instead. +func (*NetworkInterface) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{0} +} + +func (x *NetworkInterface) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (x *NetworkInterface) GetSubnet() string { + if x != nil { + return x.Subnet + } + return "" +} + +func (x *NetworkInterface) GetNicType() NetworkInterface_NicType { + if x != nil { + return x.NicType + } + return NetworkInterface_NIC_TYPE_UNSPECIFIED +} + +// Definition of a custom Compute Engine virtual machine image for starting a +// notebook instance with the environment installed directly on the VM. +type VmImage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The name of the Google Cloud project that this VM image belongs + // to. Format: `{project_id}` + Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` + // The reference to an external Compute Engine VM image. + // + // Types that are assignable to Image: + // *VmImage_Name + // *VmImage_Family + Image isVmImage_Image `protobuf_oneof:"image"` +} + +func (x *VmImage) Reset() { + *x = VmImage{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *VmImage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VmImage) ProtoMessage() {} + +func (x *VmImage) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VmImage.ProtoReflect.Descriptor instead. +func (*VmImage) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{1} +} + +func (x *VmImage) GetProject() string { + if x != nil { + return x.Project + } + return "" +} + +func (m *VmImage) GetImage() isVmImage_Image { + if m != nil { + return m.Image + } + return nil +} + +func (x *VmImage) GetName() string { + if x, ok := x.GetImage().(*VmImage_Name); ok { + return x.Name + } + return "" +} + +func (x *VmImage) GetFamily() string { + if x, ok := x.GetImage().(*VmImage_Family); ok { + return x.Family + } + return "" +} + +type isVmImage_Image interface { + isVmImage_Image() +} + +type VmImage_Name struct { + // Optional. Use VM image name to find the image. + Name string `protobuf:"bytes,2,opt,name=name,proto3,oneof"` +} + +type VmImage_Family struct { + // Optional. Use this VM image family to find the image; the newest image in + // this family will be used. + Family string `protobuf:"bytes,3,opt,name=family,proto3,oneof"` +} + +func (*VmImage_Name) isVmImage_Image() {} + +func (*VmImage_Family) isVmImage_Image() {} + +// Definition of a container image for starting a notebook instance with the +// environment installed in a container. +type ContainerImage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. The path to the container image repository. For example: + // `gcr.io/{project_id}/{image_name}` + Repository string `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` + // Optional. The tag of the container image. If not specified, this defaults + // to the latest tag. + Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` +} + +func (x *ContainerImage) Reset() { + *x = ContainerImage{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContainerImage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContainerImage) ProtoMessage() {} + +func (x *ContainerImage) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ContainerImage.ProtoReflect.Descriptor instead. +func (*ContainerImage) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{2} +} + +func (x *ContainerImage) GetRepository() string { + if x != nil { + return x.Repository + } + return "" +} + +func (x *ContainerImage) GetTag() string { + if x != nil { + return x.Tag + } + return "" +} + +// An accelerator configuration for a VM instance +// Definition of a hardware accelerator. Note that there is no check on `type` +// and `core_count` combinations. TPUs are not supported. +// See [GPUs on Compute +// Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a +// valid combination. +type AcceleratorConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Type of this accelerator. + Type AcceleratorConfig_AcceleratorType `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.notebooks.v2.AcceleratorConfig_AcceleratorType" json:"type,omitempty"` + // Optional. Count of cores of this accelerator. + CoreCount int64 `protobuf:"varint,2,opt,name=core_count,json=coreCount,proto3" json:"core_count,omitempty"` +} + +func (x *AcceleratorConfig) Reset() { + *x = AcceleratorConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AcceleratorConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AcceleratorConfig) ProtoMessage() {} + +func (x *AcceleratorConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AcceleratorConfig.ProtoReflect.Descriptor instead. +func (*AcceleratorConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{3} +} + +func (x *AcceleratorConfig) GetType() AcceleratorConfig_AcceleratorType { + if x != nil { + return x.Type + } + return AcceleratorConfig_ACCELERATOR_TYPE_UNSPECIFIED +} + +func (x *AcceleratorConfig) GetCoreCount() int64 { + if x != nil { + return x.CoreCount + } + return 0 +} + +// A set of Shielded Instance options. +// See [Images using supported Shielded VM +// features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). +// Not all combinations are valid. +type ShieldedInstanceConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Defines whether the VM instance has Secure Boot enabled. + // + // Secure Boot helps ensure that the system only runs authentic software by + // verifying the digital signature of all boot components, and halting the + // boot process if signature verification fails. Disabled by default. + EnableSecureBoot bool `protobuf:"varint,1,opt,name=enable_secure_boot,json=enableSecureBoot,proto3" json:"enable_secure_boot,omitempty"` + // Optional. Defines whether the VM instance has the vTPM enabled. Enabled by + // default. + EnableVtpm bool `protobuf:"varint,2,opt,name=enable_vtpm,json=enableVtpm,proto3" json:"enable_vtpm,omitempty"` + // Optional. Defines whether the VM instance has integrity monitoring enabled. + // + // Enables monitoring and attestation of the boot integrity of the VM + // instance. The attestation is performed against the integrity policy + // baseline. This baseline is initially derived from the implicitly trusted + // boot image when the VM instance is created. Enabled by default. + EnableIntegrityMonitoring bool `protobuf:"varint,3,opt,name=enable_integrity_monitoring,json=enableIntegrityMonitoring,proto3" json:"enable_integrity_monitoring,omitempty"` +} + +func (x *ShieldedInstanceConfig) Reset() { + *x = ShieldedInstanceConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ShieldedInstanceConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ShieldedInstanceConfig) ProtoMessage() {} + +func (x *ShieldedInstanceConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ShieldedInstanceConfig.ProtoReflect.Descriptor instead. +func (*ShieldedInstanceConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{4} +} + +func (x *ShieldedInstanceConfig) GetEnableSecureBoot() bool { + if x != nil { + return x.EnableSecureBoot + } + return false +} + +func (x *ShieldedInstanceConfig) GetEnableVtpm() bool { + if x != nil { + return x.EnableVtpm + } + return false +} + +func (x *ShieldedInstanceConfig) GetEnableIntegrityMonitoring() bool { + if x != nil { + return x.EnableIntegrityMonitoring + } + return false +} + +// A GPU driver configuration +type GPUDriverConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Whether the end user authorizes Google Cloud to install GPU + // driver on this VM instance. If this field is empty or set to false, the GPU + // driver won't be installed. Only applicable to instances with GPUs. + EnableGpuDriver bool `protobuf:"varint,1,opt,name=enable_gpu_driver,json=enableGpuDriver,proto3" json:"enable_gpu_driver,omitempty"` + // Optional. Specify a custom Cloud Storage path where the GPU driver is + // stored. If not specified, we'll automatically choose from official GPU + // drivers. + CustomGpuDriverPath string `protobuf:"bytes,2,opt,name=custom_gpu_driver_path,json=customGpuDriverPath,proto3" json:"custom_gpu_driver_path,omitempty"` +} + +func (x *GPUDriverConfig) Reset() { + *x = GPUDriverConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GPUDriverConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GPUDriverConfig) ProtoMessage() {} + +func (x *GPUDriverConfig) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GPUDriverConfig.ProtoReflect.Descriptor instead. +func (*GPUDriverConfig) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{5} +} + +func (x *GPUDriverConfig) GetEnableGpuDriver() bool { + if x != nil { + return x.EnableGpuDriver + } + return false +} + +func (x *GPUDriverConfig) GetCustomGpuDriverPath() string { + if x != nil { + return x.CustomGpuDriverPath + } + return "" +} + +// An instance-attached disk resource. +type DataDisk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The size of the disk in GB attached to this VM instance, up to a + // maximum of 64000 GB (64 TB). If not specified, this defaults to 100. + DiskSizeGb int64 `protobuf:"varint,1,opt,name=disk_size_gb,json=diskSizeGb,proto3" json:"disk_size_gb,omitempty"` + // Optional. Input only. Indicates the type of the disk. + DiskType DiskType `protobuf:"varint,2,opt,name=disk_type,json=diskType,proto3,enum=google.cloud.notebooks.v2.DiskType" json:"disk_type,omitempty"` + // Optional. Input only. Disk encryption method used on the boot and data + // disks, defaults to GMEK. + DiskEncryption DiskEncryption `protobuf:"varint,5,opt,name=disk_encryption,json=diskEncryption,proto3,enum=google.cloud.notebooks.v2.DiskEncryption" json:"disk_encryption,omitempty"` + // Optional. Input only. The KMS key used to encrypt the disks, only + // applicable if disk_encryption is CMEK. Format: + // `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + // + // Learn more about using your own encryption keys. + KmsKey string `protobuf:"bytes,6,opt,name=kms_key,json=kmsKey,proto3" json:"kms_key,omitempty"` +} + +func (x *DataDisk) Reset() { + *x = DataDisk{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DataDisk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DataDisk) ProtoMessage() {} + +func (x *DataDisk) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DataDisk.ProtoReflect.Descriptor instead. +func (*DataDisk) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{6} +} + +func (x *DataDisk) GetDiskSizeGb() int64 { + if x != nil { + return x.DiskSizeGb + } + return 0 +} + +func (x *DataDisk) GetDiskType() DiskType { + if x != nil { + return x.DiskType + } + return DiskType_DISK_TYPE_UNSPECIFIED +} + +func (x *DataDisk) GetDiskEncryption() DiskEncryption { + if x != nil { + return x.DiskEncryption + } + return DiskEncryption_DISK_ENCRYPTION_UNSPECIFIED +} + +func (x *DataDisk) GetKmsKey() string { + if x != nil { + return x.KmsKey + } + return "" +} + +// The definition of a boot disk. +type BootDisk struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The size of the boot disk in GB attached to this instance, up to + // a maximum of 64000 GB (64 TB). If not specified, this defaults to the + // recommended value of 150GB. + DiskSizeGb int64 `protobuf:"varint,1,opt,name=disk_size_gb,json=diskSizeGb,proto3" json:"disk_size_gb,omitempty"` + // Optional. Indicates the type of the disk. + DiskType DiskType `protobuf:"varint,2,opt,name=disk_type,json=diskType,proto3,enum=google.cloud.notebooks.v2.DiskType" json:"disk_type,omitempty"` + // Optional. Input only. Disk encryption method used on the boot and data + // disks, defaults to GMEK. + DiskEncryption DiskEncryption `protobuf:"varint,3,opt,name=disk_encryption,json=diskEncryption,proto3,enum=google.cloud.notebooks.v2.DiskEncryption" json:"disk_encryption,omitempty"` + // Optional. Input only. The KMS key used to encrypt the disks, only + // applicable if disk_encryption is CMEK. Format: + // `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` + // + // Learn more about using your own encryption keys. + KmsKey string `protobuf:"bytes,4,opt,name=kms_key,json=kmsKey,proto3" json:"kms_key,omitempty"` +} + +func (x *BootDisk) Reset() { + *x = BootDisk{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootDisk) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootDisk) ProtoMessage() {} + +func (x *BootDisk) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootDisk.ProtoReflect.Descriptor instead. +func (*BootDisk) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{7} +} + +func (x *BootDisk) GetDiskSizeGb() int64 { + if x != nil { + return x.DiskSizeGb + } + return 0 +} + +func (x *BootDisk) GetDiskType() DiskType { + if x != nil { + return x.DiskType + } + return DiskType_DISK_TYPE_UNSPECIFIED +} + +func (x *BootDisk) GetDiskEncryption() DiskEncryption { + if x != nil { + return x.DiskEncryption + } + return DiskEncryption_DISK_ENCRYPTION_UNSPECIFIED +} + +func (x *BootDisk) GetKmsKey() string { + if x != nil { + return x.KmsKey + } + return "" +} + +// A service account that acts as an identity. +type ServiceAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. Email address of the service account. + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + // Output only. The list of scopes to be made available for this service + // account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform + Scopes []string `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"` +} + +func (x *ServiceAccount) Reset() { + *x = ServiceAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServiceAccount) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServiceAccount) ProtoMessage() {} + +func (x *ServiceAccount) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServiceAccount.ProtoReflect.Descriptor instead. +func (*ServiceAccount) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{8} +} + +func (x *ServiceAccount) GetEmail() string { + if x != nil { + return x.Email + } + return "" +} + +func (x *ServiceAccount) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +// The definition of how to configure a VM instance outside of Resources and +// Identity. +type GceSetup struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The machine type of the VM instance. + // https://cloud.google.com/compute/docs/machine-resource + MachineType string `protobuf:"bytes,1,opt,name=machine_type,json=machineType,proto3" json:"machine_type,omitempty"` + // Optional. The hardware accelerators used on this instance. If you use + // accelerators, make sure that your configuration has + // [enough vCPUs and memory to support the `machine_type` you have + // selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). + // Currently supports only one accelerator configuration. + AcceleratorConfigs []*AcceleratorConfig `protobuf:"bytes,2,rep,name=accelerator_configs,json=acceleratorConfigs,proto3" json:"accelerator_configs,omitempty"` + // Optional. The service account that serves as an identity for the VM + // instance. Currently supports only one service account. + ServiceAccounts []*ServiceAccount `protobuf:"bytes,3,rep,name=service_accounts,json=serviceAccounts,proto3" json:"service_accounts,omitempty"` + // Type of the image; can be one of VM image, or container image. + // + // Types that are assignable to Image: + // *GceSetup_VmImage + // *GceSetup_ContainerImage + Image isGceSetup_Image `protobuf_oneof:"image"` + // Optional. The boot disk for the VM. + BootDisk *BootDisk `protobuf:"bytes,6,opt,name=boot_disk,json=bootDisk,proto3" json:"boot_disk,omitempty"` + // Optional. Data disks attached to the VM instance. + // Currently supports only one data disk. + DataDisks []*DataDisk `protobuf:"bytes,7,rep,name=data_disks,json=dataDisks,proto3" json:"data_disks,omitempty"` + // Optional. Shielded VM configuration. + // [Images using supported Shielded VM + // features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). + ShieldedInstanceConfig *ShieldedInstanceConfig `protobuf:"bytes,8,opt,name=shielded_instance_config,json=shieldedInstanceConfig,proto3" json:"shielded_instance_config,omitempty"` + // Optional. The network interfaces for the VM. + // Supports only one interface. + NetworkInterfaces []*NetworkInterface `protobuf:"bytes,9,rep,name=network_interfaces,json=networkInterfaces,proto3" json:"network_interfaces,omitempty"` + // Optional. If true, no external IP will be assigned to this VM instance. + DisablePublicIp bool `protobuf:"varint,10,opt,name=disable_public_ip,json=disablePublicIp,proto3" json:"disable_public_ip,omitempty"` + // Optional. The Compute Engine tags to add to runtime (see [Tagging + // instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)). + Tags []string `protobuf:"bytes,11,rep,name=tags,proto3" json:"tags,omitempty"` + // Optional. Custom metadata to apply to this instance. + Metadata map[string]string `protobuf:"bytes,12,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Optional. Flag to enable ip forwarding or not, default false/off. + // https://cloud.google.com/vpc/docs/using-routes#canipforward + EnableIpForwarding bool `protobuf:"varint,13,opt,name=enable_ip_forwarding,json=enableIpForwarding,proto3" json:"enable_ip_forwarding,omitempty"` + // Optional. Configuration for GPU drivers. + GpuDriverConfig *GPUDriverConfig `protobuf:"bytes,14,opt,name=gpu_driver_config,json=gpuDriverConfig,proto3" json:"gpu_driver_config,omitempty"` +} + +func (x *GceSetup) Reset() { + *x = GceSetup{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GceSetup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GceSetup) ProtoMessage() {} + +func (x *GceSetup) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GceSetup.ProtoReflect.Descriptor instead. +func (*GceSetup) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP(), []int{9} +} + +func (x *GceSetup) GetMachineType() string { + if x != nil { + return x.MachineType + } + return "" +} + +func (x *GceSetup) GetAcceleratorConfigs() []*AcceleratorConfig { + if x != nil { + return x.AcceleratorConfigs + } + return nil +} + +func (x *GceSetup) GetServiceAccounts() []*ServiceAccount { + if x != nil { + return x.ServiceAccounts + } + return nil +} + +func (m *GceSetup) GetImage() isGceSetup_Image { + if m != nil { + return m.Image + } + return nil +} + +func (x *GceSetup) GetVmImage() *VmImage { + if x, ok := x.GetImage().(*GceSetup_VmImage); ok { + return x.VmImage + } + return nil +} + +func (x *GceSetup) GetContainerImage() *ContainerImage { + if x, ok := x.GetImage().(*GceSetup_ContainerImage); ok { + return x.ContainerImage + } + return nil +} + +func (x *GceSetup) GetBootDisk() *BootDisk { + if x != nil { + return x.BootDisk + } + return nil +} + +func (x *GceSetup) GetDataDisks() []*DataDisk { + if x != nil { + return x.DataDisks + } + return nil +} + +func (x *GceSetup) GetShieldedInstanceConfig() *ShieldedInstanceConfig { + if x != nil { + return x.ShieldedInstanceConfig + } + return nil +} + +func (x *GceSetup) GetNetworkInterfaces() []*NetworkInterface { + if x != nil { + return x.NetworkInterfaces + } + return nil +} + +func (x *GceSetup) GetDisablePublicIp() bool { + if x != nil { + return x.DisablePublicIp + } + return false +} + +func (x *GceSetup) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +func (x *GceSetup) GetMetadata() map[string]string { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *GceSetup) GetEnableIpForwarding() bool { + if x != nil { + return x.EnableIpForwarding + } + return false +} + +func (x *GceSetup) GetGpuDriverConfig() *GPUDriverConfig { + if x != nil { + return x.GpuDriverConfig + } + return nil +} + +type isGceSetup_Image interface { + isGceSetup_Image() +} + +type GceSetup_VmImage struct { + // Optional. Use a Compute Engine VM image to start the notebook instance. + VmImage *VmImage `protobuf:"bytes,4,opt,name=vm_image,json=vmImage,proto3,oneof"` +} + +type GceSetup_ContainerImage struct { + // Optional. Use a container image to start the notebook instance. + ContainerImage *ContainerImage `protobuf:"bytes,5,opt,name=container_image,json=containerImage,proto3,oneof"` +} + +func (*GceSetup_VmImage) isGceSetup_Image() {} + +func (*GceSetup_ContainerImage) isGceSetup_Image() {} + +var File_google_cloud_notebooks_v2_gce_setup_proto protoreflect.FileDescriptor + +var file_google_cloud_notebooks_v2_gce_setup_proto_rawDesc = []byte{ + 0x0a, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, + 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x63, 0x65, 0x5f, + 0x73, 0x65, 0x74, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 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, 0x22, 0xe3, 0x01, 0x0a, 0x10, 0x4e, 0x65, 0x74, 0x77, + 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x07, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x1b, 0x0a, 0x06, 0x73, + 0x75, 0x62, 0x6e, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x06, 0x73, 0x75, 0x62, 0x6e, 0x65, 0x74, 0x12, 0x53, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6e, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x22, 0x3e, 0x0a, + 0x07, 0x4e, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4e, 0x49, 0x43, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x56, 0x49, 0x52, 0x54, 0x49, 0x4f, 0x5f, 0x4e, 0x45, 0x54, + 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x56, 0x4e, 0x49, 0x43, 0x10, 0x02, 0x22, 0x6b, 0x0a, + 0x07, 0x56, 0x6d, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x07, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, + 0x79, 0x42, 0x07, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x4c, 0x0a, 0x0e, 0x43, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0a, + 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x12, 0x15, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x03, 0x74, 0x61, 0x67, 0x22, 0xa5, 0x03, 0x0a, 0x11, 0x41, 0x63, 0x63, + 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x55, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x6c, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, + 0x63, 0x6f, 0x72, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x94, 0x02, 0x0a, 0x0f, 0x41, 0x63, + 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, + 0x1c, 0x41, 0x43, 0x43, 0x45, 0x4c, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x4e, 0x56, 0x49, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x45, 0x53, 0x4c, 0x41, 0x5f, + 0x50, 0x31, 0x30, 0x30, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x56, 0x49, 0x44, 0x49, 0x41, + 0x5f, 0x54, 0x45, 0x53, 0x4c, 0x41, 0x5f, 0x56, 0x31, 0x30, 0x30, 0x10, 0x03, 0x12, 0x13, 0x0a, + 0x0f, 0x4e, 0x56, 0x49, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x45, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x34, + 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x4e, 0x56, 0x49, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x45, 0x53, + 0x4c, 0x41, 0x5f, 0x54, 0x34, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x56, 0x49, 0x44, 0x49, + 0x41, 0x5f, 0x54, 0x45, 0x53, 0x4c, 0x41, 0x5f, 0x41, 0x31, 0x30, 0x30, 0x10, 0x0b, 0x12, 0x14, + 0x0a, 0x10, 0x4e, 0x56, 0x49, 0x44, 0x49, 0x41, 0x5f, 0x41, 0x31, 0x30, 0x30, 0x5f, 0x38, 0x30, + 0x47, 0x42, 0x10, 0x0c, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x56, 0x49, 0x44, 0x49, 0x41, 0x5f, 0x4c, + 0x34, 0x10, 0x0d, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x56, 0x49, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x45, + 0x53, 0x4c, 0x41, 0x5f, 0x54, 0x34, 0x5f, 0x56, 0x57, 0x53, 0x10, 0x08, 0x12, 0x19, 0x0a, 0x15, + 0x4e, 0x56, 0x49, 0x44, 0x49, 0x41, 0x5f, 0x54, 0x45, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x31, 0x30, + 0x30, 0x5f, 0x56, 0x57, 0x53, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x4e, 0x56, 0x49, 0x44, 0x49, + 0x41, 0x5f, 0x54, 0x45, 0x53, 0x4c, 0x41, 0x5f, 0x50, 0x34, 0x5f, 0x56, 0x57, 0x53, 0x10, 0x0a, + 0x22, 0xb6, 0x01, 0x0a, 0x16, 0x53, 0x68, 0x69, 0x65, 0x6c, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x31, 0x0a, 0x12, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x62, 0x6f, 0x6f, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x10, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x53, 0x65, 0x63, 0x75, 0x72, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x12, 0x24, + 0x0a, 0x0b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x74, 0x70, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x56, 0x74, 0x70, 0x6d, 0x12, 0x43, 0x0a, 0x1b, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, + 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x19, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x69, 0x74, 0x79, 0x4d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x6e, 0x67, 0x22, 0x7c, 0x0a, 0x0f, 0x47, 0x50, 0x55, + 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2f, 0x0a, 0x11, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x67, 0x70, 0x75, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x47, 0x70, 0x75, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x38, 0x0a, + 0x16, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x67, 0x70, 0x75, 0x5f, 0x64, 0x72, 0x69, 0x76, + 0x65, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x01, 0x52, 0x13, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x47, 0x70, 0x75, 0x44, 0x72, 0x69, + 0x76, 0x65, 0x72, 0x50, 0x61, 0x74, 0x68, 0x22, 0xf8, 0x01, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, + 0x44, 0x69, 0x73, 0x6b, 0x12, 0x25, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x5f, 0x67, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, + 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x53, 0x69, 0x7a, 0x65, 0x47, 0x62, 0x12, 0x48, 0x0a, 0x09, 0x64, + 0x69, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, + 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, + 0x79, 0x70, 0x65, 0x42, 0x06, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x64, 0x69, 0x73, + 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5a, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, + 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0xe0, 0x41, 0x04, 0xe0, 0x41, + 0x01, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x6b, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1f, 0x0a, 0x07, 0x6b, 0x6d, 0x73, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, + 0x65, 0x79, 0x22, 0xf5, 0x01, 0x0a, 0x08, 0x42, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x12, + 0x25, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x67, 0x62, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, + 0x53, 0x69, 0x7a, 0x65, 0x47, 0x62, 0x12, 0x45, 0x0a, 0x09, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x08, 0x64, 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x5a, 0x0a, + 0x0f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x06, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x6b, 0x45, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x07, 0x6b, 0x6d, 0x73, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x04, 0xe0, + 0x41, 0x01, 0x52, 0x06, 0x6b, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x22, 0x48, 0x0a, 0x0e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x05, + 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1b, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x06, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x22, 0xed, 0x08, 0x0a, 0x08, 0x47, 0x63, 0x65, 0x53, 0x65, 0x74, 0x75, + 0x70, 0x12, 0x26, 0x0a, 0x0c, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x6d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x62, 0x0a, 0x13, 0x61, 0x63, 0x63, + 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x6c, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x61, 0x63, 0x63, 0x65, 0x6c, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x59, 0x0a, + 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x44, 0x0a, 0x08, 0x76, 0x6d, 0x5f, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x6d, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x07, 0x76, 0x6d, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x59, + 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x48, 0x00, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x45, 0x0a, 0x09, 0x62, 0x6f, 0x6f, + 0x74, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, + 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x2e, 0x44, 0x61, 0x74, 0x61, 0x44, 0x69, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, + 0x64, 0x61, 0x74, 0x61, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x70, 0x0a, 0x18, 0x73, 0x68, 0x69, + 0x65, 0x6c, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, + 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x68, 0x69, 0x65, 0x6c, 0x64, 0x65, 0x64, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x16, 0x73, 0x68, 0x69, 0x65, 0x6c, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5f, 0x0a, 0x12, 0x6e, + 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x11, 0x6e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x11, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x69, + 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x70, 0x12, 0x17, 0x0a, + 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x52, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x63, 0x65, 0x53, 0x65, 0x74, 0x75, 0x70, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x01, + 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x14, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x70, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, + 0x6e, 0x67, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x12, 0x65, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x70, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, + 0x67, 0x12, 0x5b, 0x0a, 0x11, 0x67, 0x70, 0x75, 0x5f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x50, 0x55, 0x44, 0x72, 0x69, 0x76, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0f, 0x67, + 0x70, 0x75, 0x44, 0x72, 0x69, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x3b, + 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 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, 0x42, 0x07, 0x0a, 0x05, 0x69, + 0x6d, 0x61, 0x67, 0x65, 0x2a, 0x45, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x6b, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x49, 0x53, 0x4b, 0x5f, 0x45, + 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x47, 0x4d, 0x45, 0x4b, 0x10, + 0x01, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4d, 0x45, 0x4b, 0x10, 0x02, 0x2a, 0x63, 0x0a, 0x08, 0x44, + 0x69, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x49, 0x53, 0x4b, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, + 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x44, 0x5f, 0x53, 0x53, 0x44, 0x10, 0x02, 0x12, + 0x0f, 0x0a, 0x0b, 0x50, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x03, + 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x44, 0x5f, 0x45, 0x58, 0x54, 0x52, 0x45, 0x4d, 0x45, 0x10, 0x04, + 0x42, 0xc4, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x42, 0x0d, 0x47, 0x63, 0x65, 0x53, 0x65, 0x74, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x70, 0x62, 0x3b, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x70, 0x62, + 0xaa, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x19, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4e, 0x6f, 0x74, 0x65, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x5c, 0x56, 0x32, 0xea, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_notebooks_v2_gce_setup_proto_rawDescOnce sync.Once + file_google_cloud_notebooks_v2_gce_setup_proto_rawDescData = file_google_cloud_notebooks_v2_gce_setup_proto_rawDesc +) + +func file_google_cloud_notebooks_v2_gce_setup_proto_rawDescGZIP() []byte { + file_google_cloud_notebooks_v2_gce_setup_proto_rawDescOnce.Do(func() { + file_google_cloud_notebooks_v2_gce_setup_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_notebooks_v2_gce_setup_proto_rawDescData) + }) + return file_google_cloud_notebooks_v2_gce_setup_proto_rawDescData +} + +var file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_google_cloud_notebooks_v2_gce_setup_proto_goTypes = []interface{}{ + (DiskEncryption)(0), // 0: google.cloud.notebooks.v2.DiskEncryption + (DiskType)(0), // 1: google.cloud.notebooks.v2.DiskType + (NetworkInterface_NicType)(0), // 2: google.cloud.notebooks.v2.NetworkInterface.NicType + (AcceleratorConfig_AcceleratorType)(0), // 3: google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType + (*NetworkInterface)(nil), // 4: google.cloud.notebooks.v2.NetworkInterface + (*VmImage)(nil), // 5: google.cloud.notebooks.v2.VmImage + (*ContainerImage)(nil), // 6: google.cloud.notebooks.v2.ContainerImage + (*AcceleratorConfig)(nil), // 7: google.cloud.notebooks.v2.AcceleratorConfig + (*ShieldedInstanceConfig)(nil), // 8: google.cloud.notebooks.v2.ShieldedInstanceConfig + (*GPUDriverConfig)(nil), // 9: google.cloud.notebooks.v2.GPUDriverConfig + (*DataDisk)(nil), // 10: google.cloud.notebooks.v2.DataDisk + (*BootDisk)(nil), // 11: google.cloud.notebooks.v2.BootDisk + (*ServiceAccount)(nil), // 12: google.cloud.notebooks.v2.ServiceAccount + (*GceSetup)(nil), // 13: google.cloud.notebooks.v2.GceSetup + nil, // 14: google.cloud.notebooks.v2.GceSetup.MetadataEntry +} +var file_google_cloud_notebooks_v2_gce_setup_proto_depIdxs = []int32{ + 2, // 0: google.cloud.notebooks.v2.NetworkInterface.nic_type:type_name -> google.cloud.notebooks.v2.NetworkInterface.NicType + 3, // 1: google.cloud.notebooks.v2.AcceleratorConfig.type:type_name -> google.cloud.notebooks.v2.AcceleratorConfig.AcceleratorType + 1, // 2: google.cloud.notebooks.v2.DataDisk.disk_type:type_name -> google.cloud.notebooks.v2.DiskType + 0, // 3: google.cloud.notebooks.v2.DataDisk.disk_encryption:type_name -> google.cloud.notebooks.v2.DiskEncryption + 1, // 4: google.cloud.notebooks.v2.BootDisk.disk_type:type_name -> google.cloud.notebooks.v2.DiskType + 0, // 5: google.cloud.notebooks.v2.BootDisk.disk_encryption:type_name -> google.cloud.notebooks.v2.DiskEncryption + 7, // 6: google.cloud.notebooks.v2.GceSetup.accelerator_configs:type_name -> google.cloud.notebooks.v2.AcceleratorConfig + 12, // 7: google.cloud.notebooks.v2.GceSetup.service_accounts:type_name -> google.cloud.notebooks.v2.ServiceAccount + 5, // 8: google.cloud.notebooks.v2.GceSetup.vm_image:type_name -> google.cloud.notebooks.v2.VmImage + 6, // 9: google.cloud.notebooks.v2.GceSetup.container_image:type_name -> google.cloud.notebooks.v2.ContainerImage + 11, // 10: google.cloud.notebooks.v2.GceSetup.boot_disk:type_name -> google.cloud.notebooks.v2.BootDisk + 10, // 11: google.cloud.notebooks.v2.GceSetup.data_disks:type_name -> google.cloud.notebooks.v2.DataDisk + 8, // 12: google.cloud.notebooks.v2.GceSetup.shielded_instance_config:type_name -> google.cloud.notebooks.v2.ShieldedInstanceConfig + 4, // 13: google.cloud.notebooks.v2.GceSetup.network_interfaces:type_name -> google.cloud.notebooks.v2.NetworkInterface + 14, // 14: google.cloud.notebooks.v2.GceSetup.metadata:type_name -> google.cloud.notebooks.v2.GceSetup.MetadataEntry + 9, // 15: google.cloud.notebooks.v2.GceSetup.gpu_driver_config:type_name -> google.cloud.notebooks.v2.GPUDriverConfig + 16, // [16:16] is the sub-list for method output_type + 16, // [16:16] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_google_cloud_notebooks_v2_gce_setup_proto_init() } +func file_google_cloud_notebooks_v2_gce_setup_proto_init() { + if File_google_cloud_notebooks_v2_gce_setup_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NetworkInterface); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*VmImage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerImage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcceleratorConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ShieldedInstanceConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GPUDriverConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DataDisk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootDisk); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServiceAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GceSetup); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*VmImage_Name)(nil), + (*VmImage_Family)(nil), + } + file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*GceSetup_VmImage)(nil), + (*GceSetup_ContainerImage)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_notebooks_v2_gce_setup_proto_rawDesc, + NumEnums: 4, + NumMessages: 11, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_notebooks_v2_gce_setup_proto_goTypes, + DependencyIndexes: file_google_cloud_notebooks_v2_gce_setup_proto_depIdxs, + EnumInfos: file_google_cloud_notebooks_v2_gce_setup_proto_enumTypes, + MessageInfos: file_google_cloud_notebooks_v2_gce_setup_proto_msgTypes, + }.Build() + File_google_cloud_notebooks_v2_gce_setup_proto = out.File + file_google_cloud_notebooks_v2_gce_setup_proto_rawDesc = nil + file_google_cloud_notebooks_v2_gce_setup_proto_goTypes = nil + file_google_cloud_notebooks_v2_gce_setup_proto_depIdxs = nil +} diff --git a/notebooks/apiv2/notebookspb/instance.pb.go b/notebooks/apiv2/notebookspb/instance.pb.go new file mode 100755 index 000000000000..c8912c838a8b --- /dev/null +++ b/notebooks/apiv2/notebookspb/instance.pb.go @@ -0,0 +1,887 @@ +// Copyright 2023 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.31.0 +// protoc v4.23.2 +// source: google/cloud/notebooks/v2/instance.proto + +package notebookspb + +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 definition of the states of this instance. +type State int32 + +const ( + // State is not specified. + State_STATE_UNSPECIFIED State = 0 + // The control logic is starting the instance. + State_STARTING State = 1 + // The control logic is installing required frameworks and registering the + // instance with notebook proxy + State_PROVISIONING State = 2 + // The instance is running. + State_ACTIVE State = 3 + // The control logic is stopping the instance. + State_STOPPING State = 4 + // The instance is stopped. + State_STOPPED State = 5 + // The instance is deleted. + State_DELETED State = 6 + // The instance is upgrading. + State_UPGRADING State = 7 + // The instance is being created. + State_INITIALIZING State = 8 + // The instance is suspending. + State_SUSPENDING State = 9 + // The instance is suspended. + State_SUSPENDED State = 10 +) + +// Enum value maps for State. +var ( + State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "STARTING", + 2: "PROVISIONING", + 3: "ACTIVE", + 4: "STOPPING", + 5: "STOPPED", + 6: "DELETED", + 7: "UPGRADING", + 8: "INITIALIZING", + 9: "SUSPENDING", + 10: "SUSPENDED", + } + State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "STARTING": 1, + "PROVISIONING": 2, + "ACTIVE": 3, + "STOPPING": 4, + "STOPPED": 5, + "DELETED": 6, + "UPGRADING": 7, + "INITIALIZING": 8, + "SUSPENDING": 9, + "SUSPENDED": 10, + } +) + +func (x State) Enum() *State { + p := new(State) + *p = x + return p +} + +func (x State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_notebooks_v2_instance_proto_enumTypes[0].Descriptor() +} + +func (State) Type() protoreflect.EnumType { + return &file_google_cloud_notebooks_v2_instance_proto_enumTypes[0] +} + +func (x State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use State.Descriptor instead. +func (State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_instance_proto_rawDescGZIP(), []int{0} +} + +// The instance health state. +type HealthState int32 + +const ( + // The instance substate is unknown. + HealthState_HEALTH_STATE_UNSPECIFIED HealthState = 0 + // The instance is known to be in an healthy state + // (for example, critical daemons are running) + // Applies to ACTIVE state. + HealthState_HEALTHY HealthState = 1 + // The instance is known to be in an unhealthy state + // (for example, critical daemons are not running) + // Applies to ACTIVE state. + HealthState_UNHEALTHY HealthState = 2 + // The instance has not installed health monitoring agent. + // Applies to ACTIVE state. + HealthState_AGENT_NOT_INSTALLED HealthState = 3 + // The instance health monitoring agent is not running. + // Applies to ACTIVE state. + HealthState_AGENT_NOT_RUNNING HealthState = 4 +) + +// Enum value maps for HealthState. +var ( + HealthState_name = map[int32]string{ + 0: "HEALTH_STATE_UNSPECIFIED", + 1: "HEALTHY", + 2: "UNHEALTHY", + 3: "AGENT_NOT_INSTALLED", + 4: "AGENT_NOT_RUNNING", + } + HealthState_value = map[string]int32{ + "HEALTH_STATE_UNSPECIFIED": 0, + "HEALTHY": 1, + "UNHEALTHY": 2, + "AGENT_NOT_INSTALLED": 3, + "AGENT_NOT_RUNNING": 4, + } +) + +func (x HealthState) Enum() *HealthState { + p := new(HealthState) + *p = x + return p +} + +func (x HealthState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HealthState) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_notebooks_v2_instance_proto_enumTypes[1].Descriptor() +} + +func (HealthState) Type() protoreflect.EnumType { + return &file_google_cloud_notebooks_v2_instance_proto_enumTypes[1] +} + +func (x HealthState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HealthState.Descriptor instead. +func (HealthState) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_instance_proto_rawDescGZIP(), []int{1} +} + +// The definition of the states of this upgrade history entry. +type UpgradeHistoryEntry_State int32 + +const ( + // State is not specified. + UpgradeHistoryEntry_STATE_UNSPECIFIED UpgradeHistoryEntry_State = 0 + // The instance upgrade is started. + UpgradeHistoryEntry_STARTED UpgradeHistoryEntry_State = 1 + // The instance upgrade is succeeded. + UpgradeHistoryEntry_SUCCEEDED UpgradeHistoryEntry_State = 2 + // The instance upgrade is failed. + UpgradeHistoryEntry_FAILED UpgradeHistoryEntry_State = 3 +) + +// Enum value maps for UpgradeHistoryEntry_State. +var ( + UpgradeHistoryEntry_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "STARTED", + 2: "SUCCEEDED", + 3: "FAILED", + } + UpgradeHistoryEntry_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "STARTED": 1, + "SUCCEEDED": 2, + "FAILED": 3, + } +) + +func (x UpgradeHistoryEntry_State) Enum() *UpgradeHistoryEntry_State { + p := new(UpgradeHistoryEntry_State) + *p = x + return p +} + +func (x UpgradeHistoryEntry_State) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UpgradeHistoryEntry_State) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_notebooks_v2_instance_proto_enumTypes[2].Descriptor() +} + +func (UpgradeHistoryEntry_State) Type() protoreflect.EnumType { + return &file_google_cloud_notebooks_v2_instance_proto_enumTypes[2] +} + +func (x UpgradeHistoryEntry_State) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UpgradeHistoryEntry_State.Descriptor instead. +func (UpgradeHistoryEntry_State) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_instance_proto_rawDescGZIP(), []int{0, 0} +} + +// The definition of operations of this upgrade history entry. +type UpgradeHistoryEntry_Action int32 + +const ( + // Operation is not specified. + UpgradeHistoryEntry_ACTION_UNSPECIFIED UpgradeHistoryEntry_Action = 0 + // Upgrade. + UpgradeHistoryEntry_UPGRADE UpgradeHistoryEntry_Action = 1 + // Rollback. + UpgradeHistoryEntry_ROLLBACK UpgradeHistoryEntry_Action = 2 +) + +// Enum value maps for UpgradeHistoryEntry_Action. +var ( + UpgradeHistoryEntry_Action_name = map[int32]string{ + 0: "ACTION_UNSPECIFIED", + 1: "UPGRADE", + 2: "ROLLBACK", + } + UpgradeHistoryEntry_Action_value = map[string]int32{ + "ACTION_UNSPECIFIED": 0, + "UPGRADE": 1, + "ROLLBACK": 2, + } +) + +func (x UpgradeHistoryEntry_Action) Enum() *UpgradeHistoryEntry_Action { + p := new(UpgradeHistoryEntry_Action) + *p = x + return p +} + +func (x UpgradeHistoryEntry_Action) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (UpgradeHistoryEntry_Action) Descriptor() protoreflect.EnumDescriptor { + return file_google_cloud_notebooks_v2_instance_proto_enumTypes[3].Descriptor() +} + +func (UpgradeHistoryEntry_Action) Type() protoreflect.EnumType { + return &file_google_cloud_notebooks_v2_instance_proto_enumTypes[3] +} + +func (x UpgradeHistoryEntry_Action) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use UpgradeHistoryEntry_Action.Descriptor instead. +func (UpgradeHistoryEntry_Action) EnumDescriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_instance_proto_rawDescGZIP(), []int{0, 1} +} + +// The entry of VM image upgrade history. +type UpgradeHistoryEntry struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The snapshot of the boot disk of this notebook instance before + // upgrade. + Snapshot string `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + // Optional. The VM image before this instance upgrade. + VmImage string `protobuf:"bytes,2,opt,name=vm_image,json=vmImage,proto3" json:"vm_image,omitempty"` + // Optional. The container image before this instance upgrade. + ContainerImage string `protobuf:"bytes,3,opt,name=container_image,json=containerImage,proto3" json:"container_image,omitempty"` + // Optional. The framework of this notebook instance. + Framework string `protobuf:"bytes,4,opt,name=framework,proto3" json:"framework,omitempty"` + // Optional. The version of the notebook instance before this upgrade. + Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` + // Output only. The state of this instance upgrade history entry. + State UpgradeHistoryEntry_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.cloud.notebooks.v2.UpgradeHistoryEntry_State" json:"state,omitempty"` + // Immutable. The time that this instance upgrade history entry is created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Optional. Action. Rolloback or Upgrade. + Action UpgradeHistoryEntry_Action `protobuf:"varint,8,opt,name=action,proto3,enum=google.cloud.notebooks.v2.UpgradeHistoryEntry_Action" json:"action,omitempty"` + // Optional. Target VM Version, like m63. + TargetVersion string `protobuf:"bytes,9,opt,name=target_version,json=targetVersion,proto3" json:"target_version,omitempty"` +} + +func (x *UpgradeHistoryEntry) Reset() { + *x = UpgradeHistoryEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpgradeHistoryEntry) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradeHistoryEntry) ProtoMessage() {} + +func (x *UpgradeHistoryEntry) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpgradeHistoryEntry.ProtoReflect.Descriptor instead. +func (*UpgradeHistoryEntry) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_instance_proto_rawDescGZIP(), []int{0} +} + +func (x *UpgradeHistoryEntry) GetSnapshot() string { + if x != nil { + return x.Snapshot + } + return "" +} + +func (x *UpgradeHistoryEntry) GetVmImage() string { + if x != nil { + return x.VmImage + } + return "" +} + +func (x *UpgradeHistoryEntry) GetContainerImage() string { + if x != nil { + return x.ContainerImage + } + return "" +} + +func (x *UpgradeHistoryEntry) GetFramework() string { + if x != nil { + return x.Framework + } + return "" +} + +func (x *UpgradeHistoryEntry) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *UpgradeHistoryEntry) GetState() UpgradeHistoryEntry_State { + if x != nil { + return x.State + } + return UpgradeHistoryEntry_STATE_UNSPECIFIED +} + +func (x *UpgradeHistoryEntry) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *UpgradeHistoryEntry) GetAction() UpgradeHistoryEntry_Action { + if x != nil { + return x.Action + } + return UpgradeHistoryEntry_ACTION_UNSPECIFIED +} + +func (x *UpgradeHistoryEntry) GetTargetVersion() string { + if x != nil { + return x.TargetVersion + } + return "" +} + +// The definition of a notebook instance. +type Instance struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Output only. The name of this notebook instance. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Setup for the Notebook instance. + // + // Types that are assignable to Infrastructure: + // *Instance_GceSetup + Infrastructure isInstance_Infrastructure `protobuf_oneof:"infrastructure"` + // Output only. The proxy endpoint that is used to access the Jupyter + // notebook. + ProxyUri string `protobuf:"bytes,3,opt,name=proxy_uri,json=proxyUri,proto3" json:"proxy_uri,omitempty"` + // Optional. Input only. The owner of this instance after creation. Format: + // `alias@example.com` + // + // Currently supports one owner only. If not specified, all of the service + // account users of your VM instance's service account can use + // the instance. + InstanceOwners []string `protobuf:"bytes,4,rep,name=instance_owners,json=instanceOwners,proto3" json:"instance_owners,omitempty"` + // Output only. Email address of entity that sent original CreateInstance + // request. + Creator string `protobuf:"bytes,5,opt,name=creator,proto3" json:"creator,omitempty"` + // Output only. The state of this instance. + State State `protobuf:"varint,6,opt,name=state,proto3,enum=google.cloud.notebooks.v2.State" json:"state,omitempty"` + // Output only. The upgrade history of this instance. + UpgradeHistory []*UpgradeHistoryEntry `protobuf:"bytes,7,rep,name=upgrade_history,json=upgradeHistory,proto3" json:"upgrade_history,omitempty"` + // Output only. Unique ID of the resource. + Id string `protobuf:"bytes,8,opt,name=id,proto3" json:"id,omitempty"` + // Output only. Instance health_state. + HealthState HealthState `protobuf:"varint,9,opt,name=health_state,json=healthState,proto3,enum=google.cloud.notebooks.v2.HealthState" json:"health_state,omitempty"` + // Output only. Additional information about instance health. + // Example: + // + // healthInfo": { + // "docker_proxy_agent_status": "1", + // "docker_status": "1", + // "jupyterlab_api_status": "-1", + // "jupyterlab_status": "-1", + // "updated": "2020-10-18 09:40:03.573409" + // } + HealthInfo map[string]string `protobuf:"bytes,10,rep,name=health_info,json=healthInfo,proto3" json:"health_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Output only. Instance creation time. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // Output only. Instance update time. + UpdateTime *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` + // Optional. If true, the notebook instance will not register with the proxy. + DisableProxyAccess bool `protobuf:"varint,13,opt,name=disable_proxy_access,json=disableProxyAccess,proto3" json:"disable_proxy_access,omitempty"` + // Optional. Labels to apply to this instance. + // These can be later modified by the UpdateInstance method. + Labels map[string]string `protobuf:"bytes,14,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Instance) Reset() { + *x = Instance{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Instance) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Instance) ProtoMessage() {} + +func (x *Instance) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_instance_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Instance.ProtoReflect.Descriptor instead. +func (*Instance) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_instance_proto_rawDescGZIP(), []int{1} +} + +func (x *Instance) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (m *Instance) GetInfrastructure() isInstance_Infrastructure { + if m != nil { + return m.Infrastructure + } + return nil +} + +func (x *Instance) GetGceSetup() *GceSetup { + if x, ok := x.GetInfrastructure().(*Instance_GceSetup); ok { + return x.GceSetup + } + return nil +} + +func (x *Instance) GetProxyUri() string { + if x != nil { + return x.ProxyUri + } + return "" +} + +func (x *Instance) GetInstanceOwners() []string { + if x != nil { + return x.InstanceOwners + } + return nil +} + +func (x *Instance) GetCreator() string { + if x != nil { + return x.Creator + } + return "" +} + +func (x *Instance) GetState() State { + if x != nil { + return x.State + } + return State_STATE_UNSPECIFIED +} + +func (x *Instance) GetUpgradeHistory() []*UpgradeHistoryEntry { + if x != nil { + return x.UpgradeHistory + } + return nil +} + +func (x *Instance) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Instance) GetHealthState() HealthState { + if x != nil { + return x.HealthState + } + return HealthState_HEALTH_STATE_UNSPECIFIED +} + +func (x *Instance) GetHealthInfo() map[string]string { + if x != nil { + return x.HealthInfo + } + return nil +} + +func (x *Instance) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *Instance) GetUpdateTime() *timestamppb.Timestamp { + if x != nil { + return x.UpdateTime + } + return nil +} + +func (x *Instance) GetDisableProxyAccess() bool { + if x != nil { + return x.DisableProxyAccess + } + return false +} + +func (x *Instance) GetLabels() map[string]string { + if x != nil { + return x.Labels + } + return nil +} + +type isInstance_Infrastructure interface { + isInstance_Infrastructure() +} + +type Instance_GceSetup struct { + // Optional. Compute Engine setup for the notebook. Uses notebook-defined + // fields. + GceSetup *GceSetup `protobuf:"bytes,2,opt,name=gce_setup,json=gceSetup,proto3,oneof"` +} + +func (*Instance_GceSetup) isInstance_Infrastructure() {} + +var File_google_cloud_notebooks_v2_instance_proto protoreflect.FileDescriptor + +var file_google_cloud_notebooks_v2_instance_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, + 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 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, 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, 0x29, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, + 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x63, 0x65, + 0x5f, 0x73, 0x65, 0x74, 0x75, 0x70, 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, 0xde, 0x04, + 0x0a, 0x13, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, 0x73, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x1e, 0x0a, 0x08, 0x76, 0x6d, 0x5f, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x76, + 0x6d, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x12, 0x21, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, + 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x66, 0x72, + 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x1d, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x07, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 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, 0x05, 0x52, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x06, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x48, 0x69, 0x73, + 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, + 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x46, 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, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x41, + 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, + 0x44, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, + 0x03, 0x22, 0x3b, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x41, + 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x45, 0x10, 0x01, + 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x02, 0x22, 0xc9, + 0x08, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x09, 0x67, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x75, + 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x63, 0x65, 0x53, 0x65, 0x74, 0x75, 0x70, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x48, 0x00, 0x52, 0x08, 0x67, 0x63, 0x65, 0x53, 0x65, 0x74, 0x75, 0x70, 0x12, 0x20, 0x0a, + 0x09, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x55, 0x72, 0x69, 0x12, + 0x2f, 0x0a, 0x0f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x04, 0xe0, 0x41, 0x01, + 0x52, 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x73, + 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x6f, 0x72, 0x12, + 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, + 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x5c, 0x0a, 0x0f, + 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72, + 0x61, 0x64, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x13, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x4e, 0x0a, 0x0c, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, + 0x41, 0x03, 0x52, 0x0b, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x59, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x0a, + 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x40, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x61, 0x74, 0x65, 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, 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, 0x0c, 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, 0x35, + 0x0a, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x12, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4c, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, + 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x49, 0x6e, 0x73, 0x74, 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, 0x1a, 0x3d, 0x0a, 0x0f, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x49, 0x6e, 0x66, + 0x6f, 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, 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, 0x3a, 0x79, 0xea, + 0x41, 0x76, 0x0a, 0x21, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x3c, 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, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x7d, 0x2a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x32, 0x08, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x10, 0x0a, 0x0e, 0x69, 0x6e, 0x66, 0x72, + 0x61, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x2a, 0xb2, 0x01, 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, 0x0c, 0x0a, 0x08, 0x53, + 0x54, 0x41, 0x52, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x4f, + 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x41, + 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x54, 0x4f, 0x50, 0x50, + 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x4f, 0x50, 0x50, 0x45, 0x44, + 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x06, 0x12, + 0x0d, 0x0a, 0x09, 0x55, 0x50, 0x47, 0x52, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x10, + 0x0a, 0x0c, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x49, 0x4e, 0x47, 0x10, 0x08, + 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x09, + 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x0a, 0x2a, + 0x77, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, + 0x0a, 0x18, 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, + 0x48, 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x48, + 0x45, 0x41, 0x4c, 0x54, 0x48, 0x59, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x47, 0x45, 0x4e, + 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x45, 0x44, 0x10, + 0x03, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x52, + 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x42, 0xc4, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, + 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x42, 0x0d, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, + 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, + 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, + 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x70, 0x62, 0x3b, 0x6e, 0x6f, 0x74, + 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x70, 0x62, 0xaa, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, + 0x6f, 0x75, 0x64, 0x5c, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x5c, 0x56, 0x32, + 0xea, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x3a, 0x3a, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x3a, 0x3a, 0x56, 0x32, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_notebooks_v2_instance_proto_rawDescOnce sync.Once + file_google_cloud_notebooks_v2_instance_proto_rawDescData = file_google_cloud_notebooks_v2_instance_proto_rawDesc +) + +func file_google_cloud_notebooks_v2_instance_proto_rawDescGZIP() []byte { + file_google_cloud_notebooks_v2_instance_proto_rawDescOnce.Do(func() { + file_google_cloud_notebooks_v2_instance_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_notebooks_v2_instance_proto_rawDescData) + }) + return file_google_cloud_notebooks_v2_instance_proto_rawDescData +} + +var file_google_cloud_notebooks_v2_instance_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_google_cloud_notebooks_v2_instance_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_google_cloud_notebooks_v2_instance_proto_goTypes = []interface{}{ + (State)(0), // 0: google.cloud.notebooks.v2.State + (HealthState)(0), // 1: google.cloud.notebooks.v2.HealthState + (UpgradeHistoryEntry_State)(0), // 2: google.cloud.notebooks.v2.UpgradeHistoryEntry.State + (UpgradeHistoryEntry_Action)(0), // 3: google.cloud.notebooks.v2.UpgradeHistoryEntry.Action + (*UpgradeHistoryEntry)(nil), // 4: google.cloud.notebooks.v2.UpgradeHistoryEntry + (*Instance)(nil), // 5: google.cloud.notebooks.v2.Instance + nil, // 6: google.cloud.notebooks.v2.Instance.HealthInfoEntry + nil, // 7: google.cloud.notebooks.v2.Instance.LabelsEntry + (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp + (*GceSetup)(nil), // 9: google.cloud.notebooks.v2.GceSetup +} +var file_google_cloud_notebooks_v2_instance_proto_depIdxs = []int32{ + 2, // 0: google.cloud.notebooks.v2.UpgradeHistoryEntry.state:type_name -> google.cloud.notebooks.v2.UpgradeHistoryEntry.State + 8, // 1: google.cloud.notebooks.v2.UpgradeHistoryEntry.create_time:type_name -> google.protobuf.Timestamp + 3, // 2: google.cloud.notebooks.v2.UpgradeHistoryEntry.action:type_name -> google.cloud.notebooks.v2.UpgradeHistoryEntry.Action + 9, // 3: google.cloud.notebooks.v2.Instance.gce_setup:type_name -> google.cloud.notebooks.v2.GceSetup + 0, // 4: google.cloud.notebooks.v2.Instance.state:type_name -> google.cloud.notebooks.v2.State + 4, // 5: google.cloud.notebooks.v2.Instance.upgrade_history:type_name -> google.cloud.notebooks.v2.UpgradeHistoryEntry + 1, // 6: google.cloud.notebooks.v2.Instance.health_state:type_name -> google.cloud.notebooks.v2.HealthState + 6, // 7: google.cloud.notebooks.v2.Instance.health_info:type_name -> google.cloud.notebooks.v2.Instance.HealthInfoEntry + 8, // 8: google.cloud.notebooks.v2.Instance.create_time:type_name -> google.protobuf.Timestamp + 8, // 9: google.cloud.notebooks.v2.Instance.update_time:type_name -> google.protobuf.Timestamp + 7, // 10: google.cloud.notebooks.v2.Instance.labels:type_name -> google.cloud.notebooks.v2.Instance.LabelsEntry + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_google_cloud_notebooks_v2_instance_proto_init() } +func file_google_cloud_notebooks_v2_instance_proto_init() { + if File_google_cloud_notebooks_v2_instance_proto != nil { + return + } + file_google_cloud_notebooks_v2_gce_setup_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_notebooks_v2_instance_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpgradeHistoryEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_instance_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Instance); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_google_cloud_notebooks_v2_instance_proto_msgTypes[1].OneofWrappers = []interface{}{ + (*Instance_GceSetup)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_notebooks_v2_instance_proto_rawDesc, + NumEnums: 4, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_cloud_notebooks_v2_instance_proto_goTypes, + DependencyIndexes: file_google_cloud_notebooks_v2_instance_proto_depIdxs, + EnumInfos: file_google_cloud_notebooks_v2_instance_proto_enumTypes, + MessageInfos: file_google_cloud_notebooks_v2_instance_proto_msgTypes, + }.Build() + File_google_cloud_notebooks_v2_instance_proto = out.File + file_google_cloud_notebooks_v2_instance_proto_rawDesc = nil + file_google_cloud_notebooks_v2_instance_proto_goTypes = nil + file_google_cloud_notebooks_v2_instance_proto_depIdxs = nil +} diff --git a/notebooks/apiv2/notebookspb/service.pb.go b/notebooks/apiv2/notebookspb/service.pb.go new file mode 100755 index 000000000000..ced2d8d7fa69 --- /dev/null +++ b/notebooks/apiv2/notebookspb/service.pb.go @@ -0,0 +1,2165 @@ +// Copyright 2023 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.31.0 +// protoc v4.23.2 +// source: google/cloud/notebooks/v2/service.proto + +package notebookspb + +import ( + context "context" + reflect "reflect" + sync "sync" + + longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + 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) +) + +// Represents the metadata of the long-running operation. +type OperationMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The time the operation was created. + CreateTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + // The time the operation finished running. + EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + // Server-defined resource path for the target of the operation. + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` + // Name of the verb executed by the operation. + Verb string `protobuf:"bytes,4,opt,name=verb,proto3" json:"verb,omitempty"` + // Human-readable status of the operation, if any. + StatusMessage string `protobuf:"bytes,5,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` + // Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + RequestedCancellation bool `protobuf:"varint,6,opt,name=requested_cancellation,json=requestedCancellation,proto3" json:"requested_cancellation,omitempty"` + // API version used to start the operation. + ApiVersion string `protobuf:"bytes,7,opt,name=api_version,json=apiVersion,proto3" json:"api_version,omitempty"` + // API endpoint name of this operation. + Endpoint string `protobuf:"bytes,8,opt,name=endpoint,proto3" json:"endpoint,omitempty"` +} + +func (x *OperationMetadata) Reset() { + *x = OperationMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OperationMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationMetadata) ProtoMessage() {} + +func (x *OperationMetadata) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationMetadata.ProtoReflect.Descriptor instead. +func (*OperationMetadata) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{0} +} + +func (x *OperationMetadata) GetCreateTime() *timestamppb.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + +func (x *OperationMetadata) GetEndTime() *timestamppb.Timestamp { + if x != nil { + return x.EndTime + } + return nil +} + +func (x *OperationMetadata) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *OperationMetadata) GetVerb() string { + if x != nil { + return x.Verb + } + return "" +} + +func (x *OperationMetadata) GetStatusMessage() string { + if x != nil { + return x.StatusMessage + } + return "" +} + +func (x *OperationMetadata) GetRequestedCancellation() bool { + if x != nil { + return x.RequestedCancellation + } + return false +} + +func (x *OperationMetadata) GetApiVersion() string { + if x != nil { + return x.ApiVersion + } + return "" +} + +func (x *OperationMetadata) GetEndpoint() string { + if x != nil { + return x.Endpoint + } + return "" +} + +// Request for listing notebook instances. +type ListInstancesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Optional. Maximum return size of the list call. + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Optional. A previous returned page token that can be used to continue + // listing from the last result. + PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` + // Optional. Sort results. Supported values are "name", "name desc" or "" + // (unsorted). + OrderBy string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"` + // Optional. List filter. + Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` +} + +func (x *ListInstancesRequest) Reset() { + *x = ListInstancesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstancesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstancesRequest) ProtoMessage() {} + +func (x *ListInstancesRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstancesRequest.ProtoReflect.Descriptor instead. +func (*ListInstancesRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{1} +} + +func (x *ListInstancesRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *ListInstancesRequest) GetPageSize() int32 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *ListInstancesRequest) GetPageToken() string { + if x != nil { + return x.PageToken + } + return "" +} + +func (x *ListInstancesRequest) GetOrderBy() string { + if x != nil { + return x.OrderBy + } + return "" +} + +func (x *ListInstancesRequest) GetFilter() string { + if x != nil { + return x.Filter + } + return "" +} + +// Response for listing notebook instances. +type ListInstancesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of returned instances. + Instances []*Instance `protobuf:"bytes,1,rep,name=instances,proto3" json:"instances,omitempty"` + // Page token that can be used to continue listing from the last result in the + // next list call. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` + // Locations that could not be reached. For example, + // ['us-west1-a', 'us-central1-b']. + // A ListInstancesResponse will only contain either instances or unreachables, + Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"` +} + +func (x *ListInstancesResponse) Reset() { + *x = ListInstancesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListInstancesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListInstancesResponse) ProtoMessage() {} + +func (x *ListInstancesResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListInstancesResponse.ProtoReflect.Descriptor instead. +func (*ListInstancesResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{2} +} + +func (x *ListInstancesResponse) GetInstances() []*Instance { + if x != nil { + return x.Instances + } + return nil +} + +func (x *ListInstancesResponse) GetNextPageToken() string { + if x != nil { + return x.NextPageToken + } + return "" +} + +func (x *ListInstancesResponse) GetUnreachable() []string { + if x != nil { + return x.Unreachable + } + return nil +} + +// Request for getting a notebook instance. +type GetInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *GetInstanceRequest) Reset() { + *x = GetInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetInstanceRequest) ProtoMessage() {} + +func (x *GetInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetInstanceRequest.ProtoReflect.Descriptor instead. +func (*GetInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{3} +} + +func (x *GetInstanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request for creating a notebook instance. +type CreateInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `parent=projects/{project_id}/locations/{location}` + Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"` + // Required. User-defined unique ID of this instance. + InstanceId string `protobuf:"bytes,2,opt,name=instance_id,json=instanceId,proto3" json:"instance_id,omitempty"` + // Required. The instance to be created. + Instance *Instance `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"` + // Optional. Idempotent request UUID. + RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *CreateInstanceRequest) Reset() { + *x = CreateInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateInstanceRequest) ProtoMessage() {} + +func (x *CreateInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateInstanceRequest.ProtoReflect.Descriptor instead. +func (*CreateInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{4} +} + +func (x *CreateInstanceRequest) GetParent() string { + if x != nil { + return x.Parent + } + return "" +} + +func (x *CreateInstanceRequest) GetInstanceId() string { + if x != nil { + return x.InstanceId + } + return "" +} + +func (x *CreateInstanceRequest) GetInstance() *Instance { + if x != nil { + return x.Instance + } + return nil +} + +func (x *CreateInstanceRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Request for updating a notebook instance. +type UpdateInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. A representation of an instance. + Instance *Instance `protobuf:"bytes,1,opt,name=instance,proto3" json:"instance,omitempty"` + // Required. Mask used to update an instance + UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` + // Optional. Idempotent request UUID. + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *UpdateInstanceRequest) Reset() { + *x = UpdateInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateInstanceRequest) ProtoMessage() {} + +func (x *UpdateInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateInstanceRequest.ProtoReflect.Descriptor instead. +func (*UpdateInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{5} +} + +func (x *UpdateInstanceRequest) GetInstance() *Instance { + if x != nil { + return x.Instance + } + return nil +} + +func (x *UpdateInstanceRequest) GetUpdateMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.UpdateMask + } + return nil +} + +func (x *UpdateInstanceRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Request for deleting a notebook instance. +type DeleteInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Optional. Idempotent request UUID. + RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` +} + +func (x *DeleteInstanceRequest) Reset() { + *x = DeleteInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteInstanceRequest) ProtoMessage() {} + +func (x *DeleteInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteInstanceRequest.ProtoReflect.Descriptor instead. +func (*DeleteInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{6} +} + +func (x *DeleteInstanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DeleteInstanceRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +// Request for starting a notebook instance +type StartInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *StartInstanceRequest) Reset() { + *x = StartInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StartInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartInstanceRequest) ProtoMessage() {} + +func (x *StartInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartInstanceRequest.ProtoReflect.Descriptor instead. +func (*StartInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{7} +} + +func (x *StartInstanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request for stopping a notebook instance +type StopInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *StopInstanceRequest) Reset() { + *x = StopInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StopInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StopInstanceRequest) ProtoMessage() {} + +func (x *StopInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StopInstanceRequest.ProtoReflect.Descriptor instead. +func (*StopInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{8} +} + +func (x *StopInstanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request for resetting a notebook instance +type ResetInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *ResetInstanceRequest) Reset() { + *x = ResetInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResetInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResetInstanceRequest) ProtoMessage() {} + +func (x *ResetInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResetInstanceRequest.ProtoReflect.Descriptor instead. +func (*ResetInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{9} +} + +func (x *ResetInstanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request for checking if a notebook instance is upgradeable. +type CheckInstanceUpgradabilityRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + NotebookInstance string `protobuf:"bytes,1,opt,name=notebook_instance,json=notebookInstance,proto3" json:"notebook_instance,omitempty"` +} + +func (x *CheckInstanceUpgradabilityRequest) Reset() { + *x = CheckInstanceUpgradabilityRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckInstanceUpgradabilityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckInstanceUpgradabilityRequest) ProtoMessage() {} + +func (x *CheckInstanceUpgradabilityRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckInstanceUpgradabilityRequest.ProtoReflect.Descriptor instead. +func (*CheckInstanceUpgradabilityRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{10} +} + +func (x *CheckInstanceUpgradabilityRequest) GetNotebookInstance() string { + if x != nil { + return x.NotebookInstance + } + return "" +} + +// Response for checking if a notebook instance is upgradeable. +type CheckInstanceUpgradabilityResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // If an instance is upgradeable. + Upgradeable bool `protobuf:"varint,1,opt,name=upgradeable,proto3" json:"upgradeable,omitempty"` + // The version this instance will be upgraded to if calling the upgrade + // endpoint. This field will only be populated if field upgradeable is true. + UpgradeVersion string `protobuf:"bytes,2,opt,name=upgrade_version,json=upgradeVersion,proto3" json:"upgrade_version,omitempty"` + // Additional information about upgrade. + UpgradeInfo string `protobuf:"bytes,3,opt,name=upgrade_info,json=upgradeInfo,proto3" json:"upgrade_info,omitempty"` + // The new image self link this instance will be upgraded to if calling the + // upgrade endpoint. This field will only be populated if field upgradeable + // is true. + UpgradeImage string `protobuf:"bytes,4,opt,name=upgrade_image,json=upgradeImage,proto3" json:"upgrade_image,omitempty"` +} + +func (x *CheckInstanceUpgradabilityResponse) Reset() { + *x = CheckInstanceUpgradabilityResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckInstanceUpgradabilityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckInstanceUpgradabilityResponse) ProtoMessage() {} + +func (x *CheckInstanceUpgradabilityResponse) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckInstanceUpgradabilityResponse.ProtoReflect.Descriptor instead. +func (*CheckInstanceUpgradabilityResponse) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{11} +} + +func (x *CheckInstanceUpgradabilityResponse) GetUpgradeable() bool { + if x != nil { + return x.Upgradeable + } + return false +} + +func (x *CheckInstanceUpgradabilityResponse) GetUpgradeVersion() string { + if x != nil { + return x.UpgradeVersion + } + return "" +} + +func (x *CheckInstanceUpgradabilityResponse) GetUpgradeInfo() string { + if x != nil { + return x.UpgradeInfo + } + return "" +} + +func (x *CheckInstanceUpgradabilityResponse) GetUpgradeImage() string { + if x != nil { + return x.UpgradeImage + } + return "" +} + +// Request for upgrading a notebook instance +type UpgradeInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *UpgradeInstanceRequest) Reset() { + *x = UpgradeInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpgradeInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpgradeInstanceRequest) ProtoMessage() {} + +func (x *UpgradeInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpgradeInstanceRequest.ProtoReflect.Descriptor instead. +func (*UpgradeInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{12} +} + +func (x *UpgradeInstanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// Request for rollbacking a notebook instance +type RollbackInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. The snapshot for rollback. + // Example: "projects/test-project/global/snapshots/krwlzipynril". + TargetSnapshot string `protobuf:"bytes,2,opt,name=target_snapshot,json=targetSnapshot,proto3" json:"target_snapshot,omitempty"` + // Required. Output only. Revision Id + RevisionId string `protobuf:"bytes,3,opt,name=revision_id,json=revisionId,proto3" json:"revision_id,omitempty"` +} + +func (x *RollbackInstanceRequest) Reset() { + *x = RollbackInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RollbackInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RollbackInstanceRequest) ProtoMessage() {} + +func (x *RollbackInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RollbackInstanceRequest.ProtoReflect.Descriptor instead. +func (*RollbackInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{13} +} + +func (x *RollbackInstanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *RollbackInstanceRequest) GetTargetSnapshot() string { + if x != nil { + return x.TargetSnapshot + } + return "" +} + +func (x *RollbackInstanceRequest) GetRevisionId() string { + if x != nil { + return x.RevisionId + } + return "" +} + +// Request for creating a notebook instance diagnostic file. +type DiagnoseInstanceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Format: + // `projects/{project_id}/locations/{location}/instances/{instance_id}` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. Defines flags that are used to run the diagnostic tool + DiagnosticConfig *DiagnosticConfig `protobuf:"bytes,2,opt,name=diagnostic_config,json=diagnosticConfig,proto3" json:"diagnostic_config,omitempty"` + // Optional. Maxmium amount of time in minutes before the operation times out. + TimeoutMinutes int32 `protobuf:"varint,3,opt,name=timeout_minutes,json=timeoutMinutes,proto3" json:"timeout_minutes,omitempty"` +} + +func (x *DiagnoseInstanceRequest) Reset() { + *x = DiagnoseInstanceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiagnoseInstanceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiagnoseInstanceRequest) ProtoMessage() {} + +func (x *DiagnoseInstanceRequest) ProtoReflect() protoreflect.Message { + mi := &file_google_cloud_notebooks_v2_service_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiagnoseInstanceRequest.ProtoReflect.Descriptor instead. +func (*DiagnoseInstanceRequest) Descriptor() ([]byte, []int) { + return file_google_cloud_notebooks_v2_service_proto_rawDescGZIP(), []int{14} +} + +func (x *DiagnoseInstanceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *DiagnoseInstanceRequest) GetDiagnosticConfig() *DiagnosticConfig { + if x != nil { + return x.DiagnosticConfig + } + return nil +} + +func (x *DiagnoseInstanceRequest) GetTimeoutMinutes() int32 { + if x != nil { + return x.TimeoutMinutes + } + return 0 +} + +var File_google_cloud_notebooks_v2_service_proto protoreflect.FileDescriptor + +var file_google_cloud_notebooks_v2_service_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, + 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 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, 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, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2f, + 0x76, 0x32, 0x2f, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x6c, 0x6f, 0x6e, + 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, + 0x73, 0x6b, 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, 0xce, 0x02, 0x0a, 0x11, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, + 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, + 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, + 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x76, + 0x65, 0x72, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, + 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x65, 0x64, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, + 0x64, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, + 0x0b, 0x61, 0x70, 0x69, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, + 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x22, 0xdc, 0x01, 0x0a, 0x14, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x12, 0x21, 0x6e, 0x6f, 0x74, + 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x08, + 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x0a, 0x08, + 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x01, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x1b, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, + 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0xa4, 0x01, 0x0a, 0x15, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x09, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, + 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x20, + 0x0a, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x6e, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x6c, 0x65, + 0x22, 0x53, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6e, 0x6f, + 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xea, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x12, 0x21, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x06, 0x70, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x44, 0x0a, 0x08, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x22, + 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x08, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, + 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, + 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x22, 0x7a, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x22, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x49, 0x64, 0x22, 0x2f, 0x0a, 0x14, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x70, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x65, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x55, 0x0a, 0x21, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x11, 0x6e, + 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x6e, 0x6f, 0x74, + 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x22, 0xb7, 0x01, + 0x0a, 0x22, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x61, + 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, + 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x0d, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x22, 0x31, 0x0a, 0x16, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x52, + 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, 0x6e, 0x6f, + 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, + 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, + 0xe0, 0x41, 0x02, 0x52, 0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x12, 0x27, 0x0a, 0x0b, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xe0, 0x41, 0x03, 0xe0, 0x41, 0x02, + 0x52, 0x0a, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xe5, 0x01, 0x0a, + 0x17, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x29, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x23, 0x0a, 0x21, + 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x5d, 0x0a, 0x11, 0x64, 0x69, 0x61, 0x67, 0x6e, + 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, + 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2c, 0x0a, 0x0f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x5f, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x42, + 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0e, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x4d, 0x69, 0x6e, + 0x75, 0x74, 0x65, 0x73, 0x32, 0xfa, 0x13, 0x0a, 0x0f, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb2, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, + 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, + 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0xda, + 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x12, 0x2d, + 0x2f, 0x76, 0x32, 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, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x9f, 0x01, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, + 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x22, 0x3c, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, + 0x12, 0x2d, 0x2f, 0x76, 0x32, 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, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, + 0xe0, 0x01, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, + 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, + 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0x7d, 0xca, 0x41, 0x1d, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x1b, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x5f, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x22, 0x2d, 0x2f, 0x76, 0x32, 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, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x73, 0x12, 0xe2, 0x01, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, + 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, + 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7f, 0xca, 0x41, 0x1d, 0x0a, 0x08, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x3a, 0x08, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x32, + 0x36, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 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, 0x69, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xcc, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x69, 0xca, 0x41, 0x2a, + 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x2a, 0x2d, 0x2f, 0x76, 0x32, 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, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0xbf, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5e, 0xca, 0x41, 0x1d, 0x0a, 0x08, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, + 0x3a, 0x01, 0x2a, 0x22, 0x33, 0x2f, 0x76, 0x32, 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, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0xbc, 0x01, 0x0a, 0x0c, 0x53, 0x74, 0x6f, + 0x70, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5d, 0xca, 0x41, 0x1d, 0x0a, 0x08, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, + 0x3a, 0x01, 0x2a, 0x22, 0x32, 0x2f, 0x76, 0x32, 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, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, + 0x2a, 0x7d, 0x3a, 0x73, 0x74, 0x6f, 0x70, 0x12, 0xbf, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, + 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5e, 0xca, 0x41, 0x1d, 0x0a, 0x08, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x38, 0x3a, 0x01, 0x2a, 0x22, 0x33, 0x2f, 0x76, 0x32, 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, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, + 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0xf0, 0x01, 0x0a, 0x1a, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, + 0x64, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4f, 0x12, 0x4d, 0x2f, + 0x76, 0x32, 0x2f, 0x7b, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 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, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x55, + 0x70, 0x67, 0x72, 0x61, 0x64, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0xc5, 0x01, 0x0a, + 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x12, 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, + 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x60, 0xca, 0x41, 0x1d, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x3a, 0x01, 0x2a, 0x22, 0x35, 0x2f, + 0x76, 0x32, 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, + 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x70, 0x67, + 0x72, 0x61, 0x64, 0x65, 0x12, 0xc8, 0x01, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, + 0x6b, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0xca, 0x41, + 0x1d, 0x0a, 0x08, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x3b, 0x3a, 0x01, 0x2a, 0x22, 0x36, 0x2f, 0x76, 0x32, 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, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x72, 0x6f, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, + 0xe1, 0x01, 0x0a, 0x10, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x12, 0x32, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, + 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x76, 0x32, + 0x2e, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x7a, 0xca, 0x41, 0x1d, 0x0a, 0x08, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x11, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xda, 0x41, 0x16, 0x6e, 0x61, 0x6d, 0x65, + 0x2c, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x3a, 0x01, 0x2a, 0x22, 0x36, 0x2f, 0x76, 0x32, + 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, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x64, 0x69, 0x61, 0x67, 0x6e, + 0x6f, 0x73, 0x65, 0x1a, 0x4c, 0xca, 0x41, 0x18, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, + 0x73, 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, 0xc3, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, + 0x2e, 0x76, 0x32, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, + 0x6b, 0x73, 0x70, 0x62, 0x3b, 0x6e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x70, 0x62, + 0xaa, 0x02, 0x19, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x2e, + 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x19, 0x47, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x4e, 0x6f, 0x74, 0x65, + 0x62, 0x6f, 0x6f, 0x6b, 0x73, 0x5c, 0x56, 0x32, 0xea, 0x02, 0x1c, 0x47, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x3a, 0x3a, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x3a, 0x3a, 0x4e, 0x6f, 0x74, 0x65, 0x62, 0x6f, + 0x6f, 0x6b, 0x73, 0x3a, 0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_cloud_notebooks_v2_service_proto_rawDescOnce sync.Once + file_google_cloud_notebooks_v2_service_proto_rawDescData = file_google_cloud_notebooks_v2_service_proto_rawDesc +) + +func file_google_cloud_notebooks_v2_service_proto_rawDescGZIP() []byte { + file_google_cloud_notebooks_v2_service_proto_rawDescOnce.Do(func() { + file_google_cloud_notebooks_v2_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_notebooks_v2_service_proto_rawDescData) + }) + return file_google_cloud_notebooks_v2_service_proto_rawDescData +} + +var file_google_cloud_notebooks_v2_service_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_google_cloud_notebooks_v2_service_proto_goTypes = []interface{}{ + (*OperationMetadata)(nil), // 0: google.cloud.notebooks.v2.OperationMetadata + (*ListInstancesRequest)(nil), // 1: google.cloud.notebooks.v2.ListInstancesRequest + (*ListInstancesResponse)(nil), // 2: google.cloud.notebooks.v2.ListInstancesResponse + (*GetInstanceRequest)(nil), // 3: google.cloud.notebooks.v2.GetInstanceRequest + (*CreateInstanceRequest)(nil), // 4: google.cloud.notebooks.v2.CreateInstanceRequest + (*UpdateInstanceRequest)(nil), // 5: google.cloud.notebooks.v2.UpdateInstanceRequest + (*DeleteInstanceRequest)(nil), // 6: google.cloud.notebooks.v2.DeleteInstanceRequest + (*StartInstanceRequest)(nil), // 7: google.cloud.notebooks.v2.StartInstanceRequest + (*StopInstanceRequest)(nil), // 8: google.cloud.notebooks.v2.StopInstanceRequest + (*ResetInstanceRequest)(nil), // 9: google.cloud.notebooks.v2.ResetInstanceRequest + (*CheckInstanceUpgradabilityRequest)(nil), // 10: google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest + (*CheckInstanceUpgradabilityResponse)(nil), // 11: google.cloud.notebooks.v2.CheckInstanceUpgradabilityResponse + (*UpgradeInstanceRequest)(nil), // 12: google.cloud.notebooks.v2.UpgradeInstanceRequest + (*RollbackInstanceRequest)(nil), // 13: google.cloud.notebooks.v2.RollbackInstanceRequest + (*DiagnoseInstanceRequest)(nil), // 14: google.cloud.notebooks.v2.DiagnoseInstanceRequest + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*Instance)(nil), // 16: google.cloud.notebooks.v2.Instance + (*fieldmaskpb.FieldMask)(nil), // 17: google.protobuf.FieldMask + (*DiagnosticConfig)(nil), // 18: google.cloud.notebooks.v2.DiagnosticConfig + (*longrunningpb.Operation)(nil), // 19: google.longrunning.Operation +} +var file_google_cloud_notebooks_v2_service_proto_depIdxs = []int32{ + 15, // 0: google.cloud.notebooks.v2.OperationMetadata.create_time:type_name -> google.protobuf.Timestamp + 15, // 1: google.cloud.notebooks.v2.OperationMetadata.end_time:type_name -> google.protobuf.Timestamp + 16, // 2: google.cloud.notebooks.v2.ListInstancesResponse.instances:type_name -> google.cloud.notebooks.v2.Instance + 16, // 3: google.cloud.notebooks.v2.CreateInstanceRequest.instance:type_name -> google.cloud.notebooks.v2.Instance + 16, // 4: google.cloud.notebooks.v2.UpdateInstanceRequest.instance:type_name -> google.cloud.notebooks.v2.Instance + 17, // 5: google.cloud.notebooks.v2.UpdateInstanceRequest.update_mask:type_name -> google.protobuf.FieldMask + 18, // 6: google.cloud.notebooks.v2.DiagnoseInstanceRequest.diagnostic_config:type_name -> google.cloud.notebooks.v2.DiagnosticConfig + 1, // 7: google.cloud.notebooks.v2.NotebookService.ListInstances:input_type -> google.cloud.notebooks.v2.ListInstancesRequest + 3, // 8: google.cloud.notebooks.v2.NotebookService.GetInstance:input_type -> google.cloud.notebooks.v2.GetInstanceRequest + 4, // 9: google.cloud.notebooks.v2.NotebookService.CreateInstance:input_type -> google.cloud.notebooks.v2.CreateInstanceRequest + 5, // 10: google.cloud.notebooks.v2.NotebookService.UpdateInstance:input_type -> google.cloud.notebooks.v2.UpdateInstanceRequest + 6, // 11: google.cloud.notebooks.v2.NotebookService.DeleteInstance:input_type -> google.cloud.notebooks.v2.DeleteInstanceRequest + 7, // 12: google.cloud.notebooks.v2.NotebookService.StartInstance:input_type -> google.cloud.notebooks.v2.StartInstanceRequest + 8, // 13: google.cloud.notebooks.v2.NotebookService.StopInstance:input_type -> google.cloud.notebooks.v2.StopInstanceRequest + 9, // 14: google.cloud.notebooks.v2.NotebookService.ResetInstance:input_type -> google.cloud.notebooks.v2.ResetInstanceRequest + 10, // 15: google.cloud.notebooks.v2.NotebookService.CheckInstanceUpgradability:input_type -> google.cloud.notebooks.v2.CheckInstanceUpgradabilityRequest + 12, // 16: google.cloud.notebooks.v2.NotebookService.UpgradeInstance:input_type -> google.cloud.notebooks.v2.UpgradeInstanceRequest + 13, // 17: google.cloud.notebooks.v2.NotebookService.RollbackInstance:input_type -> google.cloud.notebooks.v2.RollbackInstanceRequest + 14, // 18: google.cloud.notebooks.v2.NotebookService.DiagnoseInstance:input_type -> google.cloud.notebooks.v2.DiagnoseInstanceRequest + 2, // 19: google.cloud.notebooks.v2.NotebookService.ListInstances:output_type -> google.cloud.notebooks.v2.ListInstancesResponse + 16, // 20: google.cloud.notebooks.v2.NotebookService.GetInstance:output_type -> google.cloud.notebooks.v2.Instance + 19, // 21: google.cloud.notebooks.v2.NotebookService.CreateInstance:output_type -> google.longrunning.Operation + 19, // 22: google.cloud.notebooks.v2.NotebookService.UpdateInstance:output_type -> google.longrunning.Operation + 19, // 23: google.cloud.notebooks.v2.NotebookService.DeleteInstance:output_type -> google.longrunning.Operation + 19, // 24: google.cloud.notebooks.v2.NotebookService.StartInstance:output_type -> google.longrunning.Operation + 19, // 25: google.cloud.notebooks.v2.NotebookService.StopInstance:output_type -> google.longrunning.Operation + 19, // 26: google.cloud.notebooks.v2.NotebookService.ResetInstance:output_type -> google.longrunning.Operation + 11, // 27: google.cloud.notebooks.v2.NotebookService.CheckInstanceUpgradability:output_type -> google.cloud.notebooks.v2.CheckInstanceUpgradabilityResponse + 19, // 28: google.cloud.notebooks.v2.NotebookService.UpgradeInstance:output_type -> google.longrunning.Operation + 19, // 29: google.cloud.notebooks.v2.NotebookService.RollbackInstance:output_type -> google.longrunning.Operation + 19, // 30: google.cloud.notebooks.v2.NotebookService.DiagnoseInstance:output_type -> google.longrunning.Operation + 19, // [19:31] is the sub-list for method output_type + 7, // [7:19] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name +} + +func init() { file_google_cloud_notebooks_v2_service_proto_init() } +func file_google_cloud_notebooks_v2_service_proto_init() { + if File_google_cloud_notebooks_v2_service_proto != nil { + return + } + file_google_cloud_notebooks_v2_diagnostic_config_proto_init() + file_google_cloud_notebooks_v2_instance_proto_init() + if !protoimpl.UnsafeEnabled { + file_google_cloud_notebooks_v2_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OperationMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListInstancesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListInstancesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StartInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StopInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResetInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckInstanceUpgradabilityRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckInstanceUpgradabilityResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpgradeInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RollbackInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_google_cloud_notebooks_v2_service_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiagnoseInstanceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_cloud_notebooks_v2_service_proto_rawDesc, + NumEnums: 0, + NumMessages: 15, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_google_cloud_notebooks_v2_service_proto_goTypes, + DependencyIndexes: file_google_cloud_notebooks_v2_service_proto_depIdxs, + MessageInfos: file_google_cloud_notebooks_v2_service_proto_msgTypes, + }.Build() + File_google_cloud_notebooks_v2_service_proto = out.File + file_google_cloud_notebooks_v2_service_proto_rawDesc = nil + file_google_cloud_notebooks_v2_service_proto_goTypes = nil + file_google_cloud_notebooks_v2_service_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// NotebookServiceClient is the client API for NotebookService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type NotebookServiceClient interface { + // Lists instances in a given project and location. + ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) + // Gets details of a single Instance. + GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) + // Creates a new Instance in a given project and location. + CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // UpdateInstance updates an Instance. + UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Deletes a single Instance. + DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Starts a notebook instance. + StartInstance(ctx context.Context, in *StartInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Stops a notebook instance. + StopInstance(ctx context.Context, in *StopInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Resets a notebook instance. + ResetInstance(ctx context.Context, in *ResetInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Checks whether a notebook instance is upgradable. + CheckInstanceUpgradability(ctx context.Context, in *CheckInstanceUpgradabilityRequest, opts ...grpc.CallOption) (*CheckInstanceUpgradabilityResponse, error) + // Upgrades a notebook instance to the latest version. + UpgradeInstance(ctx context.Context, in *UpgradeInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Rollbacks a notebook instance to the previous version. + RollbackInstance(ctx context.Context, in *RollbackInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) + // Creates a Diagnostic File and runs Diagnostic Tool given an Instance. + DiagnoseInstance(ctx context.Context, in *DiagnoseInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) +} + +type notebookServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNotebookServiceClient(cc grpc.ClientConnInterface) NotebookServiceClient { + return ¬ebookServiceClient{cc} +} + +func (c *notebookServiceClient) ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) { + out := new(ListInstancesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/ListInstances", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) GetInstance(ctx context.Context, in *GetInstanceRequest, opts ...grpc.CallOption) (*Instance, error) { + out := new(Instance) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/GetInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/CreateInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) UpdateInstance(ctx context.Context, in *UpdateInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/UpdateInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) DeleteInstance(ctx context.Context, in *DeleteInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/DeleteInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) StartInstance(ctx context.Context, in *StartInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/StartInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) StopInstance(ctx context.Context, in *StopInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/StopInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) ResetInstance(ctx context.Context, in *ResetInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/ResetInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) CheckInstanceUpgradability(ctx context.Context, in *CheckInstanceUpgradabilityRequest, opts ...grpc.CallOption) (*CheckInstanceUpgradabilityResponse, error) { + out := new(CheckInstanceUpgradabilityResponse) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/CheckInstanceUpgradability", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) UpgradeInstance(ctx context.Context, in *UpgradeInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/UpgradeInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) RollbackInstance(ctx context.Context, in *RollbackInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/RollbackInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *notebookServiceClient) DiagnoseInstance(ctx context.Context, in *DiagnoseInstanceRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error) { + out := new(longrunningpb.Operation) + err := c.cc.Invoke(ctx, "/google.cloud.notebooks.v2.NotebookService/DiagnoseInstance", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NotebookServiceServer is the server API for NotebookService service. +type NotebookServiceServer interface { + // Lists instances in a given project and location. + ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) + // Gets details of a single Instance. + GetInstance(context.Context, *GetInstanceRequest) (*Instance, error) + // Creates a new Instance in a given project and location. + CreateInstance(context.Context, *CreateInstanceRequest) (*longrunningpb.Operation, error) + // UpdateInstance updates an Instance. + UpdateInstance(context.Context, *UpdateInstanceRequest) (*longrunningpb.Operation, error) + // Deletes a single Instance. + DeleteInstance(context.Context, *DeleteInstanceRequest) (*longrunningpb.Operation, error) + // Starts a notebook instance. + StartInstance(context.Context, *StartInstanceRequest) (*longrunningpb.Operation, error) + // Stops a notebook instance. + StopInstance(context.Context, *StopInstanceRequest) (*longrunningpb.Operation, error) + // Resets a notebook instance. + ResetInstance(context.Context, *ResetInstanceRequest) (*longrunningpb.Operation, error) + // Checks whether a notebook instance is upgradable. + CheckInstanceUpgradability(context.Context, *CheckInstanceUpgradabilityRequest) (*CheckInstanceUpgradabilityResponse, error) + // Upgrades a notebook instance to the latest version. + UpgradeInstance(context.Context, *UpgradeInstanceRequest) (*longrunningpb.Operation, error) + // Rollbacks a notebook instance to the previous version. + RollbackInstance(context.Context, *RollbackInstanceRequest) (*longrunningpb.Operation, error) + // Creates a Diagnostic File and runs Diagnostic Tool given an Instance. + DiagnoseInstance(context.Context, *DiagnoseInstanceRequest) (*longrunningpb.Operation, error) +} + +// UnimplementedNotebookServiceServer can be embedded to have forward compatible implementations. +type UnimplementedNotebookServiceServer struct { +} + +func (*UnimplementedNotebookServiceServer) ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListInstances not implemented") +} +func (*UnimplementedNotebookServiceServer) GetInstance(context.Context, *GetInstanceRequest) (*Instance, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetInstance not implemented") +} +func (*UnimplementedNotebookServiceServer) CreateInstance(context.Context, *CreateInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateInstance not implemented") +} +func (*UnimplementedNotebookServiceServer) UpdateInstance(context.Context, *UpdateInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateInstance not implemented") +} +func (*UnimplementedNotebookServiceServer) DeleteInstance(context.Context, *DeleteInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteInstance not implemented") +} +func (*UnimplementedNotebookServiceServer) StartInstance(context.Context, *StartInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartInstance not implemented") +} +func (*UnimplementedNotebookServiceServer) StopInstance(context.Context, *StopInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method StopInstance not implemented") +} +func (*UnimplementedNotebookServiceServer) ResetInstance(context.Context, *ResetInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResetInstance not implemented") +} +func (*UnimplementedNotebookServiceServer) CheckInstanceUpgradability(context.Context, *CheckInstanceUpgradabilityRequest) (*CheckInstanceUpgradabilityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckInstanceUpgradability not implemented") +} +func (*UnimplementedNotebookServiceServer) UpgradeInstance(context.Context, *UpgradeInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpgradeInstance not implemented") +} +func (*UnimplementedNotebookServiceServer) RollbackInstance(context.Context, *RollbackInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method RollbackInstance not implemented") +} +func (*UnimplementedNotebookServiceServer) DiagnoseInstance(context.Context, *DiagnoseInstanceRequest) (*longrunningpb.Operation, error) { + return nil, status.Errorf(codes.Unimplemented, "method DiagnoseInstance not implemented") +} + +func RegisterNotebookServiceServer(s *grpc.Server, srv NotebookServiceServer) { + s.RegisterService(&_NotebookService_serviceDesc, srv) +} + +func _NotebookService_ListInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListInstancesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).ListInstances(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/ListInstances", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).ListInstances(ctx, req.(*ListInstancesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_GetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).GetInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/GetInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).GetInstance(ctx, req.(*GetInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_CreateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).CreateInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/CreateInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).CreateInstance(ctx, req.(*CreateInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_UpdateInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).UpdateInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/UpdateInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).UpdateInstance(ctx, req.(*UpdateInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_DeleteInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).DeleteInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/DeleteInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).DeleteInstance(ctx, req.(*DeleteInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_StartInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).StartInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/StartInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).StartInstance(ctx, req.(*StartInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_StopInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).StopInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/StopInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).StopInstance(ctx, req.(*StopInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_ResetInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResetInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).ResetInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/ResetInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).ResetInstance(ctx, req.(*ResetInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_CheckInstanceUpgradability_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckInstanceUpgradabilityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).CheckInstanceUpgradability(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/CheckInstanceUpgradability", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).CheckInstanceUpgradability(ctx, req.(*CheckInstanceUpgradabilityRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_UpgradeInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpgradeInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).UpgradeInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/UpgradeInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).UpgradeInstance(ctx, req.(*UpgradeInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_RollbackInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RollbackInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).RollbackInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/RollbackInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).RollbackInstance(ctx, req.(*RollbackInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NotebookService_DiagnoseInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DiagnoseInstanceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NotebookServiceServer).DiagnoseInstance(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.notebooks.v2.NotebookService/DiagnoseInstance", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NotebookServiceServer).DiagnoseInstance(ctx, req.(*DiagnoseInstanceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _NotebookService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.notebooks.v2.NotebookService", + HandlerType: (*NotebookServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListInstances", + Handler: _NotebookService_ListInstances_Handler, + }, + { + MethodName: "GetInstance", + Handler: _NotebookService_GetInstance_Handler, + }, + { + MethodName: "CreateInstance", + Handler: _NotebookService_CreateInstance_Handler, + }, + { + MethodName: "UpdateInstance", + Handler: _NotebookService_UpdateInstance_Handler, + }, + { + MethodName: "DeleteInstance", + Handler: _NotebookService_DeleteInstance_Handler, + }, + { + MethodName: "StartInstance", + Handler: _NotebookService_StartInstance_Handler, + }, + { + MethodName: "StopInstance", + Handler: _NotebookService_StopInstance_Handler, + }, + { + MethodName: "ResetInstance", + Handler: _NotebookService_ResetInstance_Handler, + }, + { + MethodName: "CheckInstanceUpgradability", + Handler: _NotebookService_CheckInstanceUpgradability_Handler, + }, + { + MethodName: "UpgradeInstance", + Handler: _NotebookService_UpgradeInstance_Handler, + }, + { + MethodName: "RollbackInstance", + Handler: _NotebookService_RollbackInstance_Handler, + }, + { + MethodName: "DiagnoseInstance", + Handler: _NotebookService_DiagnoseInstance_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/notebooks/v2/service.proto", +} diff --git a/notebooks/apiv2/version.go b/notebooks/apiv2/version.go new file mode 100644 index 000000000000..667585bce0b1 --- /dev/null +++ b/notebooks/apiv2/version.go @@ -0,0 +1,23 @@ +// Copyright 2023 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 notebooks + +import "cloud.google.com/go/notebooks/internal" + +func init() { + versionClient = internal.Version +}