| // Copyright 2022 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" |
| |
| notebooks "cloud.google.com/go/notebooks/apiv1" |
| "google.golang.org/api/iterator" |
| notebookspb "google.golang.org/genproto/googleapis/cloud/notebooks/v1" |
| ) |
| |
| func ExampleNewNotebookClient() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| // TODO: Use client. |
| _ = c |
| } |
| |
| func ExampleNotebookClient_ListInstances() { |
| ctx := context.Background() |
| 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/google.golang.org/genproto/googleapis/cloud/notebooks/v1#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() |
| 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/google.golang.org/genproto/googleapis/cloud/notebooks/v1#GetInstanceRequest. |
| } |
| resp, err := c.GetInstance(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleNotebookClient_CreateInstance() { |
| ctx := context.Background() |
| 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/google.golang.org/genproto/googleapis/cloud/notebooks/v1#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_RegisterInstance() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.RegisterInstanceRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#RegisterInstanceRequest. |
| } |
| op, err := c.RegisterInstance(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_SetInstanceAccelerator() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.SetInstanceAcceleratorRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#SetInstanceAcceleratorRequest. |
| } |
| op, err := c.SetInstanceAccelerator(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_SetInstanceMachineType() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.SetInstanceMachineTypeRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#SetInstanceMachineTypeRequest. |
| } |
| op, err := c.SetInstanceMachineType(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_UpdateInstanceConfig() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.UpdateInstanceConfigRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#UpdateInstanceConfigRequest. |
| } |
| op, err := c.UpdateInstanceConfig(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_UpdateShieldedInstanceConfig() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.UpdateShieldedInstanceConfigRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#UpdateShieldedInstanceConfigRequest. |
| } |
| op, err := c.UpdateShieldedInstanceConfig(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_SetInstanceLabels() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.SetInstanceLabelsRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#SetInstanceLabelsRequest. |
| } |
| op, err := c.SetInstanceLabels(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_UpdateInstanceMetadataItems() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.UpdateInstanceMetadataItemsRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#UpdateInstanceMetadataItemsRequest. |
| } |
| resp, err := c.UpdateInstanceMetadataItems(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleNotebookClient_DeleteInstance() { |
| ctx := context.Background() |
| 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/google.golang.org/genproto/googleapis/cloud/notebooks/v1#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() |
| 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/google.golang.org/genproto/googleapis/cloud/notebooks/v1#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() |
| 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/google.golang.org/genproto/googleapis/cloud/notebooks/v1#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() |
| 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/google.golang.org/genproto/googleapis/cloud/notebooks/v1#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_ReportInstanceInfo() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.ReportInstanceInfoRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#ReportInstanceInfoRequest. |
| } |
| op, err := c.ReportInstanceInfo(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_IsInstanceUpgradeable() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.IsInstanceUpgradeableRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#IsInstanceUpgradeableRequest. |
| } |
| resp, err := c.IsInstanceUpgradeable(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleNotebookClient_GetInstanceHealth() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.GetInstanceHealthRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#GetInstanceHealthRequest. |
| } |
| resp, err := c.GetInstanceHealth(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleNotebookClient_UpgradeInstance() { |
| ctx := context.Background() |
| 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/google.golang.org/genproto/googleapis/cloud/notebooks/v1#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() |
| 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/google.golang.org/genproto/googleapis/cloud/notebooks/v1#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_UpgradeInstanceInternal() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.UpgradeInstanceInternalRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#UpgradeInstanceInternalRequest. |
| } |
| op, err := c.UpgradeInstanceInternal(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_ListEnvironments() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.ListEnvironmentsRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#ListEnvironmentsRequest. |
| } |
| it := c.ListEnvironments(ctx, req) |
| for { |
| resp, err := it.Next() |
| if err == iterator.Done { |
| break |
| } |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| } |
| |
| func ExampleNotebookClient_GetEnvironment() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.GetEnvironmentRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#GetEnvironmentRequest. |
| } |
| resp, err := c.GetEnvironment(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleNotebookClient_CreateEnvironment() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.CreateEnvironmentRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#CreateEnvironmentRequest. |
| } |
| op, err := c.CreateEnvironment(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_DeleteEnvironment() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.DeleteEnvironmentRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#DeleteEnvironmentRequest. |
| } |
| op, err := c.DeleteEnvironment(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| err = op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| } |
| |
| func ExampleNotebookClient_ListSchedules() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.ListSchedulesRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#ListSchedulesRequest. |
| } |
| it := c.ListSchedules(ctx, req) |
| for { |
| resp, err := it.Next() |
| if err == iterator.Done { |
| break |
| } |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| } |
| |
| func ExampleNotebookClient_GetSchedule() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.GetScheduleRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#GetScheduleRequest. |
| } |
| resp, err := c.GetSchedule(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleNotebookClient_DeleteSchedule() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.DeleteScheduleRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#DeleteScheduleRequest. |
| } |
| op, err := c.DeleteSchedule(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| err = op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| } |
| |
| func ExampleNotebookClient_CreateSchedule() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.CreateScheduleRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#CreateScheduleRequest. |
| } |
| op, err := c.CreateSchedule(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_TriggerSchedule() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.TriggerScheduleRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#TriggerScheduleRequest. |
| } |
| op, err := c.TriggerSchedule(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_ListExecutions() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.ListExecutionsRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#ListExecutionsRequest. |
| } |
| it := c.ListExecutions(ctx, req) |
| for { |
| resp, err := it.Next() |
| if err == iterator.Done { |
| break |
| } |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| } |
| |
| func ExampleNotebookClient_GetExecution() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.GetExecutionRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#GetExecutionRequest. |
| } |
| resp, err := c.GetExecution(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |
| |
| func ExampleNotebookClient_DeleteExecution() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.DeleteExecutionRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#DeleteExecutionRequest. |
| } |
| op, err := c.DeleteExecution(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| err = op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| } |
| |
| func ExampleNotebookClient_CreateExecution() { |
| ctx := context.Background() |
| c, err := notebooks.NewNotebookClient(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| defer c.Close() |
| |
| req := ¬ebookspb.CreateExecutionRequest{ |
| // TODO: Fill request struct fields. |
| // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/notebooks/v1#CreateExecutionRequest. |
| } |
| op, err := c.CreateExecution(ctx, req) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| |
| resp, err := op.Wait(ctx) |
| if err != nil { |
| // TODO: Handle error. |
| } |
| // TODO: Use resp. |
| _ = resp |
| } |