From f560b1ed0263956ef84fbf2fbf34bdc66dbc0a88 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 1 Feb 2022 09:22:46 -0800 Subject: [PATCH] chore(all): auto-regenerate gapics (#5407) * chore(all): auto-regenerate gapics 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/748 Changes: feat!(storage/internal): Change RewriteObjectRequest to specify bucket name, object name and KMS key outside of Object resource PiperOrigin-RevId: 424391425 Source-Link: https://github.com/googleapis/googleapis/commit/8479561453671f4dbfaa61514f23de5fdfd7f737 feat(recommender): Recommendation Priority / Insight Severity feat: Recommendation xor_group_id feat: Recommendation security projection Incorporate above new features, as well as update .bazel files. PiperOrigin-RevId: 424391246 Source-Link: https://github.com/googleapis/googleapis/commit/2060f890ca90f300577c51c214fa3bfc7112cad4 fix(container): reverting unintentional breaking change: GetOpenIdConfigRequest, GetOpenIdConfigResponse PiperOrigin-RevId: 424115592 Source-Link: https://github.com/googleapis/googleapis/commit/853e8a29cecd0816c8b003b299032c3a5168ef8b feat(recommender): Recommendation Priority / Insight Severity feat: Recommendation xor_group_id feat: Recommendation security projection feat: Configurable recommenders Incorporate above new features, as well as update .bazel files. PiperOrigin-RevId: 424106499 Source-Link: https://github.com/googleapis/googleapis/commit/a29dc81b4d57bd3f458535fad908c5394adaebce fix!(container): revert bad publishing This RPC is not supposed to be published at this moment because Java generator cannot support this path template. It will be re-published when the generator is fixed. PiperOrigin-RevId: 423936238 Source-Link: https://github.com/googleapis/googleapis/commit/b0a8651081680a9d907f90c1b8a6c4c318550e51 feat(spanner/admin/database): add database dialect PiperOrigin-RevId: 423930262 Source-Link: https://github.com/googleapis/googleapis/commit/b0c104f738e90a90aeda4f31482918a02eb7cb2b build(container): library of v1 container onboarded to SAM PiperOrigin-RevId: 423866705 Source-Link: https://github.com/googleapis/googleapis/commit/cb31351c89468abc1fd60e3d5ce8da96b1156228 chore(video/livestream): Prepare video/livestream v1 BUILD.bazel for release PiperOrigin-RevId: 423821123 Source-Link: https://github.com/googleapis/googleapis/commit/eb694b25ee7c122c43af6abb676939f20132af9d feat(video/livestream): added LogConfig feature for users to define configurations of platform logs feat: added silver languages namespace annotations docs: updated comments with more examples PiperOrigin-RevId: 423383860 Source-Link: https://github.com/googleapis/googleapis/commit/12b3038231720d31f16bbcc1c984f7e097f72985 feat!(bigquery/migration): Consolidate task details into service API and add orchestration result details BREAKING CHANGE: This change relocates some task proto definitions and updates message fields, necessitating updates to imports. PiperOrigin-RevId: 423360094 Source-Link: https://github.com/googleapis/googleapis/commit/c9a482e23c28251459afdc4b3b63cbf2fb1f163b feat(dialogflow): added conversation process config, ImportDocument and SuggestSmartReplies API PiperOrigin-RevId: 423223164 Source-Link: https://github.com/googleapis/googleapis/commit/356f0c0439e04fc6b82215e75883bcc9f4263a04 chore(dialogflow/cx): fixed typos and reformatted files PiperOrigin-RevId: 423148154 Source-Link: https://github.com/googleapis/googleapis/commit/fb700a662e98c84510ce1d5c1859b9990280eaaf feat(artifactregistry): add APIs for importing and uploading Apt and Yum artifacts feat: add version policy support for Maven repositories feat: add order_by support for listing versions fix!: mark a few resource name fields as required PiperOrigin-RevId: 423145765 Source-Link: https://github.com/googleapis/googleapis/commit/76ff1e5421363c9482c72feccd11762e2d9999ea chore(dialogflow/cx): fix typos and reformatted files PiperOrigin-RevId: 423128259 Source-Link: https://github.com/googleapis/googleapis/commit/86c3294e9f4d76e9c374c46155549dede698e230 feat(channel): Change description for enum default value PiperOrigin-RevId: 422930709 Source-Link: https://github.com/googleapis/googleapis/commit/9fe00a1330817b5ce00919bf2861cd8a9cea1a00 chore(debugger): Remove unnecessary (and breaking) dependencies in C# Cloud Debugger GAPIC generation PiperOrigin-RevId: 422868372 Source-Link: https://github.com/googleapis/googleapis/commit/fe4fb6f730097a9c76cd5dd02761b4c23de82d0c feat(bigquery/datatransfer): add owner email to TransferConfig message feat: allow customer to enroll a datasource programmatically docs: improvements to various message and field descriptions PiperOrigin-RevId: 422838555 Source-Link: https://github.com/googleapis/googleapis/commit/63be77c6bf681c6a9da4c1a6940116e799ae6ec2 chore(eventarc/publishing): Prepare eventarcpublishing v1 BUILD.bazel for release PiperOrigin-RevId: 422819387 Source-Link: https://github.com/googleapis/googleapis/commit/5499aca066bd03149ff0d97fc2696b5ef4dbbf30 docs(contactcenterinsights): Clarify comments of ConversationView enum PiperOrigin-RevId: 422809895 Source-Link: https://github.com/googleapis/googleapis/commit/13a3c9e5f4133f4bd906e12dad00b93dc2c28ae8 --- accesscontextmanager/apiv1/doc.go | 4 +- .../apiv1beta2/artifact_registry_client.go | 302 ++++++++++++++++-- .../artifact_registry_client_example_test.go | 90 ++++++ artifactregistry/apiv1beta2/doc.go | 27 +- .../apiv1beta2/gapic_metadata.json | 20 ++ artifactregistry/go.mod | 2 +- artifactregistry/go.sum | 4 +- .../apiv1/data_transfer_client.go | 53 +-- .../data_transfer_client_example_test.go | 18 ++ bigquery/datatransfer/apiv1/doc.go | 2 +- .../datatransfer/apiv1/gapic_metadata.json | 5 + bigquery/go.mod | 2 +- bigquery/go.sum | 4 +- bigquery/migration/apiv2alpha/doc.go | 6 +- channel/apiv1/doc.go | 2 +- channel/go.mod | 2 +- channel/go.sum | 4 +- contactcenterinsights/apiv1/doc.go | 4 +- contactcenterinsights/go.mod | 2 +- contactcenterinsights/go.sum | 4 +- container/apiv1/cluster_manager_client.go | 4 +- container/apiv1/doc.go | 2 +- container/go.mod | 2 +- container/go.sum | 4 +- debugger/apiv2/doc.go | 2 +- deploy/apiv1/doc.go | 4 +- dialogflow/apiv2/doc.go | 2 +- dialogflow/apiv2/documents_client.go | 141 +++++++- .../apiv2/documents_client_example_test.go | 25 ++ dialogflow/apiv2/gapic_metadata.json | 10 + dialogflow/apiv2/participants_client.go | 54 +++- .../apiv2/participants_client_example_test.go | 20 ++ dialogflow/cx/apiv3/doc.go | 2 +- dialogflow/cx/apiv3beta1/doc.go | 2 +- dialogflow/go.mod | 2 +- dialogflow/go.sum | 4 +- eventarc/go.mod | 2 +- eventarc/go.sum | 4 +- eventarc/publishing/apiv1/doc.go | 2 +- filestore/apiv1/doc.go | 4 +- go.mod | 2 +- go.sum | 4 +- .../Client/GetProjectSettings/main.go | 48 +++ .../Client/ImportAptArtifacts/main.go | 53 +++ .../Client/ImportYumArtifacts/main.go | 53 +++ .../Client/UpdateProjectSettings/main.go | 48 +++ .../apiv1/Client/EnrollDataSources/main.go | 46 +++ .../DocumentsClient/ImportDocuments/main.go | 53 +++ .../SuggestSmartReplies/main.go | 48 +++ internal/generated/snippets/go.mod | 2 +- internal/generated/snippets/go.sum | 3 +- .../Client/GetInsightTypeConfig/main.go | 48 +++ .../Client/GetRecommenderConfig/main.go | 48 +++ .../Client/UpdateInsightTypeConfig/main.go | 48 +++ .../Client/UpdateRecommenderConfig/main.go | 48 +++ internal/godocfx/go.sum | 4 +- networkconnectivity/apiv1/doc.go | 4 +- orchestration/airflow/service/apiv1/doc.go | 4 +- recommender/apiv1/doc.go | 2 +- recommender/apiv1/recommender_client.go | 8 +- recommender/apiv1beta1/doc.go | 2 +- recommender/apiv1beta1/gapic_metadata.json | 20 ++ recommender/apiv1beta1/recommender_client.go | 108 ++++++- .../recommender_client_example_test.go | 80 +++++ recommender/go.mod | 2 +- recommender/go.sum | 4 +- .../database/apiv1/database_admin_client.go | 28 +- spanner/admin/database/apiv1/doc.go | 2 +- spanner/go.mod | 2 +- spanner/go.sum | 4 +- storage/go.mod | 2 +- storage/go.sum | 4 +- storage/internal/apiv2/doc.go | 2 +- video/go.mod | 3 +- video/go.sum | 4 +- video/livestream/apiv1/doc.go | 2 +- 76 files changed, 1531 insertions(+), 161 deletions(-) create mode 100644 internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetProjectSettings/main.go create mode 100644 internal/generated/snippets/artifactregistry/apiv1beta2/Client/ImportAptArtifacts/main.go create mode 100644 internal/generated/snippets/artifactregistry/apiv1beta2/Client/ImportYumArtifacts/main.go create mode 100644 internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateProjectSettings/main.go create mode 100644 internal/generated/snippets/bigquery/datatransfer/apiv1/Client/EnrollDataSources/main.go create mode 100644 internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ImportDocuments/main.go create mode 100644 internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestSmartReplies/main.go create mode 100644 internal/generated/snippets/recommender/apiv1beta1/Client/GetInsightTypeConfig/main.go create mode 100644 internal/generated/snippets/recommender/apiv1beta1/Client/GetRecommenderConfig/main.go create mode 100644 internal/generated/snippets/recommender/apiv1beta1/Client/UpdateInsightTypeConfig/main.go create mode 100644 internal/generated/snippets/recommender/apiv1beta1/Client/UpdateRecommenderConfig/main.go diff --git a/accesscontextmanager/apiv1/doc.go b/accesscontextmanager/apiv1/doc.go index db6182d0a30..198d89c01db 100644 --- a/accesscontextmanager/apiv1/doc.go +++ b/accesscontextmanager/apiv1/doc.go @@ -20,8 +20,6 @@ // An API for setting attribute based access control to requests to GCP // services. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. -// // Example usage // // To get started with this package, create a client. @@ -93,7 +91,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/artifactregistry/apiv1beta2/artifact_registry_client.go b/artifactregistry/apiv1beta2/artifact_registry_client.go index 047a6c26e97..eaa1cb61410 100644 --- a/artifactregistry/apiv1beta2/artifact_registry_client.go +++ b/artifactregistry/apiv1beta2/artifact_registry_client.go @@ -43,27 +43,31 @@ var newClientHook clientHook // CallOptions contains the retry settings for each method of Client. type CallOptions struct { - ListRepositories []gax.CallOption - GetRepository []gax.CallOption - CreateRepository []gax.CallOption - UpdateRepository []gax.CallOption - DeleteRepository []gax.CallOption - ListPackages []gax.CallOption - GetPackage []gax.CallOption - DeletePackage []gax.CallOption - ListVersions []gax.CallOption - GetVersion []gax.CallOption - DeleteVersion []gax.CallOption - ListFiles []gax.CallOption - GetFile []gax.CallOption - ListTags []gax.CallOption - GetTag []gax.CallOption - CreateTag []gax.CallOption - UpdateTag []gax.CallOption - DeleteTag []gax.CallOption - SetIamPolicy []gax.CallOption - GetIamPolicy []gax.CallOption - TestIamPermissions []gax.CallOption + ImportAptArtifacts []gax.CallOption + ImportYumArtifacts []gax.CallOption + ListRepositories []gax.CallOption + GetRepository []gax.CallOption + CreateRepository []gax.CallOption + UpdateRepository []gax.CallOption + DeleteRepository []gax.CallOption + ListPackages []gax.CallOption + GetPackage []gax.CallOption + DeletePackage []gax.CallOption + ListVersions []gax.CallOption + GetVersion []gax.CallOption + DeleteVersion []gax.CallOption + ListFiles []gax.CallOption + GetFile []gax.CallOption + ListTags []gax.CallOption + GetTag []gax.CallOption + CreateTag []gax.CallOption + UpdateTag []gax.CallOption + DeleteTag []gax.CallOption + SetIamPolicy []gax.CallOption + GetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption + GetProjectSettings []gax.CallOption + UpdateProjectSettings []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -80,6 +84,8 @@ func defaultGRPCClientOptions() []option.ClientOption { func defaultCallOptions() *CallOptions { return &CallOptions{ + ImportAptArtifacts: []gax.CallOption{}, + ImportYumArtifacts: []gax.CallOption{}, ListRepositories: []gax.CallOption{ gax.WithRetry(func() gax.Retryer { return gax.OnCodes([]codes.Code{ @@ -250,7 +256,9 @@ func defaultCallOptions() *CallOptions { }) }), }, - TestIamPermissions: []gax.CallOption{}, + TestIamPermissions: []gax.CallOption{}, + GetProjectSettings: []gax.CallOption{}, + UpdateProjectSettings: []gax.CallOption{}, } } @@ -259,6 +267,10 @@ type internalClient interface { Close() error setGoogleClientInfo(...string) Connection() *grpc.ClientConn + ImportAptArtifacts(context.Context, *artifactregistrypb.ImportAptArtifactsRequest, ...gax.CallOption) (*ImportAptArtifactsOperation, error) + ImportAptArtifactsOperation(name string) *ImportAptArtifactsOperation + ImportYumArtifacts(context.Context, *artifactregistrypb.ImportYumArtifactsRequest, ...gax.CallOption) (*ImportYumArtifactsOperation, error) + ImportYumArtifactsOperation(name string) *ImportYumArtifactsOperation ListRepositories(context.Context, *artifactregistrypb.ListRepositoriesRequest, ...gax.CallOption) *RepositoryIterator GetRepository(context.Context, *artifactregistrypb.GetRepositoryRequest, ...gax.CallOption) (*artifactregistrypb.Repository, error) CreateRepository(context.Context, *artifactregistrypb.CreateRepositoryRequest, ...gax.CallOption) (*CreateRepositoryOperation, error) @@ -284,6 +296,8 @@ type internalClient interface { SetIamPolicy(context.Context, *iampb.SetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) GetIamPolicy(context.Context, *iampb.GetIamPolicyRequest, ...gax.CallOption) (*iampb.Policy, error) TestIamPermissions(context.Context, *iampb.TestIamPermissionsRequest, ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) + GetProjectSettings(context.Context, *artifactregistrypb.GetProjectSettingsRequest, ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) + UpdateProjectSettings(context.Context, *artifactregistrypb.UpdateProjectSettingsRequest, ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) } // Client is a client for interacting with Artifact Registry API. @@ -341,6 +355,34 @@ func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } +// ImportAptArtifacts imports Apt artifacts. The returned Operation will complete once the +// resources are imported. Package, Version, and File resources are created +// based on the imported artifacts. Imported artifacts that conflict with +// existing resources are ignored. +func (c *Client) ImportAptArtifacts(ctx context.Context, req *artifactregistrypb.ImportAptArtifactsRequest, opts ...gax.CallOption) (*ImportAptArtifactsOperation, error) { + return c.internalClient.ImportAptArtifacts(ctx, req, opts...) +} + +// ImportAptArtifactsOperation returns a new ImportAptArtifactsOperation from a given name. +// The name must be that of a previously created ImportAptArtifactsOperation, possibly from a different process. +func (c *Client) ImportAptArtifactsOperation(name string) *ImportAptArtifactsOperation { + return c.internalClient.ImportAptArtifactsOperation(name) +} + +// ImportYumArtifacts imports Yum (RPM) artifacts. The returned Operation will complete once the +// resources are imported. Package, Version, and File resources are created +// based on the imported artifacts. Imported artifacts that conflict with +// existing resources are ignored. +func (c *Client) ImportYumArtifacts(ctx context.Context, req *artifactregistrypb.ImportYumArtifactsRequest, opts ...gax.CallOption) (*ImportYumArtifactsOperation, error) { + return c.internalClient.ImportYumArtifacts(ctx, req, opts...) +} + +// ImportYumArtifactsOperation returns a new ImportYumArtifactsOperation from a given name. +// The name must be that of a previously created ImportYumArtifactsOperation, possibly from a different process. +func (c *Client) ImportYumArtifactsOperation(name string) *ImportYumArtifactsOperation { + return c.internalClient.ImportYumArtifactsOperation(name) +} + // ListRepositories lists repositories. func (c *Client) ListRepositories(ctx context.Context, req *artifactregistrypb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator { return c.internalClient.ListRepositories(ctx, req, opts...) @@ -475,6 +517,16 @@ func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermi return c.internalClient.TestIamPermissions(ctx, req, opts...) } +// GetProjectSettings retrieves the Settings for the Project. +func (c *Client) GetProjectSettings(ctx context.Context, req *artifactregistrypb.GetProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) { + return c.internalClient.GetProjectSettings(ctx, req, opts...) +} + +// UpdateProjectSettings updates the Settings for the Project. +func (c *Client) UpdateProjectSettings(ctx context.Context, req *artifactregistrypb.UpdateProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) { + return c.internalClient.UpdateProjectSettings(ctx, req, opts...) +} + // gRPCClient is a client for interacting with Artifact Registry API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -587,6 +639,42 @@ func (c *gRPCClient) Close() error { return c.connPool.Close() } +func (c *gRPCClient) ImportAptArtifacts(ctx context.Context, req *artifactregistrypb.ImportAptArtifactsRequest, opts ...gax.CallOption) (*ImportAptArtifactsOperation, 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).ImportAptArtifacts[0:len((*c.CallOptions).ImportAptArtifacts):len((*c.CallOptions).ImportAptArtifacts)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ImportAptArtifacts(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ImportAptArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + +func (c *gRPCClient) ImportYumArtifacts(ctx context.Context, req *artifactregistrypb.ImportYumArtifactsRequest, opts ...gax.CallOption) (*ImportYumArtifactsOperation, 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).ImportYumArtifacts[0:len((*c.CallOptions).ImportYumArtifacts):len((*c.CallOptions).ImportYumArtifacts)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.ImportYumArtifacts(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ImportYumArtifactsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + func (c *gRPCClient) ListRepositories(ctx context.Context, req *artifactregistrypb.ListRepositoriesRequest, opts ...gax.CallOption) *RepositoryIterator { md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent()))) ctx = insertMetadata(ctx, c.xGoogMetadata, md) @@ -1142,6 +1230,38 @@ func (c *gRPCClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamP return resp, nil } +func (c *gRPCClient) GetProjectSettings(ctx context.Context, req *artifactregistrypb.GetProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, 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).GetProjectSettings[0:len((*c.CallOptions).GetProjectSettings):len((*c.CallOptions).GetProjectSettings)], opts...) + var resp *artifactregistrypb.ProjectSettings + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetProjectSettings(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) UpdateProjectSettings(ctx context.Context, req *artifactregistrypb.UpdateProjectSettingsRequest, opts ...gax.CallOption) (*artifactregistrypb.ProjectSettings, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "project_settings.name", url.QueryEscape(req.GetProjectSettings().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateProjectSettings[0:len((*c.CallOptions).UpdateProjectSettings):len((*c.CallOptions).UpdateProjectSettings)], opts...) + var resp *artifactregistrypb.ProjectSettings + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateProjectSettings(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // CreateRepositoryOperation manages a long-running operation from CreateRepository. type CreateRepositoryOperation struct { lro *longrunning.Operation @@ -1385,6 +1505,144 @@ func (op *DeleteVersionOperation) Name() string { return op.lro.Name() } +// ImportAptArtifactsOperation manages a long-running operation from ImportAptArtifacts. +type ImportAptArtifactsOperation struct { + lro *longrunning.Operation +} + +// ImportAptArtifactsOperation returns a new ImportAptArtifactsOperation from a given name. +// The name must be that of a previously created ImportAptArtifactsOperation, possibly from a different process. +func (c *gRPCClient) ImportAptArtifactsOperation(name string) *ImportAptArtifactsOperation { + return &ImportAptArtifactsOperation{ + 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 *ImportAptArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportAptArtifactsResponse, error) { + var resp artifactregistrypb.ImportAptArtifactsResponse + 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 *ImportAptArtifactsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportAptArtifactsResponse, error) { + var resp artifactregistrypb.ImportAptArtifactsResponse + 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 *ImportAptArtifactsOperation) Metadata() (*artifactregistrypb.ImportAptArtifactsMetadata, error) { + var meta artifactregistrypb.ImportAptArtifactsMetadata + 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 *ImportAptArtifactsOperation) 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 *ImportAptArtifactsOperation) Name() string { + return op.lro.Name() +} + +// ImportYumArtifactsOperation manages a long-running operation from ImportYumArtifacts. +type ImportYumArtifactsOperation struct { + lro *longrunning.Operation +} + +// ImportYumArtifactsOperation returns a new ImportYumArtifactsOperation from a given name. +// The name must be that of a previously created ImportYumArtifactsOperation, possibly from a different process. +func (c *gRPCClient) ImportYumArtifactsOperation(name string) *ImportYumArtifactsOperation { + return &ImportYumArtifactsOperation{ + 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 *ImportYumArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportYumArtifactsResponse, error) { + var resp artifactregistrypb.ImportYumArtifactsResponse + 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 *ImportYumArtifactsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportYumArtifactsResponse, error) { + var resp artifactregistrypb.ImportYumArtifactsResponse + 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 *ImportYumArtifactsOperation) Metadata() (*artifactregistrypb.ImportYumArtifactsMetadata, error) { + var meta artifactregistrypb.ImportYumArtifactsMetadata + 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 *ImportYumArtifactsOperation) 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 *ImportYumArtifactsOperation) Name() string { + return op.lro.Name() +} + // FileIterator manages a stream of *artifactregistrypb.File. type FileIterator struct { items []*artifactregistrypb.File diff --git a/artifactregistry/apiv1beta2/artifact_registry_client_example_test.go b/artifactregistry/apiv1beta2/artifact_registry_client_example_test.go index f6bc88cb2f2..eb78ea6d39a 100644 --- a/artifactregistry/apiv1beta2/artifact_registry_client_example_test.go +++ b/artifactregistry/apiv1beta2/artifact_registry_client_example_test.go @@ -37,6 +37,56 @@ func ExampleNewClient() { _ = c } +func ExampleClient_ImportAptArtifacts() { + ctx := context.Background() + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ImportAptArtifactsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#ImportAptArtifactsRequest. + } + op, err := c.ImportAptArtifacts(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_ImportYumArtifacts() { + ctx := context.Background() + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ImportYumArtifactsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#ImportYumArtifactsRequest. + } + op, err := c.ImportYumArtifacts(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleClient_ListRepositories() { ctx := context.Background() c, err := artifactregistry.NewClient(ctx) @@ -498,3 +548,43 @@ func ExampleClient_TestIamPermissions() { // TODO: Use resp. _ = resp } + +func ExampleClient_GetProjectSettings() { + ctx := context.Background() + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.GetProjectSettingsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#GetProjectSettingsRequest. + } + resp, err := c.GetProjectSettings(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateProjectSettings() { + ctx := context.Background() + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.UpdateProjectSettingsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#UpdateProjectSettingsRequest. + } + resp, err := c.UpdateProjectSettings(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/artifactregistry/apiv1beta2/doc.go b/artifactregistry/apiv1beta2/doc.go index 5ff888fae05..dc4d3acf7ed 100644 --- a/artifactregistry/apiv1beta2/doc.go +++ b/artifactregistry/apiv1beta2/doc.go @@ -45,22 +45,21 @@ // } // defer c.Close() // -// req := &artifactregistrypb.ListRepositoriesRequest{ +// req := &artifactregistrypb.ImportAptArtifactsRequest{ // // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#ListRepositoriesRequest. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#ImportAptArtifactsRequest. // } -// it := c.ListRepositories(ctx, req) -// for { -// resp, err := it.Next() -// if err == iterator.Done { -// break -// } -// if err != nil { -// // TODO: Handle error. -// } -// // TODO: Use resp. -// _ = resp +// op, err := c.ImportAptArtifacts(ctx, req) +// if err != nil { +// // TODO: Handle error. +// } +// +// resp, err := op.Wait(ctx) +// if err != nil { +// // TODO: Handle error. // } +// // TODO: Use resp. +// _ = resp // // Use of Context // @@ -91,7 +90,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/artifactregistry/apiv1beta2/gapic_metadata.json b/artifactregistry/apiv1beta2/gapic_metadata.json index 8777a1d7cce..706eee7427e 100644 --- a/artifactregistry/apiv1beta2/gapic_metadata.json +++ b/artifactregistry/apiv1beta2/gapic_metadata.json @@ -55,6 +55,11 @@ "GetPackage" ] }, + "GetProjectSettings": { + "methods": [ + "GetProjectSettings" + ] + }, "GetRepository": { "methods": [ "GetRepository" @@ -70,6 +75,16 @@ "GetVersion" ] }, + "ImportAptArtifacts": { + "methods": [ + "ImportAptArtifacts" + ] + }, + "ImportYumArtifacts": { + "methods": [ + "ImportYumArtifacts" + ] + }, "ListFiles": { "methods": [ "ListFiles" @@ -105,6 +120,11 @@ "TestIamPermissions" ] }, + "UpdateProjectSettings": { + "methods": [ + "UpdateProjectSettings" + ] + }, "UpdateRepository": { "methods": [ "UpdateRepository" diff --git a/artifactregistry/go.mod b/artifactregistry/go.mod index aa3193195be..1f6c8c71fc8 100644 --- a/artifactregistry/go.mod +++ b/artifactregistry/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.100.2 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/artifactregistry/go.sum b/artifactregistry/go.sum index 284fe124169..e786e27c80d 100644 --- a/artifactregistry/go.sum +++ b/artifactregistry/go.sum @@ -506,8 +506,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/bigquery/datatransfer/apiv1/data_transfer_client.go b/bigquery/datatransfer/apiv1/data_transfer_client.go index d51c3d87ceb..5057cb6a6f2 100644 --- a/bigquery/datatransfer/apiv1/data_transfer_client.go +++ b/bigquery/datatransfer/apiv1/data_transfer_client.go @@ -53,6 +53,7 @@ type CallOptions struct { ListTransferRuns []gax.CallOption ListTransferLogs []gax.CallOption CheckValidCreds []gax.CallOption + EnrollDataSources []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -193,6 +194,7 @@ func defaultCallOptions() *CallOptions { }) }), }, + EnrollDataSources: []gax.CallOption{}, } } @@ -215,15 +217,13 @@ type internalClient interface { ListTransferRuns(context.Context, *datatransferpb.ListTransferRunsRequest, ...gax.CallOption) *TransferRunIterator ListTransferLogs(context.Context, *datatransferpb.ListTransferLogsRequest, ...gax.CallOption) *TransferMessageIterator CheckValidCreds(context.Context, *datatransferpb.CheckValidCredsRequest, ...gax.CallOption) (*datatransferpb.CheckValidCredsResponse, error) + EnrollDataSources(context.Context, *datatransferpb.EnrollDataSourcesRequest, ...gax.CallOption) error } // Client is a client for interacting with BigQuery Data Transfer API. // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. // -// The Google BigQuery Data Transfer Service API enables BigQuery users to -// configure the transfer of their data from other Google Products into -// BigQuery. This service contains methods that are end user exposed. It backs -// up the frontend. +// This API allows users to manage their data transfers into BigQuery. type Client struct { // The internal transport-dependent client. internalClient internalClient @@ -254,14 +254,12 @@ func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } -// GetDataSource retrieves a supported data source and returns its settings, -// which can be used for UI rendering. +// GetDataSource retrieves a supported data source and returns its settings. func (c *Client) GetDataSource(ctx context.Context, req *datatransferpb.GetDataSourceRequest, opts ...gax.CallOption) (*datatransferpb.DataSource, error) { return c.internalClient.GetDataSource(ctx, req, opts...) } -// ListDataSources lists supported data sources and returns their settings, -// which can be used for UI rendering. +// ListDataSources lists supported data sources and returns their settings. func (c *Client) ListDataSources(ctx context.Context, req *datatransferpb.ListDataSourcesRequest, opts ...gax.CallOption) *DataSourceIterator { return c.internalClient.ListDataSources(ctx, req, opts...) } @@ -277,8 +275,8 @@ func (c *Client) UpdateTransferConfig(ctx context.Context, req *datatransferpb.U return c.internalClient.UpdateTransferConfig(ctx, req, opts...) } -// DeleteTransferConfig deletes a data transfer configuration, -// including any associated transfer runs and logs. +// DeleteTransferConfig deletes a data transfer configuration, including any associated transfer +// runs and logs. func (c *Client) DeleteTransferConfig(ctx context.Context, req *datatransferpb.DeleteTransferConfigRequest, opts ...gax.CallOption) error { return c.internalClient.DeleteTransferConfig(ctx, req, opts...) } @@ -323,26 +321,32 @@ func (c *Client) DeleteTransferRun(ctx context.Context, req *datatransferpb.Dele return c.internalClient.DeleteTransferRun(ctx, req, opts...) } -// ListTransferRuns returns information about running and completed jobs. +// ListTransferRuns returns information about running and completed transfer runs. func (c *Client) ListTransferRuns(ctx context.Context, req *datatransferpb.ListTransferRunsRequest, opts ...gax.CallOption) *TransferRunIterator { return c.internalClient.ListTransferRuns(ctx, req, opts...) } -// ListTransferLogs returns user facing log messages for the data transfer run. +// ListTransferLogs returns log messages for the transfer run. func (c *Client) ListTransferLogs(ctx context.Context, req *datatransferpb.ListTransferLogsRequest, opts ...gax.CallOption) *TransferMessageIterator { return c.internalClient.ListTransferLogs(ctx, req, opts...) } // CheckValidCreds returns true if valid credentials exist for the given data source and // requesting user. -// Some data sources doesn’t support service account, so we need to talk to -// them on behalf of the end user. This API just checks whether we have OAuth -// token for the particular user, which is a pre-requisite before user can -// create a transfer config. func (c *Client) CheckValidCreds(ctx context.Context, req *datatransferpb.CheckValidCredsRequest, opts ...gax.CallOption) (*datatransferpb.CheckValidCredsResponse, error) { return c.internalClient.CheckValidCreds(ctx, req, opts...) } +// EnrollDataSources enroll data sources in a user project. This allows users to create transfer +// configurations for these data sources. They will also appear in the +// ListDataSources RPC and as such, will appear in the BigQuery UI +// ‘https://bigquery.cloud.google.com (at https://bigquery.cloud.google.com)’ (and the documents can be found at +// https://cloud.google.com/bigquery/bigquery-web-ui (at https://cloud.google.com/bigquery/bigquery-web-ui) and +// https://cloud.google.com/bigquery/docs/working-with-transfers (at https://cloud.google.com/bigquery/docs/working-with-transfers)). +func (c *Client) EnrollDataSources(ctx context.Context, req *datatransferpb.EnrollDataSourcesRequest, opts ...gax.CallOption) error { + return c.internalClient.EnrollDataSources(ctx, req, opts...) +} + // gRPCClient is a client for interacting with BigQuery Data Transfer API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -366,10 +370,7 @@ type gRPCClient struct { // NewClient creates a new data transfer service client based on gRPC. // The returned client must be Closed when it is done being used to clean up its underlying connections. // -// The Google BigQuery Data Transfer Service API enables BigQuery users to -// configure the transfer of their data from other Google Products into -// BigQuery. This service contains methods that are end user exposed. It backs -// up the frontend. +// This API allows users to manage their data transfers into BigQuery. func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error) { clientOpts := defaultGRPCClientOptions() if newClientHook != nil { @@ -799,6 +800,18 @@ func (c *gRPCClient) CheckValidCreds(ctx context.Context, req *datatransferpb.Ch return resp, nil } +func (c *gRPCClient) EnrollDataSources(ctx context.Context, req *datatransferpb.EnrollDataSourcesRequest, opts ...gax.CallOption) 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).EnrollDataSources[0:len((*c.CallOptions).EnrollDataSources):len((*c.CallOptions).EnrollDataSources)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.client.EnrollDataSources(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + // DataSourceIterator manages a stream of *datatransferpb.DataSource. type DataSourceIterator struct { items []*datatransferpb.DataSource diff --git a/bigquery/datatransfer/apiv1/data_transfer_client_example_test.go b/bigquery/datatransfer/apiv1/data_transfer_client_example_test.go index 79c61799a58..497887b4f76 100644 --- a/bigquery/datatransfer/apiv1/data_transfer_client_example_test.go +++ b/bigquery/datatransfer/apiv1/data_transfer_client_example_test.go @@ -335,3 +335,21 @@ func ExampleClient_CheckValidCreds() { // TODO: Use resp. _ = resp } + +func ExampleClient_EnrollDataSources() { + ctx := context.Background() + c, err := datatransfer.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &datatransferpb.EnrollDataSourcesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1#EnrollDataSourcesRequest. + } + err = c.EnrollDataSources(ctx, req) + if err != nil { + // TODO: Handle error. + } +} diff --git a/bigquery/datatransfer/apiv1/doc.go b/bigquery/datatransfer/apiv1/doc.go index 6fe713a0a6b..520232176b4 100644 --- a/bigquery/datatransfer/apiv1/doc.go +++ b/bigquery/datatransfer/apiv1/doc.go @@ -85,7 +85,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/datatransfer/apiv1/gapic_metadata.json b/bigquery/datatransfer/apiv1/gapic_metadata.json index fd8f604f9b8..9d71e9cc2e3 100644 --- a/bigquery/datatransfer/apiv1/gapic_metadata.json +++ b/bigquery/datatransfer/apiv1/gapic_metadata.json @@ -30,6 +30,11 @@ "DeleteTransferRun" ] }, + "EnrollDataSources": { + "methods": [ + "EnrollDataSources" + ] + }, "GetDataSource": { "methods": [ "GetDataSource" diff --git a/bigquery/go.mod b/bigquery/go.mod index 97b80a270f2..07923626b57 100644 --- a/bigquery/go.mod +++ b/bigquery/go.mod @@ -14,7 +14,7 @@ require ( golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/bigquery/go.sum b/bigquery/go.sum index 5de9614039e..27660b39de5 100644 --- a/bigquery/go.sum +++ b/bigquery/go.sum @@ -526,8 +526,8 @@ google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/bigquery/migration/apiv2alpha/doc.go b/bigquery/migration/apiv2alpha/doc.go index c1c363c2546..6d8a8367430 100644 --- a/bigquery/migration/apiv2alpha/doc.go +++ b/bigquery/migration/apiv2alpha/doc.go @@ -17,8 +17,8 @@ // Package migration is an auto-generated package for the // BigQuery Migration API. // -// The BigQuery migration service, exposing apis for migration jobs -// operations, and agent management. +// The migration service, exposing apis for migration jobs operations, and +// agent management. // // NOTE: This package is in alpha. It is not stable, and is likely to change. // @@ -87,7 +87,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/channel/apiv1/doc.go b/channel/apiv1/doc.go index 0e548552f98..8f8d4c08191 100644 --- a/channel/apiv1/doc.go +++ b/channel/apiv1/doc.go @@ -92,7 +92,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/channel/go.mod b/channel/go.mod index 15efd703c77..b7384faaa0b 100644 --- a/channel/go.mod +++ b/channel/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.100.2 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/channel/go.sum b/channel/go.sum index 284fe124169..e786e27c80d 100644 --- a/channel/go.sum +++ b/channel/go.sum @@ -506,8 +506,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/contactcenterinsights/apiv1/doc.go b/contactcenterinsights/apiv1/doc.go index 00c36a49364..001bf11d4b9 100644 --- a/contactcenterinsights/apiv1/doc.go +++ b/contactcenterinsights/apiv1/doc.go @@ -17,8 +17,6 @@ // Package contactcenterinsights is an auto-generated package for the // Contact Center AI Insights API. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. -// // Example usage // // To get started with this package, create a client. @@ -84,7 +82,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/contactcenterinsights/go.mod b/contactcenterinsights/go.mod index b3d4f770ca4..99908c9bbfb 100644 --- a/contactcenterinsights/go.mod +++ b/contactcenterinsights/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.100.2 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/contactcenterinsights/go.sum b/contactcenterinsights/go.sum index 284fe124169..e786e27c80d 100644 --- a/contactcenterinsights/go.sum +++ b/contactcenterinsights/go.sum @@ -506,8 +506,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/container/apiv1/cluster_manager_client.go b/container/apiv1/cluster_manager_client.go index 0d33077bfa8..1313251bf5b 100644 --- a/container/apiv1/cluster_manager_client.go +++ b/container/apiv1/cluster_manager_client.go @@ -467,7 +467,9 @@ func (c *ClusterManagerClient) CompleteIPRotation(ctx context.Context, req *cont return c.internalClient.CompleteIPRotation(ctx, req, opts...) } -// SetNodePoolSize sets the size for a specific node pool. +// SetNodePoolSize sets the size for a specific node pool. The new size will be used for all +// replicas, including future replicas created by modifying +// NodePool.locations. func (c *ClusterManagerClient) SetNodePoolSize(ctx context.Context, req *containerpb.SetNodePoolSizeRequest, opts ...gax.CallOption) (*containerpb.Operation, error) { return c.internalClient.SetNodePoolSize(ctx, req, opts...) } diff --git a/container/apiv1/doc.go b/container/apiv1/doc.go index 1ade1252763..72dee29e077 100644 --- a/container/apiv1/doc.go +++ b/container/apiv1/doc.go @@ -85,7 +85,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/container/go.mod b/container/go.mod index 74953254aaa..366312a3aca 100644 --- a/container/go.mod +++ b/container/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.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/container/go.sum b/container/go.sum index 284fe124169..e786e27c80d 100644 --- a/container/go.sum +++ b/container/go.sum @@ -506,8 +506,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/debugger/apiv2/doc.go b/debugger/apiv2/doc.go index b6fff3b401d..b470ea04fc5 100644 --- a/debugger/apiv2/doc.go +++ b/debugger/apiv2/doc.go @@ -85,7 +85,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/deploy/apiv1/doc.go b/deploy/apiv1/doc.go index c8023e8eb16..724e3e78491 100644 --- a/deploy/apiv1/doc.go +++ b/deploy/apiv1/doc.go @@ -17,8 +17,6 @@ // Package deploy is an auto-generated package for the // Google Cloud Deploy API. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. -// // Example usage // // To get started with this package, create a client. @@ -90,7 +88,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dialogflow/apiv2/doc.go b/dialogflow/apiv2/doc.go index 759a340d23f..c828fa29863 100644 --- a/dialogflow/apiv2/doc.go +++ b/dialogflow/apiv2/doc.go @@ -85,7 +85,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dialogflow/apiv2/documents_client.go b/dialogflow/apiv2/documents_client.go index c3ebfbbedca..bd50f35410a 100644 --- a/dialogflow/apiv2/documents_client.go +++ b/dialogflow/apiv2/documents_client.go @@ -42,13 +42,14 @@ var newDocumentsClientHook clientHook // DocumentsCallOptions contains the retry settings for each method of DocumentsClient. type DocumentsCallOptions struct { - ListDocuments []gax.CallOption - GetDocument []gax.CallOption - CreateDocument []gax.CallOption - DeleteDocument []gax.CallOption - UpdateDocument []gax.CallOption - ReloadDocument []gax.CallOption - ExportDocument []gax.CallOption + ListDocuments []gax.CallOption + GetDocument []gax.CallOption + CreateDocument []gax.CallOption + ImportDocuments []gax.CallOption + DeleteDocument []gax.CallOption + UpdateDocument []gax.CallOption + ReloadDocument []gax.CallOption + ExportDocument []gax.CallOption } func defaultDocumentsGRPCClientOptions() []option.ClientOption { @@ -98,6 +99,17 @@ func defaultDocumentsCallOptions() *DocumentsCallOptions { }) }), }, + ImportDocuments: []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, + }) + }), + }, DeleteDocument: []gax.CallOption{ gax.WithRetry(func() gax.Retryer { return gax.OnCodes([]codes.Code{ @@ -154,6 +166,8 @@ type internalDocumentsClient interface { GetDocument(context.Context, *dialogflowpb.GetDocumentRequest, ...gax.CallOption) (*dialogflowpb.Document, error) CreateDocument(context.Context, *dialogflowpb.CreateDocumentRequest, ...gax.CallOption) (*CreateDocumentOperation, error) CreateDocumentOperation(name string) *CreateDocumentOperation + ImportDocuments(context.Context, *dialogflowpb.ImportDocumentsRequest, ...gax.CallOption) (*ImportDocumentsOperation, error) + ImportDocumentsOperation(name string) *ImportDocumentsOperation DeleteDocument(context.Context, *dialogflowpb.DeleteDocumentRequest, ...gax.CallOption) (*DeleteDocumentOperation, error) DeleteDocumentOperation(name string) *DeleteDocumentOperation UpdateDocument(context.Context, *dialogflowpb.UpdateDocumentRequest, ...gax.CallOption) (*UpdateDocumentOperation, error) @@ -232,6 +246,27 @@ func (c *DocumentsClient) CreateDocumentOperation(name string) *CreateDocumentOp return c.internalClient.CreateDocumentOperation(name) } +// ImportDocuments creates documents by importing data from external sources. +// Dialogflow supports up to 350 documents in each request. If you try to +// import more, Dialogflow will return an error. +// +// 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: KnowledgeOperationMetadata +// +// response: ImportDocumentsResponse +func (c *DocumentsClient) ImportDocuments(ctx context.Context, req *dialogflowpb.ImportDocumentsRequest, opts ...gax.CallOption) (*ImportDocumentsOperation, error) { + return c.internalClient.ImportDocuments(ctx, req, opts...) +} + +// ImportDocumentsOperation returns a new ImportDocumentsOperation from a given name. +// The name must be that of a previously created ImportDocumentsOperation, possibly from a different process. +func (c *DocumentsClient) ImportDocumentsOperation(name string) *ImportDocumentsOperation { + return c.internalClient.ImportDocumentsOperation(name) +} + // DeleteDocument deletes the specified document. // // This method is a long-running @@ -500,6 +535,29 @@ func (c *documentsGRPCClient) CreateDocument(ctx context.Context, req *dialogflo }, nil } +func (c *documentsGRPCClient) ImportDocuments(ctx context.Context, req *dialogflowpb.ImportDocumentsRequest, opts ...gax.CallOption) (*ImportDocumentsOperation, 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", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).ImportDocuments[0:len((*c.CallOptions).ImportDocuments):len((*c.CallOptions).ImportDocuments)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.documentsClient.ImportDocuments(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return &ImportDocumentsOperation{ + lro: longrunning.InternalNewOperation(*c.LROClient, resp), + }, nil +} + func (c *documentsGRPCClient) DeleteDocument(ctx context.Context, req *dialogflowpb.DeleteDocumentRequest, opts ...gax.CallOption) (*DeleteDocumentOperation, error) { if _, ok := ctx.Deadline(); !ok && !c.disableDeadlines { cctx, cancel := context.WithTimeout(ctx, 60000*time.Millisecond) @@ -788,6 +846,75 @@ func (op *ExportDocumentOperation) Name() string { return op.lro.Name() } +// ImportDocumentsOperation manages a long-running operation from ImportDocuments. +type ImportDocumentsOperation struct { + lro *longrunning.Operation +} + +// ImportDocumentsOperation returns a new ImportDocumentsOperation from a given name. +// The name must be that of a previously created ImportDocumentsOperation, possibly from a different process. +func (c *documentsGRPCClient) ImportDocumentsOperation(name string) *ImportDocumentsOperation { + return &ImportDocumentsOperation{ + 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 *ImportDocumentsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ImportDocumentsResponse, error) { + var resp dialogflowpb.ImportDocumentsResponse + 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 *ImportDocumentsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*dialogflowpb.ImportDocumentsResponse, error) { + var resp dialogflowpb.ImportDocumentsResponse + 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 *ImportDocumentsOperation) Metadata() (*dialogflowpb.KnowledgeOperationMetadata, error) { + var meta dialogflowpb.KnowledgeOperationMetadata + 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 *ImportDocumentsOperation) 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 *ImportDocumentsOperation) Name() string { + return op.lro.Name() +} + // ReloadDocumentOperation manages a long-running operation from ReloadDocument. type ReloadDocumentOperation struct { lro *longrunning.Operation diff --git a/dialogflow/apiv2/documents_client_example_test.go b/dialogflow/apiv2/documents_client_example_test.go index 76693fd1b00..bc58a3eb51d 100644 --- a/dialogflow/apiv2/documents_client_example_test.go +++ b/dialogflow/apiv2/documents_client_example_test.go @@ -107,6 +107,31 @@ func ExampleDocumentsClient_CreateDocument() { _ = resp } +func ExampleDocumentsClient_ImportDocuments() { + ctx := context.Background() + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ImportDocumentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2#ImportDocumentsRequest. + } + op, err := c.ImportDocuments(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + func ExampleDocumentsClient_DeleteDocument() { ctx := context.Background() c, err := dialogflow.NewDocumentsClient(ctx) diff --git a/dialogflow/apiv2/gapic_metadata.json b/dialogflow/apiv2/gapic_metadata.json index 8748e856261..fe4a6899d18 100644 --- a/dialogflow/apiv2/gapic_metadata.json +++ b/dialogflow/apiv2/gapic_metadata.json @@ -210,6 +210,11 @@ "GetDocument" ] }, + "ImportDocuments": { + "methods": [ + "ImportDocuments" + ] + }, "ListDocuments": { "methods": [ "ListDocuments" @@ -459,6 +464,11 @@ "SuggestFaqAnswers" ] }, + "SuggestSmartReplies": { + "methods": [ + "SuggestSmartReplies" + ] + }, "UpdateParticipant": { "methods": [ "UpdateParticipant" diff --git a/dialogflow/apiv2/participants_client.go b/dialogflow/apiv2/participants_client.go index 7d3bad76836..97fdf62bbf2 100644 --- a/dialogflow/apiv2/participants_client.go +++ b/dialogflow/apiv2/participants_client.go @@ -39,13 +39,14 @@ var newParticipantsClientHook clientHook // ParticipantsCallOptions contains the retry settings for each method of ParticipantsClient. type ParticipantsCallOptions struct { - CreateParticipant []gax.CallOption - GetParticipant []gax.CallOption - ListParticipants []gax.CallOption - UpdateParticipant []gax.CallOption - AnalyzeContent []gax.CallOption - SuggestArticles []gax.CallOption - SuggestFaqAnswers []gax.CallOption + CreateParticipant []gax.CallOption + GetParticipant []gax.CallOption + ListParticipants []gax.CallOption + UpdateParticipant []gax.CallOption + AnalyzeContent []gax.CallOption + SuggestArticles []gax.CallOption + SuggestFaqAnswers []gax.CallOption + SuggestSmartReplies []gax.CallOption } func defaultParticipantsGRPCClientOptions() []option.ClientOption { @@ -139,6 +140,17 @@ func defaultParticipantsCallOptions() *ParticipantsCallOptions { }) }), }, + SuggestSmartReplies: []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, + }) + }), + }, } } @@ -154,6 +166,7 @@ type internalParticipantsClient interface { AnalyzeContent(context.Context, *dialogflowpb.AnalyzeContentRequest, ...gax.CallOption) (*dialogflowpb.AnalyzeContentResponse, error) SuggestArticles(context.Context, *dialogflowpb.SuggestArticlesRequest, ...gax.CallOption) (*dialogflowpb.SuggestArticlesResponse, error) SuggestFaqAnswers(context.Context, *dialogflowpb.SuggestFaqAnswersRequest, ...gax.CallOption) (*dialogflowpb.SuggestFaqAnswersResponse, error) + SuggestSmartReplies(context.Context, *dialogflowpb.SuggestSmartRepliesRequest, ...gax.CallOption) (*dialogflowpb.SuggestSmartRepliesResponse, error) } // ParticipantsClient is a client for interacting with Dialogflow API. @@ -232,6 +245,12 @@ func (c *ParticipantsClient) SuggestFaqAnswers(ctx context.Context, req *dialogf return c.internalClient.SuggestFaqAnswers(ctx, req, opts...) } +// SuggestSmartReplies gets smart replies for a participant based on specific historical +// messages. +func (c *ParticipantsClient) SuggestSmartReplies(ctx context.Context, req *dialogflowpb.SuggestSmartRepliesRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestSmartRepliesResponse, error) { + return c.internalClient.SuggestSmartReplies(ctx, req, opts...) +} + // participantsGRPCClient 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. @@ -482,6 +501,27 @@ func (c *participantsGRPCClient) SuggestFaqAnswers(ctx context.Context, req *dia return resp, nil } +func (c *participantsGRPCClient) SuggestSmartReplies(ctx context.Context, req *dialogflowpb.SuggestSmartRepliesRequest, opts ...gax.CallOption) (*dialogflowpb.SuggestSmartRepliesResponse, 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", "parent", url.QueryEscape(req.GetParent()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).SuggestSmartReplies[0:len((*c.CallOptions).SuggestSmartReplies):len((*c.CallOptions).SuggestSmartReplies)], opts...) + var resp *dialogflowpb.SuggestSmartRepliesResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.participantsClient.SuggestSmartReplies(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // ParticipantIterator manages a stream of *dialogflowpb.Participant. type ParticipantIterator struct { items []*dialogflowpb.Participant diff --git a/dialogflow/apiv2/participants_client_example_test.go b/dialogflow/apiv2/participants_client_example_test.go index 3f16e1f37ff..d5afbfe4abd 100644 --- a/dialogflow/apiv2/participants_client_example_test.go +++ b/dialogflow/apiv2/participants_client_example_test.go @@ -181,3 +181,23 @@ func ExampleParticipantsClient_SuggestFaqAnswers() { // TODO: Use resp. _ = resp } + +func ExampleParticipantsClient_SuggestSmartReplies() { + ctx := context.Background() + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.SuggestSmartRepliesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2#SuggestSmartRepliesRequest. + } + resp, err := c.SuggestSmartReplies(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/dialogflow/cx/apiv3/doc.go b/dialogflow/cx/apiv3/doc.go index ac514512fe2..440b50aad1e 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 = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dialogflow/cx/apiv3beta1/doc.go b/dialogflow/cx/apiv3beta1/doc.go index 7beb2d4ddd6..db8ff540c4b 100644 --- a/dialogflow/cx/apiv3beta1/doc.go +++ b/dialogflow/cx/apiv3beta1/doc.go @@ -93,7 +93,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dialogflow/go.mod b/dialogflow/go.mod index 82a46d2450c..4318123bd33 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.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/dialogflow/go.sum b/dialogflow/go.sum index 284fe124169..e786e27c80d 100644 --- a/dialogflow/go.sum +++ b/dialogflow/go.sum @@ -506,8 +506,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/eventarc/go.mod b/eventarc/go.mod index c2cdf241b0d..3685d39eb79 100644 --- a/eventarc/go.mod +++ b/eventarc/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.100.2 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/eventarc/go.sum b/eventarc/go.sum index 284fe124169..e786e27c80d 100644 --- a/eventarc/go.sum +++ b/eventarc/go.sum @@ -506,8 +506,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/eventarc/publishing/apiv1/doc.go b/eventarc/publishing/apiv1/doc.go index b4e7602cdc0..6e134871c4b 100644 --- a/eventarc/publishing/apiv1/doc.go +++ b/eventarc/publishing/apiv1/doc.go @@ -84,7 +84,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/filestore/apiv1/doc.go b/filestore/apiv1/doc.go index 05d8072e9f1..c25642e7656 100644 --- a/filestore/apiv1/doc.go +++ b/filestore/apiv1/doc.go @@ -20,8 +20,6 @@ // The Cloud Filestore API is used for creating and managing cloud file // servers. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. -// // Example usage // // To get started with this package, create a client. @@ -93,7 +91,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/go.mod b/go.mod index c8b6ccf6a53..5991f3fae03 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/go.sum b/go.sum index e1ca46958b5..0fb4537c2cb 100644 --- a/go.sum +++ b/go.sum @@ -509,8 +509,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/artifactregistry/apiv1beta2/Client/GetProjectSettings/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetProjectSettings/main.go new file mode 100644 index 00000000000..974c3b8bb49 --- /dev/null +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/GetProjectSettings/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] + +package main + +import ( + "context" + + artifactregistry "cloud.google.com/go/artifactregistry/apiv1beta2" + artifactregistrypb "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2" +) + +func main() { + ctx := context.Background() + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.GetProjectSettingsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#GetProjectSettingsRequest. + } + resp, err := c.GetProjectSettings(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_GetProjectSettings_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ImportAptArtifacts/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ImportAptArtifacts/main.go new file mode 100644 index 00000000000..b7c4ca190c5 --- /dev/null +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ImportAptArtifacts/main.go @@ -0,0 +1,53 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] + +package main + +import ( + "context" + + artifactregistry "cloud.google.com/go/artifactregistry/apiv1beta2" + artifactregistrypb "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2" +) + +func main() { + ctx := context.Background() + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ImportAptArtifactsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#ImportAptArtifactsRequest. + } + op, err := c.ImportAptArtifacts(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportAptArtifacts_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ImportYumArtifacts/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ImportYumArtifacts/main.go new file mode 100644 index 00000000000..f31652d0527 --- /dev/null +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/ImportYumArtifacts/main.go @@ -0,0 +1,53 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] + +package main + +import ( + "context" + + artifactregistry "cloud.google.com/go/artifactregistry/apiv1beta2" + artifactregistrypb "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2" +) + +func main() { + ctx := context.Background() + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.ImportYumArtifactsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#ImportYumArtifactsRequest. + } + op, err := c.ImportYumArtifacts(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_ImportYumArtifacts_sync] diff --git a/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateProjectSettings/main.go b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateProjectSettings/main.go new file mode 100644 index 00000000000..286b0bff26c --- /dev/null +++ b/internal/generated/snippets/artifactregistry/apiv1beta2/Client/UpdateProjectSettings/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] + +package main + +import ( + "context" + + artifactregistry "cloud.google.com/go/artifactregistry/apiv1beta2" + artifactregistrypb "google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2" +) + +func main() { + ctx := context.Background() + c, err := artifactregistry.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &artifactregistrypb.UpdateProjectSettingsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/devtools/artifactregistry/v1beta2#UpdateProjectSettingsRequest. + } + resp, err := c.UpdateProjectSettings(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END artifactregistry_v1beta2_generated_ArtifactRegistry_UpdateProjectSettings_sync] diff --git a/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/EnrollDataSources/main.go b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/EnrollDataSources/main.go new file mode 100644 index 00000000000..1a1af4a1544 --- /dev/null +++ b/internal/generated/snippets/bigquery/datatransfer/apiv1/Client/EnrollDataSources/main.go @@ -0,0 +1,46 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] + +package main + +import ( + "context" + + datatransfer "cloud.google.com/go/bigquery/datatransfer/apiv1" + datatransferpb "google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1" +) + +func main() { + ctx := context.Background() + c, err := datatransfer.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &datatransferpb.EnrollDataSourcesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/bigquery/datatransfer/v1#EnrollDataSourcesRequest. + } + err = c.EnrollDataSources(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +// [END bigquerydatatransfer_v1_generated_DataTransferService_EnrollDataSources_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ImportDocuments/main.go b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ImportDocuments/main.go new file mode 100644 index 00000000000..addf98704fc --- /dev/null +++ b/internal/generated/snippets/dialogflow/apiv2/DocumentsClient/ImportDocuments/main.go @@ -0,0 +1,53 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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_v2_generated_Documents_ImportDocuments_sync] + +package main + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" +) + +func main() { + ctx := context.Background() + c, err := dialogflow.NewDocumentsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.ImportDocumentsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2#ImportDocumentsRequest. + } + op, err := c.ImportDocuments(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v2_generated_Documents_ImportDocuments_sync] diff --git a/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestSmartReplies/main.go b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestSmartReplies/main.go new file mode 100644 index 00000000000..d190612d158 --- /dev/null +++ b/internal/generated/snippets/dialogflow/apiv2/ParticipantsClient/SuggestSmartReplies/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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_v2_generated_Participants_SuggestSmartReplies_sync] + +package main + +import ( + "context" + + dialogflow "cloud.google.com/go/dialogflow/apiv2" + dialogflowpb "google.golang.org/genproto/googleapis/cloud/dialogflow/v2" +) + +func main() { + ctx := context.Background() + c, err := dialogflow.NewParticipantsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &dialogflowpb.SuggestSmartRepliesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/dialogflow/v2#SuggestSmartRepliesRequest. + } + resp, err := c.SuggestSmartReplies(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END dialogflow_v2_generated_Participants_SuggestSmartReplies_sync] diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index 10dd5284e91..93d05d54b07 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -112,7 +112,7 @@ require ( golang.org/x/net v0.0.0-20220111093109-d55c255bac03 // indirect golang.org/x/sys v0.0.0-20220111092808-5a964db01320 // indirect google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.43.0 // indirect ) diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum index 05e95f2cc93..211a3617892 100644 --- a/internal/generated/snippets/go.sum +++ b/internal/generated/snippets/go.sum @@ -164,8 +164,9 @@ 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-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/generated/snippets/recommender/apiv1beta1/Client/GetInsightTypeConfig/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/GetInsightTypeConfig/main.go new file mode 100644 index 00000000000..2671cac90e5 --- /dev/null +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/GetInsightTypeConfig/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 recommender_v1beta1_generated_Recommender_GetInsightTypeConfig_sync] + +package main + +import ( + "context" + + recommender "cloud.google.com/go/recommender/apiv1beta1" + recommenderpb "google.golang.org/genproto/googleapis/cloud/recommender/v1beta1" +) + +func main() { + ctx := context.Background() + c, err := recommender.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &recommenderpb.GetInsightTypeConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recommender/v1beta1#GetInsightTypeConfigRequest. + } + resp, err := c.GetInsightTypeConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END recommender_v1beta1_generated_Recommender_GetInsightTypeConfig_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/GetRecommenderConfig/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/GetRecommenderConfig/main.go new file mode 100644 index 00000000000..573e68cf0af --- /dev/null +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/GetRecommenderConfig/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 recommender_v1beta1_generated_Recommender_GetRecommenderConfig_sync] + +package main + +import ( + "context" + + recommender "cloud.google.com/go/recommender/apiv1beta1" + recommenderpb "google.golang.org/genproto/googleapis/cloud/recommender/v1beta1" +) + +func main() { + ctx := context.Background() + c, err := recommender.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &recommenderpb.GetRecommenderConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recommender/v1beta1#GetRecommenderConfigRequest. + } + resp, err := c.GetRecommenderConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END recommender_v1beta1_generated_Recommender_GetRecommenderConfig_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/UpdateInsightTypeConfig/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/UpdateInsightTypeConfig/main.go new file mode 100644 index 00000000000..aafbe2b6b0b --- /dev/null +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/UpdateInsightTypeConfig/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 recommender_v1beta1_generated_Recommender_UpdateInsightTypeConfig_sync] + +package main + +import ( + "context" + + recommender "cloud.google.com/go/recommender/apiv1beta1" + recommenderpb "google.golang.org/genproto/googleapis/cloud/recommender/v1beta1" +) + +func main() { + ctx := context.Background() + c, err := recommender.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &recommenderpb.UpdateInsightTypeConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recommender/v1beta1#UpdateInsightTypeConfigRequest. + } + resp, err := c.UpdateInsightTypeConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END recommender_v1beta1_generated_Recommender_UpdateInsightTypeConfig_sync] diff --git a/internal/generated/snippets/recommender/apiv1beta1/Client/UpdateRecommenderConfig/main.go b/internal/generated/snippets/recommender/apiv1beta1/Client/UpdateRecommenderConfig/main.go new file mode 100644 index 00000000000..2a5f67fccc2 --- /dev/null +++ b/internal/generated/snippets/recommender/apiv1beta1/Client/UpdateRecommenderConfig/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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 recommender_v1beta1_generated_Recommender_UpdateRecommenderConfig_sync] + +package main + +import ( + "context" + + recommender "cloud.google.com/go/recommender/apiv1beta1" + recommenderpb "google.golang.org/genproto/googleapis/cloud/recommender/v1beta1" +) + +func main() { + ctx := context.Background() + c, err := recommender.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &recommenderpb.UpdateRecommenderConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recommender/v1beta1#UpdateRecommenderConfigRequest. + } + resp, err := c.UpdateRecommenderConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END recommender_v1beta1_generated_Recommender_UpdateRecommenderConfig_sync] diff --git a/internal/godocfx/go.sum b/internal/godocfx/go.sum index 0afa3664c0e..730ea73d9b7 100644 --- a/internal/godocfx/go.sum +++ b/internal/godocfx/go.sum @@ -188,8 +188,8 @@ google.golang.org/genproto v0.0.0-20211016002631-37fc39342514/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/networkconnectivity/apiv1/doc.go b/networkconnectivity/apiv1/doc.go index 0f5631a3902..1b81db0d7b1 100644 --- a/networkconnectivity/apiv1/doc.go +++ b/networkconnectivity/apiv1/doc.go @@ -20,8 +20,6 @@ // The Network Connectivity API provides access to Network Connectivity // Center. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. -// // Example usage // // To get started with this package, create a client. @@ -93,7 +91,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/orchestration/airflow/service/apiv1/doc.go b/orchestration/airflow/service/apiv1/doc.go index e5928a3603d..94865b09a7c 100644 --- a/orchestration/airflow/service/apiv1/doc.go +++ b/orchestration/airflow/service/apiv1/doc.go @@ -19,8 +19,6 @@ // // Manages Apache Airflow environments on Google Cloud Platform. // -// NOTE: This package is in beta. It is not stable, and may be subject to changes. -// // Example usage // // To get started with this package, create a client. @@ -91,7 +89,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/recommender/apiv1/doc.go b/recommender/apiv1/doc.go index 67854466bba..f908d70fca8 100644 --- a/recommender/apiv1/doc.go +++ b/recommender/apiv1/doc.go @@ -88,7 +88,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/recommender/apiv1/recommender_client.go b/recommender/apiv1/recommender_client.go index 4cb541e31ae..863cdc6eec4 100644 --- a/recommender/apiv1/recommender_client.go +++ b/recommender/apiv1/recommender_client.go @@ -170,8 +170,8 @@ func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } -// ListInsights lists insights for a Cloud project. Requires the recommender.*.list IAM -// permission for the specified insight type. +// ListInsights lists insights for the specified Cloud Resource. Requires the +// recommender.*.list IAM permission for the specified insight type. func (c *Client) ListInsights(ctx context.Context, req *recommenderpb.ListInsightsRequest, opts ...gax.CallOption) *InsightIterator { return c.internalClient.ListInsights(ctx, req, opts...) } @@ -192,8 +192,8 @@ func (c *Client) MarkInsightAccepted(ctx context.Context, req *recommenderpb.Mar return c.internalClient.MarkInsightAccepted(ctx, req, opts...) } -// ListRecommendations lists recommendations for a Cloud project. Requires the recommender.*.list -// IAM permission for the specified recommender. +// ListRecommendations lists recommendations for the specified Cloud Resource. Requires the +// recommender.*.list IAM permission for the specified recommender. func (c *Client) ListRecommendations(ctx context.Context, req *recommenderpb.ListRecommendationsRequest, opts ...gax.CallOption) *RecommendationIterator { return c.internalClient.ListRecommendations(ctx, req, opts...) } diff --git a/recommender/apiv1beta1/doc.go b/recommender/apiv1beta1/doc.go index e2ed5bf9043..b647c64f7c7 100644 --- a/recommender/apiv1beta1/doc.go +++ b/recommender/apiv1beta1/doc.go @@ -90,7 +90,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/recommender/apiv1beta1/gapic_metadata.json b/recommender/apiv1beta1/gapic_metadata.json index 23bf63068e4..cf5bac6c7cf 100644 --- a/recommender/apiv1beta1/gapic_metadata.json +++ b/recommender/apiv1beta1/gapic_metadata.json @@ -15,11 +15,21 @@ "GetInsight" ] }, + "GetInsightTypeConfig": { + "methods": [ + "GetInsightTypeConfig" + ] + }, "GetRecommendation": { "methods": [ "GetRecommendation" ] }, + "GetRecommenderConfig": { + "methods": [ + "GetRecommenderConfig" + ] + }, "ListInsights": { "methods": [ "ListInsights" @@ -49,6 +59,16 @@ "methods": [ "MarkRecommendationSucceeded" ] + }, + "UpdateInsightTypeConfig": { + "methods": [ + "UpdateInsightTypeConfig" + ] + }, + "UpdateRecommenderConfig": { + "methods": [ + "UpdateRecommenderConfig" + ] } } } diff --git a/recommender/apiv1beta1/recommender_client.go b/recommender/apiv1beta1/recommender_client.go index d52d28df823..4b9d9da3285 100644 --- a/recommender/apiv1beta1/recommender_client.go +++ b/recommender/apiv1beta1/recommender_client.go @@ -47,6 +47,10 @@ type CallOptions struct { MarkRecommendationClaimed []gax.CallOption MarkRecommendationSucceeded []gax.CallOption MarkRecommendationFailed []gax.CallOption + GetRecommenderConfig []gax.CallOption + UpdateRecommenderConfig []gax.CallOption + GetInsightTypeConfig []gax.CallOption + UpdateInsightTypeConfig []gax.CallOption } func defaultGRPCClientOptions() []option.ClientOption { @@ -115,6 +119,10 @@ func defaultCallOptions() *CallOptions { MarkRecommendationClaimed: []gax.CallOption{}, MarkRecommendationSucceeded: []gax.CallOption{}, MarkRecommendationFailed: []gax.CallOption{}, + GetRecommenderConfig: []gax.CallOption{}, + UpdateRecommenderConfig: []gax.CallOption{}, + GetInsightTypeConfig: []gax.CallOption{}, + UpdateInsightTypeConfig: []gax.CallOption{}, } } @@ -131,6 +139,10 @@ type internalClient interface { MarkRecommendationClaimed(context.Context, *recommenderpb.MarkRecommendationClaimedRequest, ...gax.CallOption) (*recommenderpb.Recommendation, error) MarkRecommendationSucceeded(context.Context, *recommenderpb.MarkRecommendationSucceededRequest, ...gax.CallOption) (*recommenderpb.Recommendation, error) MarkRecommendationFailed(context.Context, *recommenderpb.MarkRecommendationFailedRequest, ...gax.CallOption) (*recommenderpb.Recommendation, error) + GetRecommenderConfig(context.Context, *recommenderpb.GetRecommenderConfigRequest, ...gax.CallOption) (*recommenderpb.RecommenderConfig, error) + UpdateRecommenderConfig(context.Context, *recommenderpb.UpdateRecommenderConfigRequest, ...gax.CallOption) (*recommenderpb.RecommenderConfig, error) + GetInsightTypeConfig(context.Context, *recommenderpb.GetInsightTypeConfigRequest, ...gax.CallOption) (*recommenderpb.InsightTypeConfig, error) + UpdateInsightTypeConfig(context.Context, *recommenderpb.UpdateInsightTypeConfigRequest, ...gax.CallOption) (*recommenderpb.InsightTypeConfig, error) } // Client is a client for interacting with Recommender API. @@ -170,8 +182,8 @@ func (c *Client) Connection() *grpc.ClientConn { return c.internalClient.Connection() } -// ListInsights lists insights for a Cloud project. Requires the recommender.*.list IAM -// permission for the specified insight type. +// ListInsights lists insights for the specified Cloud Resource. Requires the +// recommender.*.list IAM permission for the specified insight type. func (c *Client) ListInsights(ctx context.Context, req *recommenderpb.ListInsightsRequest, opts ...gax.CallOption) *InsightIterator { return c.internalClient.ListInsights(ctx, req, opts...) } @@ -192,8 +204,8 @@ func (c *Client) MarkInsightAccepted(ctx context.Context, req *recommenderpb.Mar return c.internalClient.MarkInsightAccepted(ctx, req, opts...) } -// ListRecommendations lists recommendations for a Cloud project. Requires the recommender.*.list -// IAM permission for the specified recommender. +// ListRecommendations lists recommendations for the specified Cloud Resource. Requires the +// recommender.*.list IAM permission for the specified recommender. func (c *Client) ListRecommendations(ctx context.Context, req *recommenderpb.ListRecommendationsRequest, opts ...gax.CallOption) *RecommendationIterator { return c.internalClient.ListRecommendations(ctx, req, opts...) } @@ -248,6 +260,30 @@ func (c *Client) MarkRecommendationFailed(ctx context.Context, req *recommenderp return c.internalClient.MarkRecommendationFailed(ctx, req, opts...) } +// GetRecommenderConfig gets the requested Recommender Config. There is only one instance of the +// config for each Recommender. +func (c *Client) GetRecommenderConfig(ctx context.Context, req *recommenderpb.GetRecommenderConfigRequest, opts ...gax.CallOption) (*recommenderpb.RecommenderConfig, error) { + return c.internalClient.GetRecommenderConfig(ctx, req, opts...) +} + +// UpdateRecommenderConfig updates a Recommender Config. This will create a new revision of the +// config. +func (c *Client) UpdateRecommenderConfig(ctx context.Context, req *recommenderpb.UpdateRecommenderConfigRequest, opts ...gax.CallOption) (*recommenderpb.RecommenderConfig, error) { + return c.internalClient.UpdateRecommenderConfig(ctx, req, opts...) +} + +// GetInsightTypeConfig gets the requested InsightTypeConfig. There is only one instance of the +// config for each InsightType. +func (c *Client) GetInsightTypeConfig(ctx context.Context, req *recommenderpb.GetInsightTypeConfigRequest, opts ...gax.CallOption) (*recommenderpb.InsightTypeConfig, error) { + return c.internalClient.GetInsightTypeConfig(ctx, req, opts...) +} + +// UpdateInsightTypeConfig updates an InsightTypeConfig change. This will create a new revision of the +// config. +func (c *Client) UpdateInsightTypeConfig(ctx context.Context, req *recommenderpb.UpdateInsightTypeConfigRequest, opts ...gax.CallOption) (*recommenderpb.InsightTypeConfig, error) { + return c.internalClient.UpdateInsightTypeConfig(ctx, req, opts...) +} + // gRPCClient is a client for interacting with Recommender API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -545,6 +581,70 @@ func (c *gRPCClient) MarkRecommendationFailed(ctx context.Context, req *recommen return resp, nil } +func (c *gRPCClient) GetRecommenderConfig(ctx context.Context, req *recommenderpb.GetRecommenderConfigRequest, opts ...gax.CallOption) (*recommenderpb.RecommenderConfig, 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).GetRecommenderConfig[0:len((*c.CallOptions).GetRecommenderConfig):len((*c.CallOptions).GetRecommenderConfig)], opts...) + var resp *recommenderpb.RecommenderConfig + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetRecommenderConfig(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) UpdateRecommenderConfig(ctx context.Context, req *recommenderpb.UpdateRecommenderConfigRequest, opts ...gax.CallOption) (*recommenderpb.RecommenderConfig, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "recommender_config.name", url.QueryEscape(req.GetRecommenderConfig().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateRecommenderConfig[0:len((*c.CallOptions).UpdateRecommenderConfig):len((*c.CallOptions).UpdateRecommenderConfig)], opts...) + var resp *recommenderpb.RecommenderConfig + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateRecommenderConfig(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) GetInsightTypeConfig(ctx context.Context, req *recommenderpb.GetInsightTypeConfigRequest, opts ...gax.CallOption) (*recommenderpb.InsightTypeConfig, 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).GetInsightTypeConfig[0:len((*c.CallOptions).GetInsightTypeConfig):len((*c.CallOptions).GetInsightTypeConfig)], opts...) + var resp *recommenderpb.InsightTypeConfig + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.GetInsightTypeConfig(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +func (c *gRPCClient) UpdateInsightTypeConfig(ctx context.Context, req *recommenderpb.UpdateInsightTypeConfigRequest, opts ...gax.CallOption) (*recommenderpb.InsightTypeConfig, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "insight_type_config.name", url.QueryEscape(req.GetInsightTypeConfig().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append((*c.CallOptions).UpdateInsightTypeConfig[0:len((*c.CallOptions).UpdateInsightTypeConfig):len((*c.CallOptions).UpdateInsightTypeConfig)], opts...) + var resp *recommenderpb.InsightTypeConfig + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.client.UpdateInsightTypeConfig(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // InsightIterator manages a stream of *recommenderpb.Insight. type InsightIterator struct { items []*recommenderpb.Insight diff --git a/recommender/apiv1beta1/recommender_client_example_test.go b/recommender/apiv1beta1/recommender_client_example_test.go index 891c0b5f7ce..25162a80436 100644 --- a/recommender/apiv1beta1/recommender_client_example_test.go +++ b/recommender/apiv1beta1/recommender_client_example_test.go @@ -207,3 +207,83 @@ func ExampleClient_MarkRecommendationFailed() { // TODO: Use resp. _ = resp } + +func ExampleClient_GetRecommenderConfig() { + ctx := context.Background() + c, err := recommender.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &recommenderpb.GetRecommenderConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recommender/v1beta1#GetRecommenderConfigRequest. + } + resp, err := c.GetRecommenderConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateRecommenderConfig() { + ctx := context.Background() + c, err := recommender.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &recommenderpb.UpdateRecommenderConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recommender/v1beta1#UpdateRecommenderConfigRequest. + } + resp, err := c.UpdateRecommenderConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_GetInsightTypeConfig() { + ctx := context.Background() + c, err := recommender.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &recommenderpb.GetInsightTypeConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recommender/v1beta1#GetInsightTypeConfigRequest. + } + resp, err := c.GetInsightTypeConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleClient_UpdateInsightTypeConfig() { + ctx := context.Background() + c, err := recommender.NewClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &recommenderpb.UpdateInsightTypeConfigRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recommender/v1beta1#UpdateInsightTypeConfigRequest. + } + resp, err := c.UpdateInsightTypeConfig(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/recommender/go.mod b/recommender/go.mod index 21d5aa41b78..9a99e432236 100644 --- a/recommender/go.mod +++ b/recommender/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.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/recommender/go.sum b/recommender/go.sum index 284fe124169..e786e27c80d 100644 --- a/recommender/go.sum +++ b/recommender/go.sum @@ -506,8 +506,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/spanner/admin/database/apiv1/database_admin_client.go b/spanner/admin/database/apiv1/database_admin_client.go index d5cd33c9e63..0f13cf5ac34 100644 --- a/spanner/admin/database/apiv1/database_admin_client.go +++ b/spanner/admin/database/apiv1/database_admin_client.go @@ -261,10 +261,15 @@ type internalDatabaseAdminClient interface { // // Cloud Spanner Database Admin API // -// The Cloud Spanner Database Admin API can be used to create, drop, and -// list databases. It also enables updating the schema of pre-existing -// databases. It can be also used to create, delete and list backups for a -// database and to restore from an existing backup. +// The Cloud Spanner Database Admin API can be used to: +// +// create, drop, and list databases +// +// update the schema of pre-existing databases +// +// create, delete and list backups for a database +// +// restore a database from an existing backup type DatabaseAdminClient struct { // The internal transport-dependent client. internalClient internalDatabaseAdminClient @@ -348,6 +353,8 @@ func (c *DatabaseAdminClient) UpdateDatabaseDdlOperation(name string) *UpdateDat // DropDatabase drops (aka deletes) a Cloud Spanner database. // Completed backups for the database will be retained according to their // expire_time. +// Note: Cloud Spanner might continue to accept requests for a few seconds +// after the database has been deleted. func (c *DatabaseAdminClient) DropDatabase(ctx context.Context, req *databasepb.DropDatabaseRequest, opts ...gax.CallOption) error { return c.internalClient.DropDatabase(ctx, req, opts...) } @@ -523,10 +530,15 @@ type databaseAdminGRPCClient struct { // // Cloud Spanner Database Admin API // -// The Cloud Spanner Database Admin API can be used to create, drop, and -// list databases. It also enables updating the schema of pre-existing -// databases. It can be also used to create, delete and list backups for a -// database and to restore from an existing backup. +// The Cloud Spanner Database Admin API can be used to: +// +// create, drop, and list databases +// +// update the schema of pre-existing databases +// +// create, delete and list backups for a database +// +// restore a database from an existing backup func NewDatabaseAdminClient(ctx context.Context, opts ...option.ClientOption) (*DatabaseAdminClient, error) { clientOpts := defaultDatabaseAdminGRPCClientOptions() if newDatabaseAdminClientHook != nil { diff --git a/spanner/admin/database/apiv1/doc.go b/spanner/admin/database/apiv1/doc.go index 08cea020703..a6dc754fe37 100644 --- a/spanner/admin/database/apiv1/doc.go +++ b/spanner/admin/database/apiv1/doc.go @@ -88,7 +88,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/spanner/go.mod b/spanner/go.mod index d41293601be..4935be7681f 100644 --- a/spanner/go.mod +++ b/spanner/go.mod @@ -11,7 +11,7 @@ require ( go.opencensus.io v0.23.0 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/spanner/go.sum b/spanner/go.sum index 710e92b8c11..3fafa4c8945 100644 --- a/spanner/go.sum +++ b/spanner/go.sum @@ -522,8 +522,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/storage/go.mod b/storage/go.mod index 1aeb4ff298c..a5bf8ccace9 100644 --- a/storage/go.mod +++ b/storage/go.mod @@ -12,7 +12,7 @@ require ( golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/storage/go.sum b/storage/go.sum index 4da599a19be..0b018558b41 100644 --- a/storage/go.sum +++ b/storage/go.sum @@ -516,8 +516,8 @@ google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/storage/internal/apiv2/doc.go b/storage/internal/apiv2/doc.go index f5ed5c8299f..15e0c99db00 100644 --- a/storage/internal/apiv2/doc.go +++ b/storage/internal/apiv2/doc.go @@ -84,7 +84,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220114" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/video/go.mod b/video/go.mod index 41a931d9b78..f232fddf821 100644 --- a/video/go.mod +++ b/video/go.mod @@ -3,9 +3,10 @@ module cloud.google.com/go/video go 1.16 require ( + cloud.google.com/go v0.100.2 github.com/googleapis/gax-go/v2 v2.1.1 google.golang.org/api v0.65.0 - google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 + google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 google.golang.org/grpc v1.40.1 google.golang.org/protobuf v1.27.1 ) diff --git a/video/go.sum b/video/go.sum index 284fe124169..e786e27c80d 100644 --- a/video/go.sum +++ b/video/go.sum @@ -506,8 +506,8 @@ google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5 h1:zzNejm+EgrbLfDZ6lu9Uud2IVvHySPl8vQzf04laR5Q= -google.golang.org/genproto v0.0.0-20220118154757-00ab72f36ad5/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350 h1:YxHp5zqIcAShDEvRr5/0rVESVS+njYF68PSdazrNLJo= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/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/video/livestream/apiv1/doc.go b/video/livestream/apiv1/doc.go index a7567385bca..90418556deb 100644 --- a/video/livestream/apiv1/doc.go +++ b/video/livestream/apiv1/doc.go @@ -89,7 +89,7 @@ import ( type clientHookParams struct{} type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) -const versionClient = "20220125" +const versionClient = "20220126" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx)