From 90e2868a3d220aa7f897438f4917013fda7a7c59 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 17 Nov 2021 10:11:06 -0800 Subject: [PATCH] chore(all): auto-regenerate gapics (#5152) This is an auto-generated regeneration of the gapic clients by cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is submitted, genbot will update this PR with a newer dependency to the newer version of genproto and assign reviewers to this PR. If you have been assigned to review this PR, please: - Ensure that the version of genproto in go.mod has been updated. - Ensure that CI is passing. If it's failing, it requires your manual attention. - Approve and submit this PR if you believe it's ready to ship. Corresponding genproto PR: https://github.com/googleapis/go-genproto/pull/723 Changes: feat(cloudtasks): add C++ rules for Cloud Tasks PiperOrigin-RevId: 410369403 Source-Link: https://github.com/googleapis/googleapis/commit/62cced0cdc743d4b207a9ee3fec16128557c6c39 feat(aiplatform):Tensorboard v1 protos release feat:Exposing a field for v1 CustomJob-Tensorboard integration. PiperOrigin-RevId: 410304645 Source-Link: https://github.com/googleapis/googleapis/commit/bd7db057c691b758881745ea2249c96588bee52e feat(dialogflow/cx): allow setting custom CA for generic webhooks and release CompareVersions API docs: clarify DLP template reader usage PiperOrigin-RevId: 410299375 Source-Link: https://github.com/googleapis/googleapis/commit/4a4ec6da4367c45192d9ede71bd0451f9d8ed2a7 feat(texttospeech): update v1 proto PiperOrigin-RevId: 410256789 Source-Link: https://github.com/googleapis/googleapis/commit/b3ff1830d2c176e68efac4ff8f589f5d5909b06c feat(monitoring/dashboard): Added support for auto-close configurations PiperOrigin-RevId: 410253233 Source-Link: https://github.com/googleapis/googleapis/commit/11e309d19377d05fe354c97d9bd3def00fa9b5e4 --- aiplatform/apiv1/doc.go | 3 +- aiplatform/apiv1/gapic_metadata.json | 149 ++ aiplatform/apiv1/tensorboard_client.go | 1689 +++++++++++++++++ .../apiv1/tensorboard_client_example_test.go | 629 ++++++ aiplatform/go.mod | 2 +- aiplatform/go.sum | 4 +- cloudtasks/apiv2/doc.go | 2 +- cloudtasks/go.mod | 2 +- cloudtasks/go.sum | 4 +- dialogflow/cx/apiv3/doc.go | 2 +- dialogflow/cx/apiv3/gapic_metadata.json | 5 + dialogflow/cx/apiv3/versions_client.go | 60 +- .../cx/apiv3/versions_client_example_test.go | 20 + dialogflow/go.mod | 2 +- dialogflow/go.sum | 4 +- go.mod | 2 +- go.sum | 4 +- .../BatchCreateTensorboardRuns/main.go | 48 + .../BatchCreateTensorboardTimeSeries/main.go | 48 + .../main.go | 48 + .../CreateTensorboard/main.go | 53 + .../CreateTensorboardExperiment/main.go | 48 + .../CreateTensorboardRun/main.go | 48 + .../CreateTensorboardTimeSeries/main.go | 48 + .../DeleteTensorboard/main.go | 51 + .../DeleteTensorboardExperiment/main.go | 51 + .../DeleteTensorboardRun/main.go | 51 + .../DeleteTensorboardTimeSeries/main.go | 51 + .../ExportTensorboardTimeSeriesData/main.go | 55 + .../TensorboardClient/GetTensorboard/main.go | 48 + .../GetTensorboardExperiment/main.go | 48 + .../GetTensorboardRun/main.go | 48 + .../GetTensorboardTimeSeries/main.go | 48 + .../ListTensorboardExperiments/main.go | 55 + .../ListTensorboardRuns/main.go | 55 + .../ListTensorboardTimeSeries/main.go | 55 + .../ListTensorboards/main.go | 55 + .../ReadTensorboardTimeSeriesData/main.go | 48 + .../UpdateTensorboard/main.go | 53 + .../UpdateTensorboardExperiment/main.go | 48 + .../UpdateTensorboardRun/main.go | 48 + .../UpdateTensorboardTimeSeries/main.go | 48 + .../WriteTensorboardExperimentData/main.go | 48 + .../WriteTensorboardRunData/main.go | 48 + .../VersionsClient/CompareVersions/main.go | 48 + internal/generated/snippets/go.mod | 2 +- internal/generated/snippets/go.sum | 3 +- internal/godocfx/go.sum | 4 +- monitoring/apiv3/v2/doc.go | 9 +- monitoring/dashboard/apiv1/doc.go | 2 +- monitoring/go.mod | 2 +- monitoring/go.sum | 4 +- texttospeech/apiv1/doc.go | 2 +- texttospeech/apiv1/text_to_speech_client.go | 4 +- texttospeech/go.mod | 2 +- texttospeech/go.sum | 4 +- 56 files changed, 3977 insertions(+), 45 deletions(-) create mode 100644 aiplatform/apiv1/tensorboard_client.go create mode 100644 aiplatform/apiv1/tensorboard_client_example_test.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchCreateTensorboardRuns/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchCreateTensorboardTimeSeries/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchReadTensorboardTimeSeriesData/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboard/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardExperiment/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardRun/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardTimeSeries/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboard/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardExperiment/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardRun/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardTimeSeries/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ExportTensorboardTimeSeriesData/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboard/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardExperiment/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardRun/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardTimeSeries/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardExperiments/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardRuns/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardTimeSeries/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboards/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ReadTensorboardTimeSeriesData/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboard/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardExperiment/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardRun/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardTimeSeries/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/WriteTensorboardExperimentData/main.go create mode 100644 internal/generated/snippets/aiplatform/apiv1/TensorboardClient/WriteTensorboardRunData/main.go create mode 100644 internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/CompareVersions/main.go diff --git a/aiplatform/apiv1/doc.go b/aiplatform/apiv1/doc.go index a2d921e6155d..543e4fe6f0ee 100644 --- a/aiplatform/apiv1/doc.go +++ b/aiplatform/apiv1/doc.go @@ -90,7 +90,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20211113" +const versionClient = "20211117" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) @@ -117,6 +117,7 @@ func checkDisableDeadlines() (bool, error) { func DefaultAuthScopes() []string { return []string{ "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only", } } diff --git a/aiplatform/apiv1/gapic_metadata.json b/aiplatform/apiv1/gapic_metadata.json index dfa1d3a16a63..b36759677804 100644 --- a/aiplatform/apiv1/gapic_metadata.json +++ b/aiplatform/apiv1/gapic_metadata.json @@ -822,6 +822,155 @@ } } }, + "TensorboardService": { + "clients": { + "grpc": { + "libraryClient": "TensorboardClient", + "rpcs": { + "BatchCreateTensorboardRuns": { + "methods": [ + "BatchCreateTensorboardRuns" + ] + }, + "BatchCreateTensorboardTimeSeries": { + "methods": [ + "BatchCreateTensorboardTimeSeries" + ] + }, + "BatchReadTensorboardTimeSeriesData": { + "methods": [ + "BatchReadTensorboardTimeSeriesData" + ] + }, + "CreateTensorboard": { + "methods": [ + "CreateTensorboard" + ] + }, + "CreateTensorboardExperiment": { + "methods": [ + "CreateTensorboardExperiment" + ] + }, + "CreateTensorboardRun": { + "methods": [ + "CreateTensorboardRun" + ] + }, + "CreateTensorboardTimeSeries": { + "methods": [ + "CreateTensorboardTimeSeries" + ] + }, + "DeleteTensorboard": { + "methods": [ + "DeleteTensorboard" + ] + }, + "DeleteTensorboardExperiment": { + "methods": [ + "DeleteTensorboardExperiment" + ] + }, + "DeleteTensorboardRun": { + "methods": [ + "DeleteTensorboardRun" + ] + }, + "DeleteTensorboardTimeSeries": { + "methods": [ + "DeleteTensorboardTimeSeries" + ] + }, + "ExportTensorboardTimeSeriesData": { + "methods": [ + "ExportTensorboardTimeSeriesData" + ] + }, + "GetTensorboard": { + "methods": [ + "GetTensorboard" + ] + }, + "GetTensorboardExperiment": { + "methods": [ + "GetTensorboardExperiment" + ] + }, + "GetTensorboardRun": { + "methods": [ + "GetTensorboardRun" + ] + }, + "GetTensorboardTimeSeries": { + "methods": [ + "GetTensorboardTimeSeries" + ] + }, + "ListTensorboardExperiments": { + "methods": [ + "ListTensorboardExperiments" + ] + }, + "ListTensorboardRuns": { + "methods": [ + "ListTensorboardRuns" + ] + }, + "ListTensorboardTimeSeries": { + "methods": [ + "ListTensorboardTimeSeries" + ] + }, + "ListTensorboards": { + "methods": [ + "ListTensorboards" + ] + }, + "ReadTensorboardBlobData": { + "methods": [ + "ReadTensorboardBlobData" + ] + }, + "ReadTensorboardTimeSeriesData": { + "methods": [ + "ReadTensorboardTimeSeriesData" + ] + }, + "UpdateTensorboard": { + "methods": [ + "UpdateTensorboard" + ] + }, + "UpdateTensorboardExperiment": { + "methods": [ + "UpdateTensorboardExperiment" + ] + }, + "UpdateTensorboardRun": { + "methods": [ + "UpdateTensorboardRun" + ] + }, + "UpdateTensorboardTimeSeries": { + "methods": [ + "UpdateTensorboardTimeSeries" + ] + }, + "WriteTensorboardExperimentData": { + "methods": [ + "WriteTensorboardExperimentData" + ] + }, + "WriteTensorboardRunData": { + "methods": [ + "WriteTensorboardRunData" + ] + } + } + } + } + }, "VizierService": { "clients": { "grpc": { diff --git a/aiplatform/apiv1/tensorboard_client.go b/aiplatform/apiv1/tensorboard_client.go new file mode 100644 index 000000000000..ff81de09cf23 --- /dev/null +++ b/aiplatform/apiv1/tensorboard_client.go @@ -0,0 +1,1689 @@ +// Copyright 2021 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 aiplatform + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "cloud.google.com/go/longrunning" + lroauto "cloud.google.com/go/longrunning/autogen" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + "google.golang.org/api/option/internaloption" + gtransport "google.golang.org/api/transport/grpc" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" + "google.golang.org/grpc" + "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/proto" +) + +var newTensorboardClientHook clientHook + +// TensorboardCallOptions contains the retry settings for each method of TensorboardClient. +type TensorboardCallOptions struct { + CreateTensorboard []gax.CallOption + GetTensorboard []gax.CallOption + UpdateTensorboard []gax.CallOption + ListTensorboards []gax.CallOption + DeleteTensorboard []gax.CallOption + CreateTensorboardExperiment []gax.CallOption + GetTensorboardExperiment []gax.CallOption + UpdateTensorboardExperiment []gax.CallOption + ListTensorboardExperiments []gax.CallOption + DeleteTensorboardExperiment []gax.CallOption + CreateTensorboardRun []gax.CallOption + BatchCreateTensorboardRuns []gax.CallOption + GetTensorboardRun []gax.CallOption + UpdateTensorboardRun []gax.CallOption + ListTensorboardRuns []gax.CallOption + DeleteTensorboardRun []gax.CallOption + BatchCreateTensorboardTimeSeries []gax.CallOption + CreateTensorboardTimeSeries []gax.CallOption + GetTensorboardTimeSeries []gax.CallOption + UpdateTensorboardTimeSeries []gax.CallOption + ListTensorboardTimeSeries []gax.CallOption + DeleteTensorboardTimeSeries []gax.CallOption + BatchReadTensorboardTimeSeriesData []gax.CallOption + ReadTensorboardTimeSeriesData []gax.CallOption + ReadTensorboardBlobData []gax.CallOption + WriteTensorboardExperimentData []gax.CallOption + WriteTensorboardRunData []gax.CallOption + ExportTensorboardTimeSeriesData []gax.CallOption +} + +func defaultTensorboardGRPCClientOptions() []option.ClientOption { + return []option.ClientOption{ + internaloption.WithDefaultEndpoint("aiplatform.googleapis.com:443"), + internaloption.WithDefaultMTLSEndpoint("aiplatform.mtls.googleapis.com:443"), + internaloption.WithDefaultAudience("https://aiplatform.googleapis.com/"), + internaloption.WithDefaultScopes(DefaultAuthScopes()...), + internaloption.EnableJwtWithScope(), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultTensorboardCallOptions() *TensorboardCallOptions { + return &TensorboardCallOptions{ + CreateTensorboard: []gax.CallOption{}, + GetTensorboard: []gax.CallOption{}, + UpdateTensorboard: []gax.CallOption{}, + ListTensorboards: []gax.CallOption{}, + DeleteTensorboard: []gax.CallOption{}, + CreateTensorboardExperiment: []gax.CallOption{}, + GetTensorboardExperiment: []gax.CallOption{}, + UpdateTensorboardExperiment: []gax.CallOption{}, + ListTensorboardExperiments: []gax.CallOption{}, + DeleteTensorboardExperiment: []gax.CallOption{}, + CreateTensorboardRun: []gax.CallOption{}, + BatchCreateTensorboardRuns: []gax.CallOption{}, + GetTensorboardRun: []gax.CallOption{}, + UpdateTensorboardRun: []gax.CallOption{}, + ListTensorboardRuns: []gax.CallOption{}, + DeleteTensorboardRun: []gax.CallOption{}, + BatchCreateTensorboardTimeSeries: []gax.CallOption{}, + CreateTensorboardTimeSeries: []gax.CallOption{}, + GetTensorboardTimeSeries: []gax.CallOption{}, + UpdateTensorboardTimeSeries: []gax.CallOption{}, + ListTensorboardTimeSeries: []gax.CallOption{}, + DeleteTensorboardTimeSeries: []gax.CallOption{}, + BatchReadTensorboardTimeSeriesData: []gax.CallOption{}, + ReadTensorboardTimeSeriesData: []gax.CallOption{}, + ReadTensorboardBlobData: []gax.CallOption{}, + WriteTensorboardExperimentData: []gax.CallOption{}, + WriteTensorboardRunData: []gax.CallOption{}, + ExportTensorboardTimeSeriesData: []gax.CallOption{}, + } +} + +// internalTensorboardClient is an interface that defines the methods availaible from Vertex AI API. +type internalTensorboardClient interface { + Close() error + setGoogleClientInfo(...string) + Connection() *grpc.ClientConn + CreateTensorboard(context.Context, *aiplatformpb.CreateTensorboardRequest, ...gax.CallOption) (*CreateTensorboardOperation, error) + CreateTensorboardOperation(name string) *CreateTensorboardOperation + GetTensorboard(context.Context, *aiplatformpb.GetTensorboardRequest, ...gax.CallOption) (*aiplatformpb.Tensorboard, error) + UpdateTensorboard(context.Context, *aiplatformpb.UpdateTensorboardRequest, ...gax.CallOption) (*UpdateTensorboardOperation, error) + UpdateTensorboardOperation(name string) *UpdateTensorboardOperation + ListTensorboards(context.Context, *aiplatformpb.ListTensorboardsRequest, ...gax.CallOption) *TensorboardIterator + DeleteTensorboard(context.Context, *aiplatformpb.DeleteTensorboardRequest, ...gax.CallOption) (*DeleteTensorboardOperation, error) + DeleteTensorboardOperation(name string) *DeleteTensorboardOperation + CreateTensorboardExperiment(context.Context, *aiplatformpb.CreateTensorboardExperimentRequest, ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) + GetTensorboardExperiment(context.Context, *aiplatformpb.GetTensorboardExperimentRequest, ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) + UpdateTensorboardExperiment(context.Context, *aiplatformpb.UpdateTensorboardExperimentRequest, ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) + ListTensorboardExperiments(context.Context, *aiplatformpb.ListTensorboardExperimentsRequest, ...gax.CallOption) *TensorboardExperimentIterator + DeleteTensorboardExperiment(context.Context, *aiplatformpb.DeleteTensorboardExperimentRequest, ...gax.CallOption) (*DeleteTensorboardExperimentOperation, error) + DeleteTensorboardExperimentOperation(name string) *DeleteTensorboardExperimentOperation + CreateTensorboardRun(context.Context, *aiplatformpb.CreateTensorboardRunRequest, ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) + BatchCreateTensorboardRuns(context.Context, *aiplatformpb.BatchCreateTensorboardRunsRequest, ...gax.CallOption) (*aiplatformpb.BatchCreateTensorboardRunsResponse, error) + GetTensorboardRun(context.Context, *aiplatformpb.GetTensorboardRunRequest, ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) + UpdateTensorboardRun(context.Context, *aiplatformpb.UpdateTensorboardRunRequest, ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) + ListTensorboardRuns(context.Context, *aiplatformpb.ListTensorboardRunsRequest, ...gax.CallOption) *TensorboardRunIterator + DeleteTensorboardRun(context.Context, *aiplatformpb.DeleteTensorboardRunRequest, ...gax.CallOption) (*DeleteTensorboardRunOperation, error) + DeleteTensorboardRunOperation(name string) *DeleteTensorboardRunOperation + BatchCreateTensorboardTimeSeries(context.Context, *aiplatformpb.BatchCreateTensorboardTimeSeriesRequest, ...gax.CallOption) (*aiplatformpb.BatchCreateTensorboardTimeSeriesResponse, error) + CreateTensorboardTimeSeries(context.Context, *aiplatformpb.CreateTensorboardTimeSeriesRequest, ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) + GetTensorboardTimeSeries(context.Context, *aiplatformpb.GetTensorboardTimeSeriesRequest, ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) + UpdateTensorboardTimeSeries(context.Context, *aiplatformpb.UpdateTensorboardTimeSeriesRequest, ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) + ListTensorboardTimeSeries(context.Context, *aiplatformpb.ListTensorboardTimeSeriesRequest, ...gax.CallOption) *TensorboardTimeSeriesIterator + DeleteTensorboardTimeSeries(context.Context, *aiplatformpb.DeleteTensorboardTimeSeriesRequest, ...gax.CallOption) (*DeleteTensorboardTimeSeriesOperation, error) + DeleteTensorboardTimeSeriesOperation(name string) *DeleteTensorboardTimeSeriesOperation + BatchReadTensorboardTimeSeriesData(context.Context, *aiplatformpb.BatchReadTensorboardTimeSeriesDataRequest, ...gax.CallOption) (*aiplatformpb.BatchReadTensorboardTimeSeriesDataResponse, error) + ReadTensorboardTimeSeriesData(context.Context, *aiplatformpb.ReadTensorboardTimeSeriesDataRequest, ...gax.CallOption) (*aiplatformpb.ReadTensorboardTimeSeriesDataResponse, error) + ReadTensorboardBlobData(context.Context, *aiplatformpb.ReadTensorboardBlobDataRequest, ...gax.CallOption) (aiplatformpb.TensorboardService_ReadTensorboardBlobDataClient, error) + WriteTensorboardExperimentData(context.Context, *aiplatformpb.WriteTensorboardExperimentDataRequest, ...gax.CallOption) (*aiplatformpb.WriteTensorboardExperimentDataResponse, error) + WriteTensorboardRunData(context.Context, *aiplatformpb.WriteTensorboardRunDataRequest, ...gax.CallOption) (*aiplatformpb.WriteTensorboardRunDataResponse, error) + ExportTensorboardTimeSeriesData(context.Context, *aiplatformpb.ExportTensorboardTimeSeriesDataRequest, ...gax.CallOption) *TimeSeriesDataPointIterator +} + +// TensorboardClient is a client for interacting with Vertex AI API. +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +// +// TensorboardService +type TensorboardClient struct { + // The internal transport-dependent client. + internalClient internalTensorboardClient + + // The call options for this service. + CallOptions *TensorboardCallOptions + + // 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 *TensorboardClient) 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 *TensorboardClient) setGoogleClientInfo(keyval ...string) { + c.internalClient.setGoogleClientInfo(keyval...) +} + +// Connection returns a connection to the API service. +// +// Deprecated. +func (c *TensorboardClient) Connection() *grpc.ClientConn { + return c.internalClient.Connection() +} + +// CreateTensorboard creates a Tensorboard. +func (c *TensorboardClient) CreateTensorboard(ctx context.Context, req *aiplatformpb.CreateTensorboardRequest, opts ...gax.CallOption) (*CreateTensorboardOperation, error) { + return c.internalClient.CreateTensorboard(ctx, req, opts...) +} + +// CreateTensorboardOperation returns a new CreateTensorboardOperation from a given name. +// The name must be that of a previously created CreateTensorboardOperation, possibly from a different process. +func (c *TensorboardClient) CreateTensorboardOperation(name string) *CreateTensorboardOperation { + return c.internalClient.CreateTensorboardOperation(name) +} + +// GetTensorboard gets a Tensorboard. +func (c *TensorboardClient) GetTensorboard(ctx context.Context, req *aiplatformpb.GetTensorboardRequest, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + return c.internalClient.GetTensorboard(ctx, req, opts...) +} + +// UpdateTensorboard updates a Tensorboard. +func (c *TensorboardClient) UpdateTensorboard(ctx context.Context, req *aiplatformpb.UpdateTensorboardRequest, opts ...gax.CallOption) (*UpdateTensorboardOperation, error) { + return c.internalClient.UpdateTensorboard(ctx, req, opts...) +} + +// UpdateTensorboardOperation returns a new UpdateTensorboardOperation from a given name. +// The name must be that of a previously created UpdateTensorboardOperation, possibly from a different process. +func (c *TensorboardClient) UpdateTensorboardOperation(name string) *UpdateTensorboardOperation { + return c.internalClient.UpdateTensorboardOperation(name) +} + +// ListTensorboards lists Tensorboards in a Location. +func (c *TensorboardClient) ListTensorboards(ctx context.Context, req *aiplatformpb.ListTensorboardsRequest, opts ...gax.CallOption) *TensorboardIterator { + return c.internalClient.ListTensorboards(ctx, req, opts...) +} + +// DeleteTensorboard deletes a Tensorboard. +func (c *TensorboardClient) DeleteTensorboard(ctx context.Context, req *aiplatformpb.DeleteTensorboardRequest, opts ...gax.CallOption) (*DeleteTensorboardOperation, error) { + return c.internalClient.DeleteTensorboard(ctx, req, opts...) +} + +// DeleteTensorboardOperation returns a new DeleteTensorboardOperation from a given name. +// The name must be that of a previously created DeleteTensorboardOperation, possibly from a different process. +func (c *TensorboardClient) DeleteTensorboardOperation(name string) *DeleteTensorboardOperation { + return c.internalClient.DeleteTensorboardOperation(name) +} + +// CreateTensorboardExperiment creates a TensorboardExperiment. +func (c *TensorboardClient) CreateTensorboardExperiment(ctx context.Context, req *aiplatformpb.CreateTensorboardExperimentRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) { + return c.internalClient.CreateTensorboardExperiment(ctx, req, opts...) +} + +// GetTensorboardExperiment gets a TensorboardExperiment. +func (c *TensorboardClient) GetTensorboardExperiment(ctx context.Context, req *aiplatformpb.GetTensorboardExperimentRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) { + return c.internalClient.GetTensorboardExperiment(ctx, req, opts...) +} + +// UpdateTensorboardExperiment updates a TensorboardExperiment. +func (c *TensorboardClient) UpdateTensorboardExperiment(ctx context.Context, req *aiplatformpb.UpdateTensorboardExperimentRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) { + return c.internalClient.UpdateTensorboardExperiment(ctx, req, opts...) +} + +// ListTensorboardExperiments lists TensorboardExperiments in a Location. +func (c *TensorboardClient) ListTensorboardExperiments(ctx context.Context, req *aiplatformpb.ListTensorboardExperimentsRequest, opts ...gax.CallOption) *TensorboardExperimentIterator { + return c.internalClient.ListTensorboardExperiments(ctx, req, opts...) +} + +// DeleteTensorboardExperiment deletes a TensorboardExperiment. +func (c *TensorboardClient) DeleteTensorboardExperiment(ctx context.Context, req *aiplatformpb.DeleteTensorboardExperimentRequest, opts ...gax.CallOption) (*DeleteTensorboardExperimentOperation, error) { + return c.internalClient.DeleteTensorboardExperiment(ctx, req, opts...) +} + +// DeleteTensorboardExperimentOperation returns a new DeleteTensorboardExperimentOperation from a given name. +// The name must be that of a previously created DeleteTensorboardExperimentOperation, possibly from a different process. +func (c *TensorboardClient) DeleteTensorboardExperimentOperation(name string) *DeleteTensorboardExperimentOperation { + return c.internalClient.DeleteTensorboardExperimentOperation(name) +} + +// CreateTensorboardRun creates a TensorboardRun. +func (c *TensorboardClient) CreateTensorboardRun(ctx context.Context, req *aiplatformpb.CreateTensorboardRunRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) { + return c.internalClient.CreateTensorboardRun(ctx, req, opts...) +} + +// BatchCreateTensorboardRuns batch create TensorboardRuns. +func (c *TensorboardClient) BatchCreateTensorboardRuns(ctx context.Context, req *aiplatformpb.BatchCreateTensorboardRunsRequest, opts ...gax.CallOption) (*aiplatformpb.BatchCreateTensorboardRunsResponse, error) { + return c.internalClient.BatchCreateTensorboardRuns(ctx, req, opts...) +} + +// GetTensorboardRun gets a TensorboardRun. +func (c *TensorboardClient) GetTensorboardRun(ctx context.Context, req *aiplatformpb.GetTensorboardRunRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) { + return c.internalClient.GetTensorboardRun(ctx, req, opts...) +} + +// UpdateTensorboardRun updates a TensorboardRun. +func (c *TensorboardClient) UpdateTensorboardRun(ctx context.Context, req *aiplatformpb.UpdateTensorboardRunRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) { + return c.internalClient.UpdateTensorboardRun(ctx, req, opts...) +} + +// ListTensorboardRuns lists TensorboardRuns in a Location. +func (c *TensorboardClient) ListTensorboardRuns(ctx context.Context, req *aiplatformpb.ListTensorboardRunsRequest, opts ...gax.CallOption) *TensorboardRunIterator { + return c.internalClient.ListTensorboardRuns(ctx, req, opts...) +} + +// DeleteTensorboardRun deletes a TensorboardRun. +func (c *TensorboardClient) DeleteTensorboardRun(ctx context.Context, req *aiplatformpb.DeleteTensorboardRunRequest, opts ...gax.CallOption) (*DeleteTensorboardRunOperation, error) { + return c.internalClient.DeleteTensorboardRun(ctx, req, opts...) +} + +// DeleteTensorboardRunOperation returns a new DeleteTensorboardRunOperation from a given name. +// The name must be that of a previously created DeleteTensorboardRunOperation, possibly from a different process. +func (c *TensorboardClient) DeleteTensorboardRunOperation(name string) *DeleteTensorboardRunOperation { + return c.internalClient.DeleteTensorboardRunOperation(name) +} + +// BatchCreateTensorboardTimeSeries batch create TensorboardTimeSeries that belong to a TensorboardExperiment. +func (c *TensorboardClient) BatchCreateTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.BatchCreateTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.BatchCreateTensorboardTimeSeriesResponse, error) { + return c.internalClient.BatchCreateTensorboardTimeSeries(ctx, req, opts...) +} + +// CreateTensorboardTimeSeries creates a TensorboardTimeSeries. +func (c *TensorboardClient) CreateTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.CreateTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) { + return c.internalClient.CreateTensorboardTimeSeries(ctx, req, opts...) +} + +// GetTensorboardTimeSeries gets a TensorboardTimeSeries. +func (c *TensorboardClient) GetTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.GetTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) { + return c.internalClient.GetTensorboardTimeSeries(ctx, req, opts...) +} + +// UpdateTensorboardTimeSeries updates a TensorboardTimeSeries. +func (c *TensorboardClient) UpdateTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.UpdateTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) { + return c.internalClient.UpdateTensorboardTimeSeries(ctx, req, opts...) +} + +// ListTensorboardTimeSeries lists TensorboardTimeSeries in a Location. +func (c *TensorboardClient) ListTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.ListTensorboardTimeSeriesRequest, opts ...gax.CallOption) *TensorboardTimeSeriesIterator { + return c.internalClient.ListTensorboardTimeSeries(ctx, req, opts...) +} + +// DeleteTensorboardTimeSeries deletes a TensorboardTimeSeries. +func (c *TensorboardClient) DeleteTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.DeleteTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*DeleteTensorboardTimeSeriesOperation, error) { + return c.internalClient.DeleteTensorboardTimeSeries(ctx, req, opts...) +} + +// DeleteTensorboardTimeSeriesOperation returns a new DeleteTensorboardTimeSeriesOperation from a given name. +// The name must be that of a previously created DeleteTensorboardTimeSeriesOperation, possibly from a different process. +func (c *TensorboardClient) DeleteTensorboardTimeSeriesOperation(name string) *DeleteTensorboardTimeSeriesOperation { + return c.internalClient.DeleteTensorboardTimeSeriesOperation(name) +} + +// BatchReadTensorboardTimeSeriesData reads multiple TensorboardTimeSeries’ data. The data point number limit is +// 1000 for scalars, 100 for tensors and blob references. If the number of +// data points stored is less than the limit, all data will be returned. +// Otherwise, that limit number of data points will be randomly selected from +// this time series and returned. +func (c *TensorboardClient) BatchReadTensorboardTimeSeriesData(ctx context.Context, req *aiplatformpb.BatchReadTensorboardTimeSeriesDataRequest, opts ...gax.CallOption) (*aiplatformpb.BatchReadTensorboardTimeSeriesDataResponse, error) { + return c.internalClient.BatchReadTensorboardTimeSeriesData(ctx, req, opts...) +} + +// ReadTensorboardTimeSeriesData reads a TensorboardTimeSeries’ data. By default, if the number of data +// points stored is less than 1000, all data will be returned. Otherwise, 1000 +// data points will be randomly selected from this time series and returned. +// This value can be changed by changing max_data_points, which can’t be +// greater than 10k. +func (c *TensorboardClient) ReadTensorboardTimeSeriesData(ctx context.Context, req *aiplatformpb.ReadTensorboardTimeSeriesDataRequest, opts ...gax.CallOption) (*aiplatformpb.ReadTensorboardTimeSeriesDataResponse, error) { + return c.internalClient.ReadTensorboardTimeSeriesData(ctx, req, opts...) +} + +// ReadTensorboardBlobData gets bytes of TensorboardBlobs. +// This is to allow reading blob data stored in consumer project’s Cloud +// Storage bucket without users having to obtain Cloud Storage access +// permission. +func (c *TensorboardClient) ReadTensorboardBlobData(ctx context.Context, req *aiplatformpb.ReadTensorboardBlobDataRequest, opts ...gax.CallOption) (aiplatformpb.TensorboardService_ReadTensorboardBlobDataClient, error) { + return c.internalClient.ReadTensorboardBlobData(ctx, req, opts...) +} + +// WriteTensorboardExperimentData write time series data points of multiple TensorboardTimeSeries in multiple +// TensorboardRun’s. If any data fail to be ingested, an error will be +// returned. +func (c *TensorboardClient) WriteTensorboardExperimentData(ctx context.Context, req *aiplatformpb.WriteTensorboardExperimentDataRequest, opts ...gax.CallOption) (*aiplatformpb.WriteTensorboardExperimentDataResponse, error) { + return c.internalClient.WriteTensorboardExperimentData(ctx, req, opts...) +} + +// WriteTensorboardRunData write time series data points into multiple TensorboardTimeSeries under +// a TensorboardRun. If any data fail to be ingested, an error will be +// returned. +func (c *TensorboardClient) WriteTensorboardRunData(ctx context.Context, req *aiplatformpb.WriteTensorboardRunDataRequest, opts ...gax.CallOption) (*aiplatformpb.WriteTensorboardRunDataResponse, error) { + return c.internalClient.WriteTensorboardRunData(ctx, req, opts...) +} + +// ExportTensorboardTimeSeriesData exports a TensorboardTimeSeries’ data. Data is returned in paginated +// responses. +func (c *TensorboardClient) ExportTensorboardTimeSeriesData(ctx context.Context, req *aiplatformpb.ExportTensorboardTimeSeriesDataRequest, opts ...gax.CallOption) *TimeSeriesDataPointIterator { + return c.internalClient.ExportTensorboardTimeSeriesData(ctx, req, opts...) +} + +// tensorboardGRPCClient is a client for interacting with Vertex AI API over gRPC transport. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type tensorboardGRPCClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE + disableDeadlines bool + + // Points back to the CallOptions field of the containing TensorboardClient + CallOptions **TensorboardCallOptions + + // The gRPC API client. + tensorboardClient aiplatformpb.TensorboardServiceClient + + // 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-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewTensorboardClient creates a new tensorboard service client based on gRPC. +// The returned client must be Closed when it is done being used to clean up its underlying connections. +// +// TensorboardService +func NewTensorboardClient(ctx context.Context, opts ...option.ClientOption) (*TensorboardClient, error) { + clientOpts := defaultTensorboardGRPCClientOptions() + if newTensorboardClientHook != nil { + hookOpts, err := newTensorboardClientHook(ctx, clientHookParams{}) + if err != nil { + return nil, err + } + clientOpts = append(clientOpts, hookOpts...) + } + + disableDeadlines, err := checkDisableDeadlines() + if err != nil { + return nil, err + } + + connPool, err := gtransport.DialPool(ctx, append(clientOpts, opts...)...) + if err != nil { + return nil, err + } + client := TensorboardClient{CallOptions: defaultTensorboardCallOptions()} + + c := &tensorboardGRPCClient{ + connPool: connPool, + disableDeadlines: disableDeadlines, + tensorboardClient: aiplatformpb.NewTensorboardServiceClient(connPool), + CallOptions: &client.CallOptions, + } + 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. +func (c *tensorboardGRPCClient) 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 *tensorboardGRPCClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("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 *tensorboardGRPCClient) Close() error { + return c.connPool.Close() +} + +func (c *tensorboardGRPCClient) CreateTensorboard(ctx context.Context, req *aiplatformpb.CreateTensorboardRequest, opts ...gax.CallOption) (*CreateTensorboardOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateTensorboard[0:len((*c.CallOptions).CreateTensorboard):len((*c.CallOptions).CreateTensorboard)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.CreateTensorboard(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &CreateTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *tensorboardGRPCClient) GetTensorboard(ctx context.Context, req *aiplatformpb.GetTensorboardRequest, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetTensorboard[0:len((*c.CallOptions).GetTensorboard):len((*c.CallOptions).GetTensorboard)], opts...) + var resp *aiplatformpb.Tensorboard + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.GetTensorboard(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) UpdateTensorboard(ctx context.Context, req *aiplatformpb.UpdateTensorboardRequest, opts ...gax.CallOption) (*UpdateTensorboardOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard.name", url.QueryEscape(req.GetTensorboard().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateTensorboard[0:len((*c.CallOptions).UpdateTensorboard):len((*c.CallOptions).UpdateTensorboard)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.UpdateTensorboard(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &UpdateTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *tensorboardGRPCClient) ListTensorboards(ctx context.Context, req *aiplatformpb.ListTensorboardsRequest, opts ...gax.CallOption) *TensorboardIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListTensorboards[0:len((*c.CallOptions).ListTensorboards):len((*c.CallOptions).ListTensorboards)], opts...) + it := &TensorboardIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTensorboardsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.Tensorboard, string, error) { + resp := &aiplatformpb.ListTensorboardsResponse{} + 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.tensorboardClient.ListTensorboards(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTensorboards(), 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 *tensorboardGRPCClient) DeleteTensorboard(ctx context.Context, req *aiplatformpb.DeleteTensorboardRequest, opts ...gax.CallOption) (*DeleteTensorboardOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteTensorboard[0:len((*c.CallOptions).DeleteTensorboard):len((*c.CallOptions).DeleteTensorboard)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.DeleteTensorboard(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *tensorboardGRPCClient) CreateTensorboardExperiment(ctx context.Context, req *aiplatformpb.CreateTensorboardExperimentRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateTensorboardExperiment[0:len((*c.CallOptions).CreateTensorboardExperiment):len((*c.CallOptions).CreateTensorboardExperiment)], opts...) + var resp *aiplatformpb.TensorboardExperiment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.CreateTensorboardExperiment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) GetTensorboardExperiment(ctx context.Context, req *aiplatformpb.GetTensorboardExperimentRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetTensorboardExperiment[0:len((*c.CallOptions).GetTensorboardExperiment):len((*c.CallOptions).GetTensorboardExperiment)], opts...) + var resp *aiplatformpb.TensorboardExperiment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.GetTensorboardExperiment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) UpdateTensorboardExperiment(ctx context.Context, req *aiplatformpb.UpdateTensorboardExperimentRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardExperiment, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_experiment.name", url.QueryEscape(req.GetTensorboardExperiment().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateTensorboardExperiment[0:len((*c.CallOptions).UpdateTensorboardExperiment):len((*c.CallOptions).UpdateTensorboardExperiment)], opts...) + var resp *aiplatformpb.TensorboardExperiment + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.UpdateTensorboardExperiment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) ListTensorboardExperiments(ctx context.Context, req *aiplatformpb.ListTensorboardExperimentsRequest, opts ...gax.CallOption) *TensorboardExperimentIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListTensorboardExperiments[0:len((*c.CallOptions).ListTensorboardExperiments):len((*c.CallOptions).ListTensorboardExperiments)], opts...) + it := &TensorboardExperimentIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTensorboardExperimentsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TensorboardExperiment, string, error) { + resp := &aiplatformpb.ListTensorboardExperimentsResponse{} + 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.tensorboardClient.ListTensorboardExperiments(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTensorboardExperiments(), 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 *tensorboardGRPCClient) DeleteTensorboardExperiment(ctx context.Context, req *aiplatformpb.DeleteTensorboardExperimentRequest, opts ...gax.CallOption) (*DeleteTensorboardExperimentOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteTensorboardExperiment[0:len((*c.CallOptions).DeleteTensorboardExperiment):len((*c.CallOptions).DeleteTensorboardExperiment)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.DeleteTensorboardExperiment(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteTensorboardExperimentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *tensorboardGRPCClient) CreateTensorboardRun(ctx context.Context, req *aiplatformpb.CreateTensorboardRunRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateTensorboardRun[0:len((*c.CallOptions).CreateTensorboardRun):len((*c.CallOptions).CreateTensorboardRun)], opts...) + var resp *aiplatformpb.TensorboardRun + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.CreateTensorboardRun(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) BatchCreateTensorboardRuns(ctx context.Context, req *aiplatformpb.BatchCreateTensorboardRunsRequest, opts ...gax.CallOption) (*aiplatformpb.BatchCreateTensorboardRunsResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchCreateTensorboardRuns[0:len((*c.CallOptions).BatchCreateTensorboardRuns):len((*c.CallOptions).BatchCreateTensorboardRuns)], opts...) + var resp *aiplatformpb.BatchCreateTensorboardRunsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.BatchCreateTensorboardRuns(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) GetTensorboardRun(ctx context.Context, req *aiplatformpb.GetTensorboardRunRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetTensorboardRun[0:len((*c.CallOptions).GetTensorboardRun):len((*c.CallOptions).GetTensorboardRun)], opts...) + var resp *aiplatformpb.TensorboardRun + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.GetTensorboardRun(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) UpdateTensorboardRun(ctx context.Context, req *aiplatformpb.UpdateTensorboardRunRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardRun, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_run.name", url.QueryEscape(req.GetTensorboardRun().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateTensorboardRun[0:len((*c.CallOptions).UpdateTensorboardRun):len((*c.CallOptions).UpdateTensorboardRun)], opts...) + var resp *aiplatformpb.TensorboardRun + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.UpdateTensorboardRun(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) ListTensorboardRuns(ctx context.Context, req *aiplatformpb.ListTensorboardRunsRequest, opts ...gax.CallOption) *TensorboardRunIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListTensorboardRuns[0:len((*c.CallOptions).ListTensorboardRuns):len((*c.CallOptions).ListTensorboardRuns)], opts...) + it := &TensorboardRunIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTensorboardRunsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TensorboardRun, string, error) { + resp := &aiplatformpb.ListTensorboardRunsResponse{} + 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.tensorboardClient.ListTensorboardRuns(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTensorboardRuns(), 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 *tensorboardGRPCClient) DeleteTensorboardRun(ctx context.Context, req *aiplatformpb.DeleteTensorboardRunRequest, opts ...gax.CallOption) (*DeleteTensorboardRunOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteTensorboardRun[0:len((*c.CallOptions).DeleteTensorboardRun):len((*c.CallOptions).DeleteTensorboardRun)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.DeleteTensorboardRun(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteTensorboardRunOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *tensorboardGRPCClient) BatchCreateTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.BatchCreateTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.BatchCreateTensorboardTimeSeriesResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchCreateTensorboardTimeSeries[0:len((*c.CallOptions).BatchCreateTensorboardTimeSeries):len((*c.CallOptions).BatchCreateTensorboardTimeSeries)], opts...) + var resp *aiplatformpb.BatchCreateTensorboardTimeSeriesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.BatchCreateTensorboardTimeSeries(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) CreateTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.CreateTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CreateTensorboardTimeSeries[0:len((*c.CallOptions).CreateTensorboardTimeSeries):len((*c.CallOptions).CreateTensorboardTimeSeries)], opts...) + var resp *aiplatformpb.TensorboardTimeSeries + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.CreateTensorboardTimeSeries(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) GetTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.GetTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).GetTensorboardTimeSeries[0:len((*c.CallOptions).GetTensorboardTimeSeries):len((*c.CallOptions).GetTensorboardTimeSeries)], opts...) + var resp *aiplatformpb.TensorboardTimeSeries + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.GetTensorboardTimeSeries(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) UpdateTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.UpdateTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*aiplatformpb.TensorboardTimeSeries, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_time_series.name", url.QueryEscape(req.GetTensorboardTimeSeries().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateTensorboardTimeSeries[0:len((*c.CallOptions).UpdateTensorboardTimeSeries):len((*c.CallOptions).UpdateTensorboardTimeSeries)], opts...) + var resp *aiplatformpb.TensorboardTimeSeries + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.UpdateTensorboardTimeSeries(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) ListTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.ListTensorboardTimeSeriesRequest, opts ...gax.CallOption) *TensorboardTimeSeriesIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ListTensorboardTimeSeries[0:len((*c.CallOptions).ListTensorboardTimeSeries):len((*c.CallOptions).ListTensorboardTimeSeries)], opts...) + it := &TensorboardTimeSeriesIterator{} + req = proto.Clone(req).(*aiplatformpb.ListTensorboardTimeSeriesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TensorboardTimeSeries, string, error) { + resp := &aiplatformpb.ListTensorboardTimeSeriesResponse{} + 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.tensorboardClient.ListTensorboardTimeSeries(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTensorboardTimeSeries(), 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 *tensorboardGRPCClient) DeleteTensorboardTimeSeries(ctx context.Context, req *aiplatformpb.DeleteTensorboardTimeSeriesRequest, opts ...gax.CallOption) (*DeleteTensorboardTimeSeriesOperation, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).DeleteTensorboardTimeSeries[0:len((*c.CallOptions).DeleteTensorboardTimeSeries):len((*c.CallOptions).DeleteTensorboardTimeSeries)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.DeleteTensorboardTimeSeries(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &DeleteTensorboardTimeSeriesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *tensorboardGRPCClient) BatchReadTensorboardTimeSeriesData(ctx context.Context, req *aiplatformpb.BatchReadTensorboardTimeSeriesDataRequest, opts ...gax.CallOption) (*aiplatformpb.BatchReadTensorboardTimeSeriesDataResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard", url.QueryEscape(req.GetTensorboard()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).BatchReadTensorboardTimeSeriesData[0:len((*c.CallOptions).BatchReadTensorboardTimeSeriesData):len((*c.CallOptions).BatchReadTensorboardTimeSeriesData)], opts...) + var resp *aiplatformpb.BatchReadTensorboardTimeSeriesDataResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.BatchReadTensorboardTimeSeriesData(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) ReadTensorboardTimeSeriesData(ctx context.Context, req *aiplatformpb.ReadTensorboardTimeSeriesDataRequest, opts ...gax.CallOption) (*aiplatformpb.ReadTensorboardTimeSeriesDataResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_time_series", url.QueryEscape(req.GetTensorboardTimeSeries()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ReadTensorboardTimeSeriesData[0:len((*c.CallOptions).ReadTensorboardTimeSeriesData):len((*c.CallOptions).ReadTensorboardTimeSeriesData)], opts...) + var resp *aiplatformpb.ReadTensorboardTimeSeriesDataResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.ReadTensorboardTimeSeriesData(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) ReadTensorboardBlobData(ctx context.Context, req *aiplatformpb.ReadTensorboardBlobDataRequest, opts ...gax.CallOption) (aiplatformpb.TensorboardService_ReadTensorboardBlobDataClient, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "time_series", url.QueryEscape(req.GetTimeSeries()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + var resp aiplatformpb.TensorboardService_ReadTensorboardBlobDataClient + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.ReadTensorboardBlobData(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) WriteTensorboardExperimentData(ctx context.Context, req *aiplatformpb.WriteTensorboardExperimentDataRequest, opts ...gax.CallOption) (*aiplatformpb.WriteTensorboardExperimentDataResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_experiment", url.QueryEscape(req.GetTensorboardExperiment()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).WriteTensorboardExperimentData[0:len((*c.CallOptions).WriteTensorboardExperimentData):len((*c.CallOptions).WriteTensorboardExperimentData)], opts...) + var resp *aiplatformpb.WriteTensorboardExperimentDataResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.WriteTensorboardExperimentData(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) WriteTensorboardRunData(ctx context.Context, req *aiplatformpb.WriteTensorboardRunDataRequest, opts ...gax.CallOption) (*aiplatformpb.WriteTensorboardRunDataResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_run", url.QueryEscape(req.GetTensorboardRun()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).WriteTensorboardRunData[0:len((*c.CallOptions).WriteTensorboardRunData):len((*c.CallOptions).WriteTensorboardRunData)], opts...) + var resp *aiplatformpb.WriteTensorboardRunDataResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.tensorboardClient.WriteTensorboardRunData(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *tensorboardGRPCClient) ExportTensorboardTimeSeriesData(ctx context.Context, req *aiplatformpb.ExportTensorboardTimeSeriesDataRequest, opts ...gax.CallOption) *TimeSeriesDataPointIterator { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "tensorboard_time_series", url.QueryEscape(req.GetTensorboardTimeSeries()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ExportTensorboardTimeSeriesData[0:len((*c.CallOptions).ExportTensorboardTimeSeriesData):len((*c.CallOptions).ExportTensorboardTimeSeriesData)], opts...) + it := &TimeSeriesDataPointIterator{} + req = proto.Clone(req).(*aiplatformpb.ExportTensorboardTimeSeriesDataRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*aiplatformpb.TimeSeriesDataPoint, string, error) { + resp := &aiplatformpb.ExportTensorboardTimeSeriesDataResponse{} + 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.tensorboardClient.ExportTensorboardTimeSeriesData(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.GetTimeSeriesDataPoints(), 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 +} + +// CreateTensorboardOperation manages a long-running operation from CreateTensorboard. +type CreateTensorboardOperation struct { + lro *longrunning.Operation +} + +// CreateTensorboardOperation returns a new CreateTensorboardOperation from a given name. +// The name must be that of a previously created CreateTensorboardOperation, possibly from a different process. +func (c *tensorboardGRPCClient) CreateTensorboardOperation(name string) *CreateTensorboardOperation { + return &CreateTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// 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 *CreateTensorboardOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + var resp aiplatformpb.Tensorboard + 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 *CreateTensorboardOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + var resp aiplatformpb.Tensorboard + 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 *CreateTensorboardOperation) Metadata() (*aiplatformpb.CreateTensorboardOperationMetadata, error) { + var meta aiplatformpb.CreateTensorboardOperationMetadata + 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 *CreateTensorboardOperation) 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 *CreateTensorboardOperation) Name() string { + return op.lro.Name() +} + +// DeleteTensorboardOperation manages a long-running operation from DeleteTensorboard. +type DeleteTensorboardOperation struct { + lro *longrunning.Operation +} + +// DeleteTensorboardOperation returns a new DeleteTensorboardOperation from a given name. +// The name must be that of a previously created DeleteTensorboardOperation, possibly from a different process. +func (c *tensorboardGRPCClient) DeleteTensorboardOperation(name string) *DeleteTensorboardOperation { + return &DeleteTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// 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 *DeleteTensorboardOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + 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 *DeleteTensorboardOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + 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 *DeleteTensorboardOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + 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 *DeleteTensorboardOperation) 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 *DeleteTensorboardOperation) Name() string { + return op.lro.Name() +} + +// DeleteTensorboardExperimentOperation manages a long-running operation from DeleteTensorboardExperiment. +type DeleteTensorboardExperimentOperation struct { + lro *longrunning.Operation +} + +// DeleteTensorboardExperimentOperation returns a new DeleteTensorboardExperimentOperation from a given name. +// The name must be that of a previously created DeleteTensorboardExperimentOperation, possibly from a different process. +func (c *tensorboardGRPCClient) DeleteTensorboardExperimentOperation(name string) *DeleteTensorboardExperimentOperation { + return &DeleteTensorboardExperimentOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// 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 *DeleteTensorboardExperimentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + 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 *DeleteTensorboardExperimentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + 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 *DeleteTensorboardExperimentOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + 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 *DeleteTensorboardExperimentOperation) 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 *DeleteTensorboardExperimentOperation) Name() string { + return op.lro.Name() +} + +// DeleteTensorboardRunOperation manages a long-running operation from DeleteTensorboardRun. +type DeleteTensorboardRunOperation struct { + lro *longrunning.Operation +} + +// DeleteTensorboardRunOperation returns a new DeleteTensorboardRunOperation from a given name. +// The name must be that of a previously created DeleteTensorboardRunOperation, possibly from a different process. +func (c *tensorboardGRPCClient) DeleteTensorboardRunOperation(name string) *DeleteTensorboardRunOperation { + return &DeleteTensorboardRunOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// 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 *DeleteTensorboardRunOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + 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 *DeleteTensorboardRunOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + 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 *DeleteTensorboardRunOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + 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 *DeleteTensorboardRunOperation) 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 *DeleteTensorboardRunOperation) Name() string { + return op.lro.Name() +} + +// DeleteTensorboardTimeSeriesOperation manages a long-running operation from DeleteTensorboardTimeSeries. +type DeleteTensorboardTimeSeriesOperation struct { + lro *longrunning.Operation +} + +// DeleteTensorboardTimeSeriesOperation returns a new DeleteTensorboardTimeSeriesOperation from a given name. +// The name must be that of a previously created DeleteTensorboardTimeSeriesOperation, possibly from a different process. +func (c *tensorboardGRPCClient) DeleteTensorboardTimeSeriesOperation(name string) *DeleteTensorboardTimeSeriesOperation { + return &DeleteTensorboardTimeSeriesOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// 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 *DeleteTensorboardTimeSeriesOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { + 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 *DeleteTensorboardTimeSeriesOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { + 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 *DeleteTensorboardTimeSeriesOperation) Metadata() (*aiplatformpb.DeleteOperationMetadata, error) { + var meta aiplatformpb.DeleteOperationMetadata + 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 *DeleteTensorboardTimeSeriesOperation) 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 *DeleteTensorboardTimeSeriesOperation) Name() string { + return op.lro.Name() +} + +// UpdateTensorboardOperation manages a long-running operation from UpdateTensorboard. +type UpdateTensorboardOperation struct { + lro *longrunning.Operation +} + +// UpdateTensorboardOperation returns a new UpdateTensorboardOperation from a given name. +// The name must be that of a previously created UpdateTensorboardOperation, possibly from a different process. +func (c *tensorboardGRPCClient) UpdateTensorboardOperation(name string) *UpdateTensorboardOperation { + return &UpdateTensorboardOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, &longrunningpb.Operation{Name: name}), + } +} + +// 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 *UpdateTensorboardOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + var resp aiplatformpb.Tensorboard + 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 *UpdateTensorboardOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*aiplatformpb.Tensorboard, error) { + var resp aiplatformpb.Tensorboard + 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 *UpdateTensorboardOperation) Metadata() (*aiplatformpb.UpdateTensorboardOperationMetadata, error) { + var meta aiplatformpb.UpdateTensorboardOperationMetadata + 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 *UpdateTensorboardOperation) 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 *UpdateTensorboardOperation) Name() string { + return op.lro.Name() +} + +// TensorboardExperimentIterator manages a stream of *aiplatformpb.TensorboardExperiment. +type TensorboardExperimentIterator struct { + items []*aiplatformpb.TensorboardExperiment + 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 []*aiplatformpb.TensorboardExperiment, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TensorboardExperimentIterator) 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 *TensorboardExperimentIterator) Next() (*aiplatformpb.TensorboardExperiment, error) { + var item *aiplatformpb.TensorboardExperiment + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TensorboardExperimentIterator) bufLen() int { + return len(it.items) +} + +func (it *TensorboardExperimentIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// TensorboardIterator manages a stream of *aiplatformpb.Tensorboard. +type TensorboardIterator struct { + items []*aiplatformpb.Tensorboard + 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 []*aiplatformpb.Tensorboard, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TensorboardIterator) 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 *TensorboardIterator) Next() (*aiplatformpb.Tensorboard, error) { + var item *aiplatformpb.Tensorboard + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TensorboardIterator) bufLen() int { + return len(it.items) +} + +func (it *TensorboardIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// TensorboardRunIterator manages a stream of *aiplatformpb.TensorboardRun. +type TensorboardRunIterator struct { + items []*aiplatformpb.TensorboardRun + 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 []*aiplatformpb.TensorboardRun, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TensorboardRunIterator) 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 *TensorboardRunIterator) Next() (*aiplatformpb.TensorboardRun, error) { + var item *aiplatformpb.TensorboardRun + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TensorboardRunIterator) bufLen() int { + return len(it.items) +} + +func (it *TensorboardRunIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// TensorboardTimeSeriesIterator manages a stream of *aiplatformpb.TensorboardTimeSeries. +type TensorboardTimeSeriesIterator struct { + items []*aiplatformpb.TensorboardTimeSeries + 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 []*aiplatformpb.TensorboardTimeSeries, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TensorboardTimeSeriesIterator) 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 *TensorboardTimeSeriesIterator) Next() (*aiplatformpb.TensorboardTimeSeries, error) { + var item *aiplatformpb.TensorboardTimeSeries + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TensorboardTimeSeriesIterator) bufLen() int { + return len(it.items) +} + +func (it *TensorboardTimeSeriesIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// TimeSeriesDataPointIterator manages a stream of *aiplatformpb.TimeSeriesDataPoint. +type TimeSeriesDataPointIterator struct { + items []*aiplatformpb.TimeSeriesDataPoint + 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 []*aiplatformpb.TimeSeriesDataPoint, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *TimeSeriesDataPointIterator) 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 *TimeSeriesDataPointIterator) Next() (*aiplatformpb.TimeSeriesDataPoint, error) { + var item *aiplatformpb.TimeSeriesDataPoint + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *TimeSeriesDataPointIterator) bufLen() int { + return len(it.items) +} + +func (it *TimeSeriesDataPointIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/aiplatform/apiv1/tensorboard_client_example_test.go b/aiplatform/apiv1/tensorboard_client_example_test.go new file mode 100644 index 000000000000..5a8a49604035 --- /dev/null +++ b/aiplatform/apiv1/tensorboard_client_example_test.go @@ -0,0 +1,629 @@ +// Copyright 2021 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 aiplatform_test + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + "google.golang.org/api/iterator" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func ExampleNewTensorboardClient() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + // TODO: Use client. + _ = c +} + +func ExampleTensorboardClient_CreateTensorboard() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTensorboardRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardRequest. + } + op, err := c.CreateTensorboard(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_GetTensorboard() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTensorboardRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardRequest. + } + resp, err := c.GetTensorboard(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_UpdateTensorboard() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpdateTensorboardRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardRequest. + } + op, err := c.UpdateTensorboard(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_ListTensorboards() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTensorboardsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardsRequest. + } + it := c.ListTensorboards(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleTensorboardClient_DeleteTensorboard() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteTensorboardRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardRequest. + } + op, err := c.DeleteTensorboard(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleTensorboardClient_CreateTensorboardExperiment() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTensorboardExperimentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardExperimentRequest. + } + resp, err := c.CreateTensorboardExperiment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_GetTensorboardExperiment() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTensorboardExperimentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardExperimentRequest. + } + resp, err := c.GetTensorboardExperiment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_UpdateTensorboardExperiment() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpdateTensorboardExperimentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardExperimentRequest. + } + resp, err := c.UpdateTensorboardExperiment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_ListTensorboardExperiments() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTensorboardExperimentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardExperimentsRequest. + } + it := c.ListTensorboardExperiments(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleTensorboardClient_DeleteTensorboardExperiment() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteTensorboardExperimentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardExperimentRequest. + } + op, err := c.DeleteTensorboardExperiment(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleTensorboardClient_CreateTensorboardRun() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTensorboardRunRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardRunRequest. + } + resp, err := c.CreateTensorboardRun(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_BatchCreateTensorboardRuns() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.BatchCreateTensorboardRunsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchCreateTensorboardRunsRequest. + } + resp, err := c.BatchCreateTensorboardRuns(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_GetTensorboardRun() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTensorboardRunRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardRunRequest. + } + resp, err := c.GetTensorboardRun(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_UpdateTensorboardRun() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpdateTensorboardRunRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardRunRequest. + } + resp, err := c.UpdateTensorboardRun(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_ListTensorboardRuns() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTensorboardRunsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardRunsRequest. + } + it := c.ListTensorboardRuns(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleTensorboardClient_DeleteTensorboardRun() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteTensorboardRunRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardRunRequest. + } + op, err := c.DeleteTensorboardRun(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleTensorboardClient_BatchCreateTensorboardTimeSeries() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.BatchCreateTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchCreateTensorboardTimeSeriesRequest. + } + resp, err := c.BatchCreateTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_CreateTensorboardTimeSeries() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardTimeSeriesRequest. + } + resp, err := c.CreateTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_GetTensorboardTimeSeries() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardTimeSeriesRequest. + } + resp, err := c.GetTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_UpdateTensorboardTimeSeries() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpdateTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardTimeSeriesRequest. + } + resp, err := c.UpdateTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_ListTensorboardTimeSeries() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardTimeSeriesRequest. + } + it := c.ListTensorboardTimeSeries(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleTensorboardClient_DeleteTensorboardTimeSeries() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardTimeSeriesRequest. + } + op, err := c.DeleteTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleTensorboardClient_BatchReadTensorboardTimeSeriesData() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.BatchReadTensorboardTimeSeriesDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchReadTensorboardTimeSeriesDataRequest. + } + resp, err := c.BatchReadTensorboardTimeSeriesData(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_ReadTensorboardTimeSeriesData() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ReadTensorboardTimeSeriesDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ReadTensorboardTimeSeriesDataRequest. + } + resp, err := c.ReadTensorboardTimeSeriesData(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_WriteTensorboardExperimentData() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.WriteTensorboardExperimentDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#WriteTensorboardExperimentDataRequest. + } + resp, err := c.WriteTensorboardExperimentData(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_WriteTensorboardRunData() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.WriteTensorboardRunDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#WriteTensorboardRunDataRequest. + } + resp, err := c.WriteTensorboardRunData(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleTensorboardClient_ExportTensorboardTimeSeriesData() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ExportTensorboardTimeSeriesDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExportTensorboardTimeSeriesDataRequest. + } + it := c.ExportTensorboardTimeSeriesData(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/aiplatform/go.mod b/aiplatform/go.mod index aaf0d5a035bb..9f81e20d79d8 100644 --- a/aiplatform/go.mod +++ b/aiplatform/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.97.0 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.60.0 - google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7 + google.golang.org/genproto v0.0.0-20211117155847-120650a500bb google.golang.org/grpc v1.40.0 google.golang.org/protobuf v1.27.1 ) diff --git a/aiplatform/go.sum b/aiplatform/go.sum index fe5138ddd30d..1f30fd225536 100644 --- a/aiplatform/go.sum +++ b/aiplatform/go.sum @@ -503,8 +503,8 @@ google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7 h1:0LoCYJF53PEqtJOntKxGD72X/c8Xto5EZ4HLrt9D80I= -google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb h1:B1cc9lxfg3Zd0zoHxwyckY7YPprzkXKNWw9sxJ3/obk= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/cloudtasks/apiv2/doc.go b/cloudtasks/apiv2/doc.go index 21cbd60e4d5b..5427e476534f 100644 --- a/cloudtasks/apiv2/doc.go +++ b/cloudtasks/apiv2/doc.go @@ -90,7 +90,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20211113" +const versionClient = "20211117" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/cloudtasks/go.mod b/cloudtasks/go.mod index 0f1f6c8a4207..10c0b5f2648b 100644 --- a/cloudtasks/go.mod +++ b/cloudtasks/go.mod @@ -6,7 +6,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.60.0 - google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7 + google.golang.org/genproto v0.0.0-20211117155847-120650a500bb google.golang.org/grpc v1.40.0 google.golang.org/protobuf v1.27.1 ) diff --git a/cloudtasks/go.sum b/cloudtasks/go.sum index fe5138ddd30d..1f30fd225536 100644 --- a/cloudtasks/go.sum +++ b/cloudtasks/go.sum @@ -503,8 +503,8 @@ google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7 h1:0LoCYJF53PEqtJOntKxGD72X/c8Xto5EZ4HLrt9D80I= -google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb h1:B1cc9lxfg3Zd0zoHxwyckY7YPprzkXKNWw9sxJ3/obk= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/dialogflow/cx/apiv3/doc.go b/dialogflow/cx/apiv3/doc.go index f873dd3c479d..120937082fda 100644 --- a/dialogflow/cx/apiv3/doc.go +++ b/dialogflow/cx/apiv3/doc.go @@ -91,7 +91,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20211113" +const versionClient = "20211117" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dialogflow/cx/apiv3/gapic_metadata.json b/dialogflow/cx/apiv3/gapic_metadata.json index 0c851d91a678..422eb4011d19 100644 --- a/dialogflow/cx/apiv3/gapic_metadata.json +++ b/dialogflow/cx/apiv3/gapic_metadata.json @@ -561,6 +561,11 @@ "grpc": { "libraryClient": "VersionsClient", "rpcs": { + "CompareVersions": { + "methods": [ + "CompareVersions" + ] + }, "CreateVersion": { "methods": [ "CreateVersion" diff --git a/dialogflow/cx/apiv3/versions_client.go b/dialogflow/cx/apiv3/versions_client.go index cbac63278e0d..d3a1557630ae 100644 --- a/dialogflow/cx/apiv3/versions_client.go +++ b/dialogflow/cx/apiv3/versions_client.go @@ -43,12 +43,13 @@ var newVersionsClientHook clientHook // VersionsCallOptions contains the retry settings for each method of VersionsClient. type VersionsCallOptions struct { - ListVersions []gax.CallOption - GetVersion []gax.CallOption - CreateVersion []gax.CallOption - UpdateVersion []gax.CallOption - DeleteVersion []gax.CallOption - LoadVersion []gax.CallOption + ListVersions []gax.CallOption + GetVersion []gax.CallOption + CreateVersion []gax.CallOption + UpdateVersion []gax.CallOption + DeleteVersion []gax.CallOption + LoadVersion []gax.CallOption + CompareVersions []gax.CallOption } func defaultVersionsGRPCClientOptions() []option.ClientOption { @@ -131,6 +132,17 @@ func defaultVersionsCallOptions() *VersionsCallOptions { }) }), }, + CompareVersions: []gax.CallOption{ + 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, + }) + }), + }, } } @@ -147,6 +159,7 @@ type internalVersionsClient interface { DeleteVersion(context.Context, *cxpb.DeleteVersionRequest, ...gax.CallOption) error LoadVersion(context.Context, *cxpb.LoadVersionRequest, ...gax.CallOption) (*LoadVersionOperation, error) LoadVersionOperation(name string) *LoadVersionOperation + CompareVersions(context.Context, *cxpb.CompareVersionsRequest, ...gax.CallOption) (*cxpb.CompareVersionsResponse, error) } // VersionsClient is a client for interacting with Dialogflow API. @@ -188,7 +201,8 @@ func (c *VersionsClient) Connection() *grpc.ClientConn { return c.internalClient.Connection() } -// ListVersions returns the list of all versions in the specified Flow. +// ListVersions returns the list of all versions in the specified +// Flow. func (c *VersionsClient) ListVersions(ctx context.Context, req *cxpb.ListVersionsRequest, opts ...gax.CallOption) *VersionIterator { return c.internalClient.ListVersions(ctx, req, opts...) } @@ -198,13 +212,15 @@ func (c *VersionsClient) GetVersion(ctx context.Context, req *cxpb.GetVersionReq return c.internalClient.GetVersion(ctx, req, opts...) } -// CreateVersion creates a Version in the specified Flow. +// CreateVersion creates a Version in the specified +// Flow. // // This method is a long-running // operation (at https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). // The returned Operation type has the following method-specific fields: // -// metadata: CreateVersionOperationMetadata +// metadata: +// CreateVersionOperationMetadata // // response: Version func (c *VersionsClient) CreateVersion(ctx context.Context, req *cxpb.CreateVersionRequest, opts ...gax.CallOption) (*CreateVersionOperation, error) { @@ -248,6 +264,11 @@ func (c *VersionsClient) LoadVersionOperation(name string) *LoadVersionOperation return c.internalClient.LoadVersionOperation(name) } +// CompareVersions compares the specified base version with target version. +func (c *VersionsClient) CompareVersions(ctx context.Context, req *cxpb.CompareVersionsRequest, opts ...gax.CallOption) (*cxpb.CompareVersionsResponse, error) { + return c.internalClient.CompareVersions(ctx, req, opts...) +} + // versionsGRPCClient is a client for interacting with Dialogflow API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -493,6 +514,27 @@ func (c *versionsGRPCClient) LoadVersion(ctx context.Context, req *cxpb.LoadVers }, nil } +func (c *versionsGRPCClient) CompareVersions(ctx context.Context, req *cxpb.CompareVersionsRequest, opts ...gax.CallOption) (*cxpb.CompareVersionsResponse, error) { + if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { + cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) + defer cancel() + ctx = cctx + } + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "base_version", url.QueryEscape(req.GetBaseVersion()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).CompareVersions[0:len((*c.CallOptions).CompareVersions):len((*c.CallOptions).CompareVersions)], opts...) + var resp *cxpb.CompareVersionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.versionsClient.CompareVersions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // CreateVersionOperation manages a long-running operation from CreateVersion. type CreateVersionOperation struct { lro *longrunning.Operation diff --git a/dialogflow/cx/apiv3/versions_client_example_test.go b/dialogflow/cx/apiv3/versions_client_example_test.go index 14d09e68aa8c..b1ba52472c20 100644 --- a/dialogflow/cx/apiv3/versions_client_example_test.go +++ b/dialogflow/cx/apiv3/versions_client_example_test.go @@ -167,3 +167,23 @@ func ExampleVersionsClient_LoadVersion() { // TODO: Handle error. } } + +func ExampleVersionsClient_CompareVersions() { + ctx := context.Background() + c, err := cx.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.CompareVersionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3#CompareVersionsRequest. + } + resp, err := c.CompareVersions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/dialogflow/go.mod b/dialogflow/go.mod index 1b1141b67fa3..dac23b5f17ab 100644 --- a/dialogflow/go.mod +++ b/dialogflow/go.mod @@ -7,7 +7,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.60.0 - google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7 + google.golang.org/genproto v0.0.0-20211117155847-120650a500bb google.golang.org/grpc v1.40.0 google.golang.org/protobuf v1.27.1 ) diff --git a/dialogflow/go.sum b/dialogflow/go.sum index fe5138ddd30d..1f30fd225536 100644 --- a/dialogflow/go.sum +++ b/dialogflow/go.sum @@ -503,8 +503,8 @@ google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7 h1:0LoCYJF53PEqtJOntKxGD72X/c8Xto5EZ4HLrt9D80I= -google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb h1:B1cc9lxfg3Zd0zoHxwyckY7YPprzkXKNWw9sxJ3/obk= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/go.mod b/go.mod index 9eb1209aa6bc..54ced20ad163 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.60.0 - google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 + google.golang.org/genproto v0.0.0-20211117155847-120650a500bb google.golang.org/grpc v1.40.0 google.golang.org/protobuf v1.27.1 ) diff --git a/go.sum b/go.sum index 9a6457c6c164..dc09c7c970ef 100644 --- a/go.sum +++ b/go.sum @@ -511,8 +511,8 @@ google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 h1:nPiLDJ9/wsay2NDshdJ1B24frx+butTxmaVaCxDBChY= -google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb h1:B1cc9lxfg3Zd0zoHxwyckY7YPprzkXKNWw9sxJ3/obk= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchCreateTensorboardRuns/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchCreateTensorboardRuns/main.go new file mode 100644 index 000000000000..725a1b99f294 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchCreateTensorboardRuns/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardRuns_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.BatchCreateTensorboardRunsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchCreateTensorboardRunsRequest. + } + resp, err := c.BatchCreateTensorboardRuns(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardRuns_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchCreateTensorboardTimeSeries/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchCreateTensorboardTimeSeries/main.go new file mode 100644 index 000000000000..acea961327f4 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchCreateTensorboardTimeSeries/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardTimeSeries_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.BatchCreateTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchCreateTensorboardTimeSeriesRequest. + } + resp, err := c.BatchCreateTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_BatchCreateTensorboardTimeSeries_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchReadTensorboardTimeSeriesData/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchReadTensorboardTimeSeriesData/main.go new file mode 100644 index 000000000000..4fd585a9136e --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/BatchReadTensorboardTimeSeriesData/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_BatchReadTensorboardTimeSeriesData_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.BatchReadTensorboardTimeSeriesDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#BatchReadTensorboardTimeSeriesDataRequest. + } + resp, err := c.BatchReadTensorboardTimeSeriesData(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_BatchReadTensorboardTimeSeriesData_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboard/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboard/main.go new file mode 100644 index 000000000000..98a8ace5a47a --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboard/main.go @@ -0,0 +1,53 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_CreateTensorboard_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTensorboardRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardRequest. + } + op, err := c.CreateTensorboard(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_CreateTensorboard_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardExperiment/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardExperiment/main.go new file mode 100644 index 000000000000..4a5703ca312a --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardExperiment/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_CreateTensorboardExperiment_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTensorboardExperimentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardExperimentRequest. + } + resp, err := c.CreateTensorboardExperiment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_CreateTensorboardExperiment_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardRun/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardRun/main.go new file mode 100644 index 000000000000..0c4a6f3fa176 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardRun/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_CreateTensorboardRun_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTensorboardRunRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardRunRequest. + } + resp, err := c.CreateTensorboardRun(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_CreateTensorboardRun_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardTimeSeries/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardTimeSeries/main.go new file mode 100644 index 000000000000..64388afa3463 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/CreateTensorboardTimeSeries/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_CreateTensorboardTimeSeries_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.CreateTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#CreateTensorboardTimeSeriesRequest. + } + resp, err := c.CreateTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_CreateTensorboardTimeSeries_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboard/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboard/main.go new file mode 100644 index 000000000000..be46a09e89fc --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboard/main.go @@ -0,0 +1,51 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_DeleteTensorboard_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteTensorboardRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardRequest. + } + op, err := c.DeleteTensorboard(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END aiplatform_v1_generated_TensorboardService_DeleteTensorboard_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardExperiment/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardExperiment/main.go new file mode 100644 index 000000000000..f095d11cd836 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardExperiment/main.go @@ -0,0 +1,51 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_DeleteTensorboardExperiment_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteTensorboardExperimentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardExperimentRequest. + } + op, err := c.DeleteTensorboardExperiment(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END aiplatform_v1_generated_TensorboardService_DeleteTensorboardExperiment_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardRun/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardRun/main.go new file mode 100644 index 000000000000..5f799e62c801 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardRun/main.go @@ -0,0 +1,51 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_DeleteTensorboardRun_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteTensorboardRunRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardRunRequest. + } + op, err := c.DeleteTensorboardRun(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END aiplatform_v1_generated_TensorboardService_DeleteTensorboardRun_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardTimeSeries/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardTimeSeries/main.go new file mode 100644 index 000000000000..f8798a2c4ae2 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/DeleteTensorboardTimeSeries/main.go @@ -0,0 +1,51 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_DeleteTensorboardTimeSeries_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.DeleteTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#DeleteTensorboardTimeSeriesRequest. + } + op, err := c.DeleteTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END aiplatform_v1_generated_TensorboardService_DeleteTensorboardTimeSeries_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ExportTensorboardTimeSeriesData/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ExportTensorboardTimeSeriesData/main.go new file mode 100644 index 000000000000..6eaa431dfc1f --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ExportTensorboardTimeSeriesData/main.go @@ -0,0 +1,55 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_ExportTensorboardTimeSeriesData_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + "google.golang.org/api/iterator" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ExportTensorboardTimeSeriesDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ExportTensorboardTimeSeriesDataRequest. + } + it := c.ExportTensorboardTimeSeriesData(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1_generated_TensorboardService_ExportTensorboardTimeSeriesData_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboard/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboard/main.go new file mode 100644 index 000000000000..0f65024aad13 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboard/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_GetTensorboard_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTensorboardRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardRequest. + } + resp, err := c.GetTensorboard(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_GetTensorboard_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardExperiment/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardExperiment/main.go new file mode 100644 index 000000000000..65f9a8ac2042 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardExperiment/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_GetTensorboardExperiment_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTensorboardExperimentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardExperimentRequest. + } + resp, err := c.GetTensorboardExperiment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_GetTensorboardExperiment_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardRun/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardRun/main.go new file mode 100644 index 000000000000..aaf891597fbc --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardRun/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_GetTensorboardRun_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTensorboardRunRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardRunRequest. + } + resp, err := c.GetTensorboardRun(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_GetTensorboardRun_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardTimeSeries/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardTimeSeries/main.go new file mode 100644 index 000000000000..784c833c5d35 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/GetTensorboardTimeSeries/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_GetTensorboardTimeSeries_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.GetTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#GetTensorboardTimeSeriesRequest. + } + resp, err := c.GetTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_GetTensorboardTimeSeries_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardExperiments/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardExperiments/main.go new file mode 100644 index 000000000000..cf1298d907d4 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardExperiments/main.go @@ -0,0 +1,55 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_ListTensorboardExperiments_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + "google.golang.org/api/iterator" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTensorboardExperimentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardExperimentsRequest. + } + it := c.ListTensorboardExperiments(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1_generated_TensorboardService_ListTensorboardExperiments_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardRuns/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardRuns/main.go new file mode 100644 index 000000000000..2ff58f09e7ec --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardRuns/main.go @@ -0,0 +1,55 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_ListTensorboardRuns_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + "google.golang.org/api/iterator" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTensorboardRunsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardRunsRequest. + } + it := c.ListTensorboardRuns(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1_generated_TensorboardService_ListTensorboardRuns_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardTimeSeries/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardTimeSeries/main.go new file mode 100644 index 000000000000..fb71c2acc679 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboardTimeSeries/main.go @@ -0,0 +1,55 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_ListTensorboardTimeSeries_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + "google.golang.org/api/iterator" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardTimeSeriesRequest. + } + it := c.ListTensorboardTimeSeries(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1_generated_TensorboardService_ListTensorboardTimeSeries_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboards/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboards/main.go new file mode 100644 index 000000000000..78dadae96829 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ListTensorboards/main.go @@ -0,0 +1,55 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_ListTensorboards_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + "google.golang.org/api/iterator" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ListTensorboardsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ListTensorboardsRequest. + } + it := c.ListTensorboards(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END aiplatform_v1_generated_TensorboardService_ListTensorboards_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ReadTensorboardTimeSeriesData/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ReadTensorboardTimeSeriesData/main.go new file mode 100644 index 000000000000..e4133bb7b364 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/ReadTensorboardTimeSeriesData/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_ReadTensorboardTimeSeriesData_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.ReadTensorboardTimeSeriesDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#ReadTensorboardTimeSeriesDataRequest. + } + resp, err := c.ReadTensorboardTimeSeriesData(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_ReadTensorboardTimeSeriesData_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboard/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboard/main.go new file mode 100644 index 000000000000..1ee8150db208 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboard/main.go @@ -0,0 +1,53 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_UpdateTensorboard_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpdateTensorboardRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardRequest. + } + op, err := c.UpdateTensorboard(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_UpdateTensorboard_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardExperiment/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardExperiment/main.go new file mode 100644 index 000000000000..d7f9e7ceb1d9 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardExperiment/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_UpdateTensorboardExperiment_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpdateTensorboardExperimentRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardExperimentRequest. + } + resp, err := c.UpdateTensorboardExperiment(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_UpdateTensorboardExperiment_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardRun/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardRun/main.go new file mode 100644 index 000000000000..31563ffc2ee9 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardRun/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_UpdateTensorboardRun_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpdateTensorboardRunRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardRunRequest. + } + resp, err := c.UpdateTensorboardRun(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_UpdateTensorboardRun_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardTimeSeries/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardTimeSeries/main.go new file mode 100644 index 000000000000..0b704643278b --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/UpdateTensorboardTimeSeries/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_UpdateTensorboardTimeSeries_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.UpdateTensorboardTimeSeriesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#UpdateTensorboardTimeSeriesRequest. + } + resp, err := c.UpdateTensorboardTimeSeries(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_UpdateTensorboardTimeSeries_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/WriteTensorboardExperimentData/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/WriteTensorboardExperimentData/main.go new file mode 100644 index 000000000000..913b4ee3fd7d --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/WriteTensorboardExperimentData/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_WriteTensorboardExperimentData_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.WriteTensorboardExperimentDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#WriteTensorboardExperimentDataRequest. + } + resp, err := c.WriteTensorboardExperimentData(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_WriteTensorboardExperimentData_sync] diff --git a/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/WriteTensorboardRunData/main.go b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/WriteTensorboardRunData/main.go new file mode 100644 index 000000000000..761027f81b25 --- /dev/null +++ b/internal/generated/snippets/aiplatform/apiv1/TensorboardClient/WriteTensorboardRunData/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START aiplatform_v1_generated_TensorboardService_WriteTensorboardRunData_sync] + +package main + +import ( + "context" + + aiplatform "cloud.google.com/go/aiplatform/apiv1" + aiplatformpb "google.golang.org/genproto/googleapis/cloud/aiplatform/v1" +) + +func main() { + ctx := context.Background() + c, err := aiplatform.NewTensorboardClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &aiplatformpb.WriteTensorboardRunDataRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/aiplatform/v1#WriteTensorboardRunDataRequest. + } + resp, err := c.WriteTensorboardRunData(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END aiplatform_v1_generated_TensorboardService_WriteTensorboardRunData_sync] diff --git a/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/CompareVersions/main.go b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/CompareVersions/main.go new file mode 100644 index 000000000000..806fc5a3bba3 --- /dev/null +++ b/internal/generated/snippets/dialogflow/cx/apiv3/VersionsClient/CompareVersions/main.go @@ -0,0 +1,48 @@ +// Copyright 2021 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 cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START dialogflow_v3_generated_Versions_CompareVersions_sync] + +package main + +import ( + "context" + + cx "cloud.google.com/go/dialogflow/cx/apiv3" + cxpb "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3" +) + +func main() { + ctx := context.Background() + c, err := cx.NewVersionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &cxpb.CompareVersionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3#CompareVersionsRequest. + } + resp, err := c.CompareVersions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v3_generated_Versions_CompareVersions_sync] diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index 8be3d1bebde9..6299b3a64be7 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -127,7 +127,7 @@ require ( cloud.google.com/go/websecurityscanner v0.1.0 cloud.google.com/go/workflows v0.1.0 google.golang.org/api v0.60.0 - google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 + google.golang.org/genproto v0.0.0-20211117155847-120650a500bb ) replace cloud.google.com/go/storagetransfer => ../../../storagetransfer diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum index fd29d04552f8..338ee3a4b77e 100644 --- a/internal/generated/snippets/go.sum +++ b/internal/generated/snippets/go.sum @@ -169,8 +169,9 @@ google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211112145013-271947fe86fd/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211115160612-a5da7257a6f7/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 h1:nPiLDJ9/wsay2NDshdJ1B24frx+butTxmaVaCxDBChY= google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb h1:B1cc9lxfg3Zd0zoHxwyckY7YPprzkXKNWw9sxJ3/obk= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/internal/godocfx/go.sum b/internal/godocfx/go.sum index 94e8e0be077b..d6137cba91b6 100644 --- a/internal/godocfx/go.sum +++ b/internal/godocfx/go.sum @@ -326,8 +326,8 @@ google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 h1:nPiLDJ9/wsay2NDshdJ1B24frx+butTxmaVaCxDBChY= -google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb h1:B1cc9lxfg3Zd0zoHxwyckY7YPprzkXKNWw9sxJ3/obk= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/monitoring/apiv3/v2/doc.go b/monitoring/apiv3/v2/doc.go index 631c32814e6a..7ed485ec8142 100644 --- a/monitoring/apiv3/v2/doc.go +++ b/monitoring/apiv3/v2/doc.go @@ -17,12 +17,7 @@ // Package monitoring is an auto-generated package for the // Cloud Monitoring API. // -// Manages your Cloud Monitoring data and configurations. Most projects must -// be associated with a Workspace, with a few exceptions as noted on the -// individual method pages. The table entries below are presented in -// alphabetical order, not in order of common use. For explanations of the -// concepts found in the table entries, read the Cloud Monitoring -// documentation (at https://cloud.google.com/monitoring/docs). +// Manages your Cloud Monitoring data and configurations. // // Example usage // @@ -95,7 +90,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20211113" +const versionClient = "20211117" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/monitoring/dashboard/apiv1/doc.go b/monitoring/dashboard/apiv1/doc.go index c3b24d5f9c0e..51e98e27ea23 100644 --- a/monitoring/dashboard/apiv1/doc.go +++ b/monitoring/dashboard/apiv1/doc.go @@ -89,7 +89,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20211113" +const versionClient = "20211117" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/monitoring/go.mod b/monitoring/go.mod index 70ca893c08d2..4e7b10980a4f 100644 --- a/monitoring/go.mod +++ b/monitoring/go.mod @@ -7,7 +7,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.60.0 - google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 + google.golang.org/genproto v0.0.0-20211117155847-120650a500bb google.golang.org/grpc v1.40.0 google.golang.org/protobuf v1.27.1 ) diff --git a/monitoring/go.sum b/monitoring/go.sum index f55237e55f0f..1f30fd225536 100644 --- a/monitoring/go.sum +++ b/monitoring/go.sum @@ -503,8 +503,8 @@ google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 h1:nPiLDJ9/wsay2NDshdJ1B24frx+butTxmaVaCxDBChY= -google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb h1:B1cc9lxfg3Zd0zoHxwyckY7YPprzkXKNWw9sxJ3/obk= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/texttospeech/apiv1/doc.go b/texttospeech/apiv1/doc.go index 7f49f375e33c..d63e13126332 100644 --- a/texttospeech/apiv1/doc.go +++ b/texttospeech/apiv1/doc.go @@ -85,7 +85,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20211116" +const versionClient = "20211117" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/texttospeech/apiv1/text_to_speech_client.go b/texttospeech/apiv1/text_to_speech_client.go index 3123a9c7f3d4..2b4dbe938af9 100644 --- a/texttospeech/apiv1/text_to_speech_client.go +++ b/texttospeech/apiv1/text_to_speech_client.go @@ -216,7 +216,7 @@ func (c *gRPCClient) Close() error { func (c *gRPCClient) ListVoices(ctx context.Context, req *texttospeechpb.ListVoicesRequest, opts ...gax.CallOption) (*texttospeechpb.ListVoicesResponse, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { - cctx, cancel := context.WithTimeout(ctx, 600000*time.Millisecond) + cctx, cancel := context.WithTimeout(ctx, 300000*time.Millisecond) defer cancel() ctx = cctx } @@ -236,7 +236,7 @@ func (c *gRPCClient) ListVoices(ctx context.Context, req *texttospeechpb.ListVoi func (c *gRPCClient) SynthesizeSpeech(ctx context.Context, req *texttospeechpb.SynthesizeSpeechRequest, opts ...gax.CallOption) (*texttospeechpb.SynthesizeSpeechResponse, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { - cctx, cancel := context.WithTimeout(ctx, 600000*time.Millisecond) + cctx, cancel := context.WithTimeout(ctx, 300000*time.Millisecond) defer cancel() ctx = cctx } diff --git a/texttospeech/go.mod b/texttospeech/go.mod index cb57871d67f5..aa804628c3eb 100644 --- a/texttospeech/go.mod +++ b/texttospeech/go.mod @@ -7,6 +7,6 @@ require ( github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.60.0 - google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 + google.golang.org/genproto v0.0.0-20211117155847-120650a500bb google.golang.org/grpc v1.40.0 ) diff --git a/texttospeech/go.sum b/texttospeech/go.sum index f55237e55f0f..1f30fd225536 100644 --- a/texttospeech/go.sum +++ b/texttospeech/go.sum @@ -503,8 +503,8 @@ google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 h1:nPiLDJ9/wsay2NDshdJ1B24frx+butTxmaVaCxDBChY= -google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb h1:B1cc9lxfg3Zd0zoHxwyckY7YPprzkXKNWw9sxJ3/obk= +google.golang.org/genproto v0.0.0-20211117155847-120650a500bb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=