diff --git a/aiplatform/go.mod b/aiplatform/go.mod index 17442e0dead..ed9a7d39b34 100644 --- a/aiplatform/go.mod +++ b/aiplatform/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.102.0 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.83.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/aiplatform/go.sum b/aiplatform/go.sum index 9d89b5ec51d..598c7bda95e 100644 --- a/aiplatform/go.sum +++ b/aiplatform/go.sum @@ -573,8 +573,9 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 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/compute/apiv1/gapic_metadata.json b/compute/apiv1/gapic_metadata.json index 0cb48099150..fac5f88daac 100644 --- a/compute/apiv1/gapic_metadata.json +++ b/compute/apiv1/gapic_metadata.json @@ -3561,6 +3561,11 @@ "Patch" ] }, + "SetCertificateMap": { + "methods": [ + "SetCertificateMap" + ] + }, "SetQuicOverride": { "methods": [ "SetQuicOverride" @@ -3713,6 +3718,11 @@ "SetBackendService" ] }, + "SetCertificateMap": { + "methods": [ + "SetCertificateMap" + ] + }, "SetProxyHeader": { "methods": [ "SetProxyHeader" diff --git a/compute/apiv1/instance_group_managers_client.go b/compute/apiv1/instance_group_managers_client.go index 436562a03dc..88253b8b76f 100644 --- a/compute/apiv1/instance_group_managers_client.go +++ b/compute/apiv1/instance_group_managers_client.go @@ -141,7 +141,7 @@ func (c *InstanceGroupManagersClient) ApplyUpdatesToInstances(ctx context.Contex return c.internalClient.ApplyUpdatesToInstances(ctx, req, opts...) } -// CreateInstances creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. +// CreateInstances creates instances with per-instance configurations in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. func (c *InstanceGroupManagersClient) CreateInstances(ctx context.Context, req *computepb.CreateInstancesInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.CreateInstances(ctx, req, opts...) } @@ -156,7 +156,7 @@ func (c *InstanceGroupManagersClient) DeleteInstances(ctx context.Context, req * return c.internalClient.DeleteInstances(ctx, req, opts...) } -// DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group. +// DeletePerInstanceConfigs deletes selected per-instance configurations for the managed instance group. func (c *InstanceGroupManagersClient) DeletePerInstanceConfigs(ctx context.Context, req *computepb.DeletePerInstanceConfigsInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.DeletePerInstanceConfigs(ctx, req, opts...) } @@ -186,7 +186,7 @@ func (c *InstanceGroupManagersClient) ListManagedInstances(ctx context.Context, return c.internalClient.ListManagedInstances(ctx, req, opts...) } -// ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported. +// ListPerInstanceConfigs lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported. func (c *InstanceGroupManagersClient) ListPerInstanceConfigs(ctx context.Context, req *computepb.ListPerInstanceConfigsInstanceGroupManagersRequest, opts ...gax.CallOption) *PerInstanceConfigIterator { return c.internalClient.ListPerInstanceConfigs(ctx, req, opts...) } @@ -196,7 +196,7 @@ func (c *InstanceGroupManagersClient) Patch(ctx context.Context, req *computepb. return c.internalClient.Patch(ctx, req, opts...) } -// PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. +// PatchPerInstanceConfigs inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. func (c *InstanceGroupManagersClient) PatchPerInstanceConfigs(ctx context.Context, req *computepb.PatchPerInstanceConfigsInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.PatchPerInstanceConfigs(ctx, req, opts...) } @@ -221,7 +221,7 @@ func (c *InstanceGroupManagersClient) SetTargetPools(ctx context.Context, req *c return c.internalClient.SetTargetPools(ctx, req, opts...) } -// UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. +// UpdatePerInstanceConfigs inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. func (c *InstanceGroupManagersClient) UpdatePerInstanceConfigs(ctx context.Context, req *computepb.UpdatePerInstanceConfigsInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.UpdatePerInstanceConfigs(ctx, req, opts...) } @@ -553,7 +553,7 @@ func (c *instanceGroupManagersRESTClient) ApplyUpdatesToInstances(ctx context.Co return op, nil } -// CreateInstances creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. +// CreateInstances creates instances with per-instance configurations in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. func (c *instanceGroupManagersRESTClient) CreateInstances(ctx context.Context, req *computepb.CreateInstancesInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetInstanceGroupManagersCreateInstancesRequestResource() @@ -768,7 +768,7 @@ func (c *instanceGroupManagersRESTClient) DeleteInstances(ctx context.Context, r return op, nil } -// DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group. +// DeletePerInstanceConfigs deletes selected per-instance configurations for the managed instance group. func (c *instanceGroupManagersRESTClient) DeletePerInstanceConfigs(ctx context.Context, req *computepb.DeletePerInstanceConfigsInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetInstanceGroupManagersDeletePerInstanceConfigsReqResource() @@ -1249,7 +1249,7 @@ func (c *instanceGroupManagersRESTClient) ListManagedInstances(ctx context.Conte return it } -// ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported. +// ListPerInstanceConfigs lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported. func (c *instanceGroupManagersRESTClient) ListPerInstanceConfigs(ctx context.Context, req *computepb.ListPerInstanceConfigsInstanceGroupManagersRequest, opts ...gax.CallOption) *PerInstanceConfigIterator { it := &PerInstanceConfigIterator{} req = proto.Clone(req).(*computepb.ListPerInstanceConfigsInstanceGroupManagersRequest) @@ -1419,7 +1419,7 @@ func (c *instanceGroupManagersRESTClient) Patch(ctx context.Context, req *comput return op, nil } -// PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. +// PatchPerInstanceConfigs inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. func (c *instanceGroupManagersRESTClient) PatchPerInstanceConfigs(ctx context.Context, req *computepb.PatchPerInstanceConfigsInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetInstanceGroupManagersPatchPerInstanceConfigsReqResource() @@ -1783,7 +1783,7 @@ func (c *instanceGroupManagersRESTClient) SetTargetPools(ctx context.Context, re return op, nil } -// UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. +// UpdatePerInstanceConfigs inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. func (c *instanceGroupManagersRESTClient) UpdatePerInstanceConfigs(ctx context.Context, req *computepb.UpdatePerInstanceConfigsInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetInstanceGroupManagersUpdatePerInstanceConfigsReqResource() diff --git a/compute/apiv1/instance_groups_client.go b/compute/apiv1/instance_groups_client.go index add6dcd1647..105947eb1c0 100644 --- a/compute/apiv1/instance_groups_client.go +++ b/compute/apiv1/instance_groups_client.go @@ -134,7 +134,7 @@ func (c *InstanceGroupsClient) List(ctx context.Context, req *computepb.ListInst return c.internalClient.List(ctx, req, opts...) } -// ListInstances lists the instances in the specified instance group. The orderBy query parameter is not supported. +// ListInstances lists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use eq (equal) or ne (not equal) operators. func (c *InstanceGroupsClient) ListInstances(ctx context.Context, req *computepb.ListInstancesInstanceGroupsRequest, opts ...gax.CallOption) *InstanceWithNamedPortsIterator { return c.internalClient.ListInstances(ctx, req, opts...) } @@ -698,7 +698,7 @@ func (c *instanceGroupsRESTClient) List(ctx context.Context, req *computepb.List return it } -// ListInstances lists the instances in the specified instance group. The orderBy query parameter is not supported. +// ListInstances lists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use eq (equal) or ne (not equal) operators. func (c *instanceGroupsRESTClient) ListInstances(ctx context.Context, req *computepb.ListInstancesInstanceGroupsRequest, opts ...gax.CallOption) *InstanceWithNamedPortsIterator { it := &InstanceWithNamedPortsIterator{} req = proto.Clone(req).(*computepb.ListInstancesInstanceGroupsRequest) diff --git a/compute/apiv1/instances_client.go b/compute/apiv1/instances_client.go index 5025c33f269..87d39b3141c 100644 --- a/compute/apiv1/instances_client.go +++ b/compute/apiv1/instances_client.go @@ -326,7 +326,7 @@ func (c *InstancesClient) SetMinCpuPlatform(ctx context.Context, req *computepb. return c.internalClient.SetMinCpuPlatform(ctx, req, opts...) } -// SetScheduling sets an instance’s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM availability policies. +// SetScheduling sets an instance’s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy. func (c *InstancesClient) SetScheduling(ctx context.Context, req *computepb.SetSchedulingInstanceRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.SetScheduling(ctx, req, opts...) } @@ -2587,7 +2587,7 @@ func (c *instancesRESTClient) SetMinCpuPlatform(ctx context.Context, req *comput return op, nil } -// SetScheduling sets an instance’s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM availability policies. +// SetScheduling sets an instance’s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy. func (c *instancesRESTClient) SetScheduling(ctx context.Context, req *computepb.SetSchedulingInstanceRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetSchedulingResource() diff --git a/compute/apiv1/region_instance_group_managers_client.go b/compute/apiv1/region_instance_group_managers_client.go index 9ef2e95b26f..8f8592f3830 100644 --- a/compute/apiv1/region_instance_group_managers_client.go +++ b/compute/apiv1/region_instance_group_managers_client.go @@ -133,7 +133,7 @@ func (c *RegionInstanceGroupManagersClient) ApplyUpdatesToInstances(ctx context. return c.internalClient.ApplyUpdatesToInstances(ctx, req, opts...) } -// CreateInstances creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. +// CreateInstances creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. func (c *RegionInstanceGroupManagersClient) CreateInstances(ctx context.Context, req *computepb.CreateInstancesRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.CreateInstances(ctx, req, opts...) } @@ -148,7 +148,7 @@ func (c *RegionInstanceGroupManagersClient) DeleteInstances(ctx context.Context, return c.internalClient.DeleteInstances(ctx, req, opts...) } -// DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group. +// DeletePerInstanceConfigs deletes selected per-instance configurations for the managed instance group. func (c *RegionInstanceGroupManagersClient) DeletePerInstanceConfigs(ctx context.Context, req *computepb.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.DeletePerInstanceConfigs(ctx, req, opts...) } @@ -178,7 +178,7 @@ func (c *RegionInstanceGroupManagersClient) ListManagedInstances(ctx context.Con return c.internalClient.ListManagedInstances(ctx, req, opts...) } -// ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported. +// ListPerInstanceConfigs lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported. func (c *RegionInstanceGroupManagersClient) ListPerInstanceConfigs(ctx context.Context, req *computepb.ListPerInstanceConfigsRegionInstanceGroupManagersRequest, opts ...gax.CallOption) *PerInstanceConfigIterator { return c.internalClient.ListPerInstanceConfigs(ctx, req, opts...) } @@ -188,7 +188,7 @@ func (c *RegionInstanceGroupManagersClient) Patch(ctx context.Context, req *comp return c.internalClient.Patch(ctx, req, opts...) } -// PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. +// PatchPerInstanceConfigs inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. func (c *RegionInstanceGroupManagersClient) PatchPerInstanceConfigs(ctx context.Context, req *computepb.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.PatchPerInstanceConfigs(ctx, req, opts...) } @@ -213,7 +213,7 @@ func (c *RegionInstanceGroupManagersClient) SetTargetPools(ctx context.Context, return c.internalClient.SetTargetPools(ctx, req, opts...) } -// UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. +// UpdatePerInstanceConfigs inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. func (c *RegionInstanceGroupManagersClient) UpdatePerInstanceConfigs(ctx context.Context, req *computepb.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.UpdatePerInstanceConfigs(ctx, req, opts...) } @@ -439,7 +439,7 @@ func (c *regionInstanceGroupManagersRESTClient) ApplyUpdatesToInstances(ctx cont return op, nil } -// CreateInstances creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. +// CreateInstances creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method. func (c *regionInstanceGroupManagersRESTClient) CreateInstances(ctx context.Context, req *computepb.CreateInstancesRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetRegionInstanceGroupManagersCreateInstancesRequestResource() @@ -654,7 +654,7 @@ func (c *regionInstanceGroupManagersRESTClient) DeleteInstances(ctx context.Cont return op, nil } -// DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group. +// DeletePerInstanceConfigs deletes selected per-instance configurations for the managed instance group. func (c *regionInstanceGroupManagersRESTClient) DeletePerInstanceConfigs(ctx context.Context, req *computepb.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetRegionInstanceGroupManagerDeleteInstanceConfigReqResource() @@ -1135,7 +1135,7 @@ func (c *regionInstanceGroupManagersRESTClient) ListManagedInstances(ctx context return it } -// ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported. +// ListPerInstanceConfigs lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported. func (c *regionInstanceGroupManagersRESTClient) ListPerInstanceConfigs(ctx context.Context, req *computepb.ListPerInstanceConfigsRegionInstanceGroupManagersRequest, opts ...gax.CallOption) *PerInstanceConfigIterator { it := &PerInstanceConfigIterator{} req = proto.Clone(req).(*computepb.ListPerInstanceConfigsRegionInstanceGroupManagersRequest) @@ -1305,7 +1305,7 @@ func (c *regionInstanceGroupManagersRESTClient) Patch(ctx context.Context, req * return op, nil } -// PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. +// PatchPerInstanceConfigs inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. func (c *regionInstanceGroupManagersRESTClient) PatchPerInstanceConfigs(ctx context.Context, req *computepb.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetRegionInstanceGroupManagerPatchInstanceConfigReqResource() @@ -1669,7 +1669,7 @@ func (c *regionInstanceGroupManagersRESTClient) SetTargetPools(ctx context.Conte return op, nil } -// UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. +// UpdatePerInstanceConfigs inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch. func (c *regionInstanceGroupManagersRESTClient) UpdatePerInstanceConfigs(ctx context.Context, req *computepb.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} body := req.GetRegionInstanceGroupManagerUpdateInstanceConfigReqResource() diff --git a/compute/apiv1/security_policies_client.go b/compute/apiv1/security_policies_client.go index 36a1bee9e57..3d5e998952c 100644 --- a/compute/apiv1/security_policies_client.go +++ b/compute/apiv1/security_policies_client.go @@ -258,6 +258,13 @@ func (c *securityPoliciesRESTClient) AddRule(ctx context.Context, req *computepb } baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/securityPolicies/%v/addRule", req.GetProject(), req.GetSecurityPolicy()) + params := url.Values{} + if req != nil && req.ValidateOnly != nil { + params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) + } + + baseUrl.RawQuery = params.Encode() + // Build HTTP headers from client and context metadata. md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "security_policy", url.QueryEscape(req.GetSecurityPolicy()))) @@ -611,6 +618,9 @@ func (c *securityPoliciesRESTClient) Insert(ctx context.Context, req *computepb. if req != nil && req.RequestId != nil { params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) } + if req != nil && req.ValidateOnly != nil { + params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) + } baseUrl.RawQuery = params.Encode() @@ -924,6 +934,9 @@ func (c *securityPoliciesRESTClient) PatchRule(ctx context.Context, req *compute if req != nil && req.Priority != nil { params.Add("priority", fmt.Sprintf("%v", req.GetPriority())) } + if req != nil && req.ValidateOnly != nil { + params.Add("validateOnly", fmt.Sprintf("%v", req.GetValidateOnly())) + } baseUrl.RawQuery = params.Encode() diff --git a/compute/apiv1/target_https_proxies_client.go b/compute/apiv1/target_https_proxies_client.go index 625dcabb18b..c9401861643 100644 --- a/compute/apiv1/target_https_proxies_client.go +++ b/compute/apiv1/target_https_proxies_client.go @@ -49,6 +49,7 @@ type TargetHttpsProxiesCallOptions struct { Insert []gax.CallOption List []gax.CallOption Patch []gax.CallOption + SetCertificateMap []gax.CallOption SetQuicOverride []gax.CallOption SetSslCertificates []gax.CallOption SetSslPolicy []gax.CallOption @@ -66,6 +67,7 @@ type internalTargetHttpsProxiesClient interface { Insert(context.Context, *computepb.InsertTargetHttpsProxyRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListTargetHttpsProxiesRequest, ...gax.CallOption) *TargetHttpsProxyIterator Patch(context.Context, *computepb.PatchTargetHttpsProxyRequest, ...gax.CallOption) (*Operation, error) + SetCertificateMap(context.Context, *computepb.SetCertificateMapTargetHttpsProxyRequest, ...gax.CallOption) (*Operation, error) SetQuicOverride(context.Context, *computepb.SetQuicOverrideTargetHttpsProxyRequest, ...gax.CallOption) (*Operation, error) SetSslCertificates(context.Context, *computepb.SetSslCertificatesTargetHttpsProxyRequest, ...gax.CallOption) (*Operation, error) SetSslPolicy(context.Context, *computepb.SetSslPolicyTargetHttpsProxyRequest, ...gax.CallOption) (*Operation, error) @@ -136,6 +138,11 @@ func (c *TargetHttpsProxiesClient) Patch(ctx context.Context, req *computepb.Pat return c.internalClient.Patch(ctx, req, opts...) } +// SetCertificateMap changes the Certificate Map for TargetHttpsProxy. +func (c *TargetHttpsProxiesClient) SetCertificateMap(ctx context.Context, req *computepb.SetCertificateMapTargetHttpsProxyRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.SetCertificateMap(ctx, req, opts...) +} + // SetQuicOverride sets the QUIC override policy for TargetHttpsProxy. func (c *TargetHttpsProxiesClient) SetQuicOverride(ctx context.Context, req *computepb.SetQuicOverrideTargetHttpsProxyRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.SetQuicOverride(ctx, req, opts...) @@ -702,6 +709,79 @@ func (c *targetHttpsProxiesRESTClient) Patch(ctx context.Context, req *computepb return op, nil } +// SetCertificateMap changes the Certificate Map for TargetHttpsProxy. +func (c *targetHttpsProxiesRESTClient) SetCertificateMap(ctx context.Context, req *computepb.SetCertificateMapTargetHttpsProxyRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetTargetHttpsProxiesSetCertificateMapRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/targetHttpsProxies/%v/setCertificateMap", req.GetProject(), req.GetTargetHttpsProxy()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "target_https_proxy", url.QueryEscape(req.GetTargetHttpsProxy()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + &globalOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + }, + } + return op, nil +} + // SetQuicOverride sets the QUIC override policy for TargetHttpsProxy. func (c *targetHttpsProxiesRESTClient) SetQuicOverride(ctx context.Context, req *computepb.SetQuicOverrideTargetHttpsProxyRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} diff --git a/compute/apiv1/target_https_proxies_client_example_test.go b/compute/apiv1/target_https_proxies_client_example_test.go index 1a8b012453e..308366b6f6f 100644 --- a/compute/apiv1/target_https_proxies_client_example_test.go +++ b/compute/apiv1/target_https_proxies_client_example_test.go @@ -177,6 +177,29 @@ func ExampleTargetHttpsProxiesClient_Patch() { } } +func ExampleTargetHttpsProxiesClient_SetCertificateMap() { + ctx := context.Background() + c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetCertificateMapTargetHttpsProxyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetCertificateMapTargetHttpsProxyRequest. + } + op, err := c.SetCertificateMap(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + func ExampleTargetHttpsProxiesClient_SetQuicOverride() { ctx := context.Background() c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) diff --git a/compute/apiv1/target_ssl_proxies_client.go b/compute/apiv1/target_ssl_proxies_client.go index 44d24b07a05..037c80a8f11 100644 --- a/compute/apiv1/target_ssl_proxies_client.go +++ b/compute/apiv1/target_ssl_proxies_client.go @@ -47,6 +47,7 @@ type TargetSslProxiesCallOptions struct { Insert []gax.CallOption List []gax.CallOption SetBackendService []gax.CallOption + SetCertificateMap []gax.CallOption SetProxyHeader []gax.CallOption SetSslCertificates []gax.CallOption SetSslPolicy []gax.CallOption @@ -62,6 +63,7 @@ type internalTargetSslProxiesClient interface { Insert(context.Context, *computepb.InsertTargetSslProxyRequest, ...gax.CallOption) (*Operation, error) List(context.Context, *computepb.ListTargetSslProxiesRequest, ...gax.CallOption) *TargetSslProxyIterator SetBackendService(context.Context, *computepb.SetBackendServiceTargetSslProxyRequest, ...gax.CallOption) (*Operation, error) + SetCertificateMap(context.Context, *computepb.SetCertificateMapTargetSslProxyRequest, ...gax.CallOption) (*Operation, error) SetProxyHeader(context.Context, *computepb.SetProxyHeaderTargetSslProxyRequest, ...gax.CallOption) (*Operation, error) SetSslCertificates(context.Context, *computepb.SetSslCertificatesTargetSslProxyRequest, ...gax.CallOption) (*Operation, error) SetSslPolicy(context.Context, *computepb.SetSslPolicyTargetSslProxyRequest, ...gax.CallOption) (*Operation, error) @@ -126,6 +128,11 @@ func (c *TargetSslProxiesClient) SetBackendService(ctx context.Context, req *com return c.internalClient.SetBackendService(ctx, req, opts...) } +// SetCertificateMap changes the Certificate Map for TargetSslProxy. +func (c *TargetSslProxiesClient) SetCertificateMap(ctx context.Context, req *computepb.SetCertificateMapTargetSslProxyRequest, opts ...gax.CallOption) (*Operation, error) { + return c.internalClient.SetCertificateMap(ctx, req, opts...) +} + // SetProxyHeader changes the ProxyHeaderType for TargetSslProxy. func (c *TargetSslProxiesClient) SetProxyHeader(ctx context.Context, req *computepb.SetProxyHeaderTargetSslProxyRequest, opts ...gax.CallOption) (*Operation, error) { return c.internalClient.SetProxyHeader(ctx, req, opts...) @@ -581,6 +588,79 @@ func (c *targetSslProxiesRESTClient) SetBackendService(ctx context.Context, req return op, nil } +// SetCertificateMap changes the Certificate Map for TargetSslProxy. +func (c *targetSslProxiesRESTClient) SetCertificateMap(ctx context.Context, req *computepb.SetCertificateMapTargetSslProxyRequest, opts ...gax.CallOption) (*Operation, error) { + m := protojson.MarshalOptions{AllowPartial: true} + body := req.GetTargetSslProxiesSetCertificateMapRequestResource() + jsonReq, err := m.Marshal(body) + if err != nil { + return nil, err + } + + baseUrl, err := url.Parse(c.endpoint) + if err != nil { + return nil, err + } + baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/global/targetSslProxies/%v/setCertificateMap", req.GetProject(), req.GetTargetSslProxy()) + + params := url.Values{} + if req != nil && req.RequestId != nil { + params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId())) + } + + baseUrl.RawQuery = params.Encode() + + // Build HTTP headers from client and context metadata. + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "target_ssl_proxy", url.QueryEscape(req.GetTargetSslProxy()))) + + headers := buildHeaders(ctx, c.xGoogMetadata, md, metadata.Pairs("Content-Type", "application/json")) + unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} + resp := &computepb.Operation{} + e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + if settings.Path != "" { + baseUrl.Path = settings.Path + } + httpReq, err := http.NewRequest("POST", baseUrl.String(), bytes.NewReader(jsonReq)) + if err != nil { + return err + } + httpReq = httpReq.WithContext(ctx) + httpReq.Header = headers + + httpRsp, err := c.httpClient.Do(httpReq) + if err != nil { + return err + } + defer httpRsp.Body.Close() + + if err = googleapi.CheckResponse(httpRsp); err != nil { + return err + } + + buf, err := ioutil.ReadAll(httpRsp.Body) + if err != nil { + return err + } + + if err := unm.Unmarshal(buf, resp); err != nil { + return maybeUnknownEnum(err) + } + + return nil + }, opts...) + if e != nil { + return nil, e + } + op := &Operation{ + &globalOperationsHandle{ + c: c.operationClient, + proto: resp, + project: req.GetProject(), + }, + } + return op, nil +} + // SetProxyHeader changes the ProxyHeaderType for TargetSslProxy. func (c *targetSslProxiesRESTClient) SetProxyHeader(ctx context.Context, req *computepb.SetProxyHeaderTargetSslProxyRequest, opts ...gax.CallOption) (*Operation, error) { m := protojson.MarshalOptions{AllowPartial: true} diff --git a/compute/apiv1/target_ssl_proxies_client_example_test.go b/compute/apiv1/target_ssl_proxies_client_example_test.go index 44d9a31658c..fde6bcad9b8 100644 --- a/compute/apiv1/target_ssl_proxies_client_example_test.go +++ b/compute/apiv1/target_ssl_proxies_client_example_test.go @@ -151,6 +151,29 @@ func ExampleTargetSslProxiesClient_SetBackendService() { } } +func ExampleTargetSslProxiesClient_SetCertificateMap() { + ctx := context.Background() + c, err := compute.NewTargetSslProxiesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetCertificateMapTargetSslProxyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetCertificateMapTargetSslProxyRequest. + } + op, err := c.SetCertificateMap(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + func ExampleTargetSslProxiesClient_SetProxyHeader() { ctx := context.Background() c, err := compute.NewTargetSslProxiesRESTClient(ctx) diff --git a/compute/go.mod b/compute/go.mod index ac0a7485b4e..686e9df378c 100644 --- a/compute/go.mod +++ b/compute/go.mod @@ -7,7 +7,7 @@ require ( github.com/google/go-cmp v0.5.8 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.83.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/compute/go.sum b/compute/go.sum index 9708f27bb25..9309566f647 100644 --- a/compute/go.sum +++ b/compute/go.sum @@ -572,8 +572,9 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 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/go.mod b/contactcenterinsights/go.mod index f6fe0f1cee5..3e008d4792a 100644 --- a/contactcenterinsights/go.mod +++ b/contactcenterinsights/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.102.0 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.83.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/contactcenterinsights/go.sum b/contactcenterinsights/go.sum index 9d89b5ec51d..598c7bda95e 100644 --- a/contactcenterinsights/go.sum +++ b/contactcenterinsights/go.sum @@ -573,8 +573,9 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 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/functions/go.mod b/functions/go.mod index 5d57b6c61a4..8d6126501ef 100644 --- a/functions/go.mod +++ b/functions/go.mod @@ -7,7 +7,7 @@ require ( github.com/google/go-cmp v0.5.8 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.83.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/functions/go.sum b/functions/go.sum index 9d89b5ec51d..598c7bda95e 100644 --- a/functions/go.sum +++ b/functions/go.sum @@ -573,8 +573,9 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 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/gkehub/go.mod b/gkehub/go.mod index 4768f38a219..d0bb441b8d5 100644 --- a/gkehub/go.mod +++ b/gkehub/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.102.0 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.83.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/gkehub/go.sum b/gkehub/go.sum index 9d89b5ec51d..598c7bda95e 100644 --- a/gkehub/go.sum +++ b/gkehub/go.sum @@ -573,8 +573,9 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= diff --git a/go.mod b/go.mod index bf842b50928..5608355f1c4 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f google.golang.org/api v0.83.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/go.sum b/go.sum index 716bf76f5a3..0ec01290a5f 100644 --- a/go.sum +++ b/go.sum @@ -578,8 +578,9 @@ google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 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/compute/apiv1/TargetHttpsProxiesClient/SetCertificateMap/main.go b/internal/generated/snippets/compute/apiv1/TargetHttpsProxiesClient/SetCertificateMap/main.go new file mode 100644 index 00000000000..376f7872fa4 --- /dev/null +++ b/internal/generated/snippets/compute/apiv1/TargetHttpsProxiesClient/SetCertificateMap/main.go @@ -0,0 +1,51 @@ +// 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 compute_v1_generated_TargetHttpsProxies_SetCertificateMap_sync] + +package main + +import ( + "context" + + compute "cloud.google.com/go/compute/apiv1" + computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" +) + +func main() { + ctx := context.Background() + c, err := compute.NewTargetHttpsProxiesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetCertificateMapTargetHttpsProxyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetCertificateMapTargetHttpsProxyRequest. + } + op, err := c.SetCertificateMap(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END compute_v1_generated_TargetHttpsProxies_SetCertificateMap_sync] diff --git a/internal/generated/snippets/compute/apiv1/TargetSslProxiesClient/SetCertificateMap/main.go b/internal/generated/snippets/compute/apiv1/TargetSslProxiesClient/SetCertificateMap/main.go new file mode 100644 index 00000000000..d41b47025dc --- /dev/null +++ b/internal/generated/snippets/compute/apiv1/TargetSslProxiesClient/SetCertificateMap/main.go @@ -0,0 +1,51 @@ +// 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 compute_v1_generated_TargetSslProxies_SetCertificateMap_sync] + +package main + +import ( + "context" + + compute "cloud.google.com/go/compute/apiv1" + computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" +) + +func main() { + ctx := context.Background() + c, err := compute.NewTargetSslProxiesRESTClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &computepb.SetCertificateMapTargetSslProxyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetCertificateMapTargetSslProxyRequest. + } + op, err := c.SetCertificateMap(ctx, req) + if err != nil { + // TODO: Handle error. + } + + err = op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } +} + +// [END compute_v1_generated_TargetSslProxies_SetCertificateMap_sync] diff --git a/internal/generated/snippets/compute/apiv1/snippet_metadata.google.cloud.compute.v1.json b/internal/generated/snippets/compute/apiv1/snippet_metadata.google.cloud.compute.v1.json index 24529ad7b47..2ce8236b50e 100644 --- a/internal/generated/snippets/compute/apiv1/snippet_metadata.google.cloud.compute.v1.json +++ b/internal/generated/snippets/compute/apiv1/snippet_metadata.google.cloud.compute.v1.json @@ -6592,7 +6592,7 @@ { "regionTag": "compute_v1_generated_InstanceGroupManagers_CreateInstances_sync", "title": "compute CreateInstances Sample", - "description": "CreateInstances creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", + "description": "CreateInstances creates instances with per-instance configurations in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", "file": "InstanceGroupManagersClient/CreateInstances/main.go", "language": "GO", "clientMethod": { @@ -6730,7 +6730,7 @@ { "regionTag": "compute_v1_generated_InstanceGroupManagers_DeletePerInstanceConfigs_sync", "title": "compute DeletePerInstanceConfigs Sample", - "description": "DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group.", + "description": "DeletePerInstanceConfigs deletes selected per-instance configurations for the managed instance group.", "file": "InstanceGroupManagersClient/DeletePerInstanceConfigs/main.go", "language": "GO", "clientMethod": { @@ -7006,7 +7006,7 @@ { "regionTag": "compute_v1_generated_InstanceGroupManagers_ListPerInstanceConfigs_sync", "title": "compute ListPerInstanceConfigs Sample", - "description": "ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.", + "description": "ListPerInstanceConfigs lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.", "file": "InstanceGroupManagersClient/ListPerInstanceConfigs/main.go", "language": "GO", "clientMethod": { @@ -7098,7 +7098,7 @@ { "regionTag": "compute_v1_generated_InstanceGroupManagers_PatchPerInstanceConfigs_sync", "title": "compute PatchPerInstanceConfigs Sample", - "description": "PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http: //perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.", + "description": "PatchPerInstanceConfigs inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name (at http: //perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.", "file": "InstanceGroupManagersClient/PatchPerInstanceConfigs/main.go", "language": "GO", "clientMethod": { @@ -7328,7 +7328,7 @@ { "regionTag": "compute_v1_generated_InstanceGroupManagers_UpdatePerInstanceConfigs_sync", "title": "compute UpdatePerInstanceConfigs Sample", - "description": "UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http: //perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.", + "description": "UpdatePerInstanceConfigs inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name (at http: //perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.", "file": "InstanceGroupManagersClient/UpdatePerInstanceConfigs/main.go", "language": "GO", "clientMethod": { @@ -7650,7 +7650,7 @@ { "regionTag": "compute_v1_generated_InstanceGroups_ListInstances_sync", "title": "compute ListInstances Sample", - "description": "ListInstances lists the instances in the specified instance group. The orderBy query parameter is not supported.", + "description": "ListInstances lists the instances in the specified instance group. The orderBy query parameter is not supported. The filter query parameter is supported, but only for expressions that use eq (equal) or ne (not equal) operators.", "file": "InstanceGroupsClient/ListInstances/main.go", "language": "GO", "clientMethod": { @@ -9490,7 +9490,7 @@ { "regionTag": "compute_v1_generated_Instances_SetScheduling_sync", "title": "compute SetScheduling Sample", - "description": "SetScheduling sets an instance’s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM availability policies.", + "description": "SetScheduling sets an instance’s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance policy.", "file": "InstancesClient/SetScheduling/main.go", "language": "GO", "clientMethod": { @@ -18184,7 +18184,7 @@ { "regionTag": "compute_v1_generated_RegionInstanceGroupManagers_CreateInstances_sync", "title": "compute CreateInstances Sample", - "description": "CreateInstances creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", + "description": "CreateInstances creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.", "file": "RegionInstanceGroupManagersClient/CreateInstances/main.go", "language": "GO", "clientMethod": { @@ -18322,7 +18322,7 @@ { "regionTag": "compute_v1_generated_RegionInstanceGroupManagers_DeletePerInstanceConfigs_sync", "title": "compute DeletePerInstanceConfigs Sample", - "description": "DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group.", + "description": "DeletePerInstanceConfigs deletes selected per-instance configurations for the managed instance group.", "file": "RegionInstanceGroupManagersClient/DeletePerInstanceConfigs/main.go", "language": "GO", "clientMethod": { @@ -18598,7 +18598,7 @@ { "regionTag": "compute_v1_generated_RegionInstanceGroupManagers_ListPerInstanceConfigs_sync", "title": "compute ListPerInstanceConfigs Sample", - "description": "ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.", + "description": "ListPerInstanceConfigs lists all of the per-instance configurations defined for the managed instance group. The orderBy query parameter is not supported.", "file": "RegionInstanceGroupManagersClient/ListPerInstanceConfigs/main.go", "language": "GO", "clientMethod": { @@ -18690,7 +18690,7 @@ { "regionTag": "compute_v1_generated_RegionInstanceGroupManagers_PatchPerInstanceConfigs_sync", "title": "compute PatchPerInstanceConfigs Sample", - "description": "PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http: //perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.", + "description": "PatchPerInstanceConfigs inserts or patches per-instance configurations for the managed instance group. perInstanceConfig.name (at http: //perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.", "file": "RegionInstanceGroupManagersClient/PatchPerInstanceConfigs/main.go", "language": "GO", "clientMethod": { @@ -18920,7 +18920,7 @@ { "regionTag": "compute_v1_generated_RegionInstanceGroupManagers_UpdatePerInstanceConfigs_sync", "title": "compute UpdatePerInstanceConfigs Sample", - "description": "UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http: //perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.", + "description": "UpdatePerInstanceConfigs inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name (at http: //perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.", "file": "RegionInstanceGroupManagersClient/UpdatePerInstanceConfigs/main.go", "language": "GO", "clientMethod": { @@ -26553,6 +26553,52 @@ } ] }, + { + "regionTag": "compute_v1_generated_TargetHttpsProxies_SetCertificateMap_sync", + "title": "compute SetCertificateMap Sample", + "description": "SetCertificateMap changes the Certificate Map for TargetHttpsProxy.", + "file": "TargetHttpsProxiesClient/SetCertificateMap/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetCertificateMap", + "fullName": "google.cloud.compute.v1.TargetHttpsProxiesClient.SetCertificateMap", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "computepb.SetCertificateMapTargetHttpsProxyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "Operation", + "client": { + "shortName": "TargetHttpsProxiesClient", + "fullName": "google.cloud.compute.v1.TargetHttpsProxiesClient" + }, + "method": { + "shortName": "SetCertificateMap", + "fullName": "google.cloud.compute.v1.TargetHttpsProxies.SetCertificateMap", + "service": { + "shortName": "TargetHttpsProxies", + "fullName": "google.cloud.compute.v1.TargetHttpsProxies" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, { "regionTag": "compute_v1_generated_TargetHttpsProxies_SetQuicOverride_sync", "title": "compute SetQuicOverride Sample", @@ -27703,6 +27749,52 @@ } ] }, + { + "regionTag": "compute_v1_generated_TargetSslProxies_SetCertificateMap_sync", + "title": "compute SetCertificateMap Sample", + "description": "SetCertificateMap changes the Certificate Map for TargetSslProxy.", + "file": "TargetSslProxiesClient/SetCertificateMap/main.go", + "language": "GO", + "clientMethod": { + "shortName": "SetCertificateMap", + "fullName": "google.cloud.compute.v1.TargetSslProxiesClient.SetCertificateMap", + "parameters": [ + { + "type": "context.Context", + "name": "ctx" + }, + { + "type": "computepb.SetCertificateMapTargetSslProxyRequest", + "name": "req" + }, + { + "type": "...gax.CallOption", + "name": "opts" + } + ], + "resultType": "Operation", + "client": { + "shortName": "TargetSslProxiesClient", + "fullName": "google.cloud.compute.v1.TargetSslProxiesClient" + }, + "method": { + "shortName": "SetCertificateMap", + "fullName": "google.cloud.compute.v1.TargetSslProxies.SetCertificateMap", + "service": { + "shortName": "TargetSslProxies", + "fullName": "google.cloud.compute.v1.TargetSslProxies" + } + } + }, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 18, + "end": 50, + "type": "FULL" + } + ] + }, { "regionTag": "compute_v1_generated_TargetSslProxies_SetProxyHeader_sync", "title": "compute SetProxyHeader Sample", diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index f9c421ea72a..ca3b0b765c0 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -115,8 +115,8 @@ require ( cloud.google.com/go/websecurityscanner v1.0.0 cloud.google.com/go/workflows v1.1.0 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - google.golang.org/api v0.82.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/api v0.83.0 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac ) replace cloud.google.com/go/storagetransfer => ../../../storagetransfer diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum index de408c03ec3..7292e08f612 100644 --- a/internal/generated/snippets/go.sum +++ b/internal/generated/snippets/go.sum @@ -114,8 +114,8 @@ golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -123,15 +123,15 @@ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 h1:zwrSfklXn0gxyLRX/aR+q6cgHbV/ItVyzbPlbA+dkAw= golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb h1:8tDJ3aechhddbdPAxpycgXHJRMLpk/Ab+aa4OgdN5/g= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -163,7 +163,7 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -179,13 +179,14 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= @@ -206,11 +207,9 @@ google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2I google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= -google.golang.org/genproto v0.0.0-20220531173845-685668d2de03/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= -google.golang.org/genproto v0.0.0-20220601144221-27df5f98adab/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/internal/godocfx/go.sum b/internal/godocfx/go.sum index 6872d738b26..657094eaeab 100644 --- a/internal/godocfx/go.sum +++ b/internal/godocfx/go.sum @@ -258,8 +258,9 @@ google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 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/shell/go.mod b/shell/go.mod index 5a62435774f..092df63b4be 100644 --- a/shell/go.mod +++ b/shell/go.mod @@ -6,6 +6,6 @@ require ( cloud.google.com/go v0.102.0 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.83.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac google.golang.org/grpc v1.47.0 ) diff --git a/shell/go.sum b/shell/go.sum index 9d89b5ec51d..598c7bda95e 100644 --- a/shell/go.sum +++ b/shell/go.sum @@ -573,8 +573,9 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 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/go.mod b/spanner/go.mod index 00ade195ceb..62835f1561d 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-20220609144429-65e65417b02f google.golang.org/api v0.83.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/spanner/go.sum b/spanner/go.sum index 3d794851022..3641453f3a4 100644 --- a/spanner/go.sum +++ b/spanner/go.sum @@ -589,8 +589,9 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 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/talent/apiv4beta1/company_client.go b/talent/apiv4beta1/company_client.go index 10e77d79641..50591480feb 100644 --- a/talent/apiv4beta1/company_client.go +++ b/talent/apiv4beta1/company_client.go @@ -29,6 +29,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -44,6 +45,7 @@ type CompanyCallOptions struct { UpdateCompany []gax.CallOption DeleteCompany []gax.CallOption ListCompanies []gax.CallOption + GetOperation []gax.CallOption } func defaultCompanyGRPCClientOptions() []option.ClientOption { @@ -98,6 +100,7 @@ func defaultCompanyCallOptions() *CompanyCallOptions { }) }), }, + GetOperation: []gax.CallOption{}, } } @@ -111,6 +114,7 @@ type internalCompanyClient interface { UpdateCompany(context.Context, *talentpb.UpdateCompanyRequest, ...gax.CallOption) (*talentpb.Company, error) DeleteCompany(context.Context, *talentpb.DeleteCompanyRequest, ...gax.CallOption) error ListCompanies(context.Context, *talentpb.ListCompaniesRequest, ...gax.CallOption) *CompanyIterator + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) } // CompanyClient is a client for interacting with Cloud Talent Solution API. @@ -173,6 +177,11 @@ func (c *CompanyClient) ListCompanies(ctx context.Context, req *talentpb.ListCom return c.internalClient.ListCompanies(ctx, req, opts...) } +// GetOperation is a utility method from google.longrunning.Operations. +func (c *CompanyClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + // companyGRPCClient is a client for interacting with Cloud Talent Solution API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -189,6 +198,8 @@ type companyGRPCClient struct { // The gRPC API client. companyClient talentpb.CompanyServiceClient + operationsClient longrunningpb.OperationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -223,6 +234,7 @@ func NewCompanyClient(ctx context.Context, opts ...option.ClientOption) (*Compan disableDeadlines: disableDeadlines, companyClient: talentpb.NewCompanyServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -382,6 +394,21 @@ func (c *companyGRPCClient) ListCompanies(ctx context.Context, req *talentpb.Lis return it } +func (c *companyGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + ctx = insertMetadata(ctx, c.xGoogMetadata) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // CompanyIterator manages a stream of *talentpb.Company. type CompanyIterator struct { items []*talentpb.Company diff --git a/talent/apiv4beta1/company_client_example_test.go b/talent/apiv4beta1/company_client_example_test.go index f66b1b76743..5ef40d7de36 100644 --- a/talent/apiv4beta1/company_client_example_test.go +++ b/talent/apiv4beta1/company_client_example_test.go @@ -22,6 +22,7 @@ import ( talent "cloud.google.com/go/talent/apiv4beta1" "google.golang.org/api/iterator" talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewCompanyClient() { @@ -139,3 +140,23 @@ func ExampleCompanyClient_ListCompanies() { _ = resp } } + +func ExampleCompanyClient_GetOperation() { + ctx := context.Background() + c, err := talent.NewCompanyClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/talent/apiv4beta1/completion_client.go b/talent/apiv4beta1/completion_client.go index 666ccee8e0d..a381f033d94 100644 --- a/talent/apiv4beta1/completion_client.go +++ b/talent/apiv4beta1/completion_client.go @@ -28,6 +28,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -38,6 +39,7 @@ var newCompletionClientHook clientHook // CompletionCallOptions contains the retry settings for each method of CompletionClient. type CompletionCallOptions struct { CompleteQuery []gax.CallOption + GetOperation []gax.CallOption } func defaultCompletionGRPCClientOptions() []option.ClientOption { @@ -66,6 +68,7 @@ func defaultCompletionCallOptions() *CompletionCallOptions { }) }), }, + GetOperation: []gax.CallOption{}, } } @@ -75,6 +78,7 @@ type internalCompletionClient interface { setGoogleClientInfo(...string) Connection() *grpc.ClientConn CompleteQuery(context.Context, *talentpb.CompleteQueryRequest, ...gax.CallOption) (*talentpb.CompleteQueryResponse, error) + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) } // CompletionClient is a client for interacting with Cloud Talent Solution API. @@ -117,6 +121,11 @@ func (c *CompletionClient) CompleteQuery(ctx context.Context, req *talentpb.Comp return c.internalClient.CompleteQuery(ctx, req, opts...) } +// GetOperation is a utility method from google.longrunning.Operations. +func (c *CompletionClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + // completionGRPCClient is a client for interacting with Cloud Talent Solution API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -133,6 +142,8 @@ type completionGRPCClient struct { // The gRPC API client. completionClient talentpb.CompletionClient + operationsClient longrunningpb.OperationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -167,6 +178,7 @@ func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*Com disableDeadlines: disableDeadlines, completionClient: talentpb.NewCompletionClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -218,3 +230,18 @@ func (c *completionGRPCClient) CompleteQuery(ctx context.Context, req *talentpb. } return resp, nil } + +func (c *completionGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + ctx = insertMetadata(ctx, c.xGoogMetadata) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/talent/apiv4beta1/completion_client_example_test.go b/talent/apiv4beta1/completion_client_example_test.go index 9fe47e0f694..d43ddb44519 100644 --- a/talent/apiv4beta1/completion_client_example_test.go +++ b/talent/apiv4beta1/completion_client_example_test.go @@ -21,6 +21,7 @@ import ( talent "cloud.google.com/go/talent/apiv4beta1" talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewCompletionClient() { @@ -54,3 +55,23 @@ func ExampleCompletionClient_CompleteQuery() { // TODO: Use resp. _ = resp } + +func ExampleCompletionClient_GetOperation() { + ctx := context.Background() + c, err := talent.NewCompletionClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/talent/apiv4beta1/doc.go b/talent/apiv4beta1/doc.go index c08e5c1247a..a1293a125af 100644 --- a/talent/apiv4beta1/doc.go +++ b/talent/apiv4beta1/doc.go @@ -26,7 +26,7 @@ // // To get started with this package, create a client. // ctx := context.Background() -// c, err := talent.NewApplicationClient(ctx) +// c, err := talent.NewCompanyClient(ctx) // if err != nil { // // TODO: Handle error. // } @@ -41,17 +41,17 @@ // The following is an example of making an API call with the newly created client. // // ctx := context.Background() -// c, err := talent.NewApplicationClient(ctx) +// c, err := talent.NewCompanyClient(ctx) // if err != nil { // // TODO: Handle error. // } // defer c.Close() // -// req := &talentpb.CreateApplicationRequest{ +// req := &talentpb.CreateCompanyRequest{ // // TODO: Fill request struct fields. -// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/talent/v4beta1#CreateApplicationRequest. +// // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/talent/v4beta1#CreateCompanyRequest. // } -// resp, err := c.CreateApplication(ctx, req) +// resp, err := c.CreateCompany(ctx, req) // if err != nil { // // TODO: Handle error. // } diff --git a/talent/apiv4beta1/event_client.go b/talent/apiv4beta1/event_client.go index 5b84cfbd0aa..35c7b24183c 100644 --- a/talent/apiv4beta1/event_client.go +++ b/talent/apiv4beta1/event_client.go @@ -28,6 +28,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/metadata" ) @@ -37,6 +38,7 @@ var newEventClientHook clientHook // EventCallOptions contains the retry settings for each method of EventClient. type EventCallOptions struct { CreateClientEvent []gax.CallOption + GetOperation []gax.CallOption } func defaultEventGRPCClientOptions() []option.ClientOption { @@ -54,6 +56,7 @@ func defaultEventGRPCClientOptions() []option.ClientOption { func defaultEventCallOptions() *EventCallOptions { return &EventCallOptions{ CreateClientEvent: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, } } @@ -63,6 +66,7 @@ type internalEventClient interface { setGoogleClientInfo(...string) Connection() *grpc.ClientConn CreateClientEvent(context.Context, *talentpb.CreateClientEventRequest, ...gax.CallOption) (*talentpb.ClientEvent, error) + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) } // EventClient is a client for interacting with Cloud Talent Solution API. @@ -110,6 +114,11 @@ func (c *EventClient) CreateClientEvent(ctx context.Context, req *talentpb.Creat return c.internalClient.CreateClientEvent(ctx, req, opts...) } +// GetOperation is a utility method from google.longrunning.Operations. +func (c *EventClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + // eventGRPCClient is a client for interacting with Cloud Talent Solution API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -126,6 +135,8 @@ type eventGRPCClient struct { // The gRPC API client. eventClient talentpb.EventServiceClient + operationsClient longrunningpb.OperationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -160,6 +171,7 @@ func NewEventClient(ctx context.Context, opts ...option.ClientOption) (*EventCli disableDeadlines: disableDeadlines, eventClient: talentpb.NewEventServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -211,3 +223,18 @@ func (c *eventGRPCClient) CreateClientEvent(ctx context.Context, req *talentpb.C } return resp, nil } + +func (c *eventGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + ctx = insertMetadata(ctx, c.xGoogMetadata) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/talent/apiv4beta1/event_client_example_test.go b/talent/apiv4beta1/event_client_example_test.go index d286f52d3fc..83c62a235f8 100644 --- a/talent/apiv4beta1/event_client_example_test.go +++ b/talent/apiv4beta1/event_client_example_test.go @@ -21,6 +21,7 @@ import ( talent "cloud.google.com/go/talent/apiv4beta1" talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewEventClient() { @@ -54,3 +55,23 @@ func ExampleEventClient_CreateClientEvent() { // TODO: Use resp. _ = resp } + +func ExampleEventClient_GetOperation() { + ctx := context.Background() + c, err := talent.NewEventClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/talent/apiv4beta1/gapic_metadata.json b/talent/apiv4beta1/gapic_metadata.json index 5bfc350233b..1ecf7b917cc 100644 --- a/talent/apiv4beta1/gapic_metadata.json +++ b/talent/apiv4beta1/gapic_metadata.json @@ -5,40 +5,6 @@ "protoPackage": "google.cloud.talent.v4beta1", "libraryPackage": "cloud.google.com/go/talent/apiv4beta1", "services": { - "ApplicationService": { - "clients": { - "grpc": { - "libraryClient": "ApplicationClient", - "rpcs": { - "CreateApplication": { - "methods": [ - "CreateApplication" - ] - }, - "DeleteApplication": { - "methods": [ - "DeleteApplication" - ] - }, - "GetApplication": { - "methods": [ - "GetApplication" - ] - }, - "ListApplications": { - "methods": [ - "ListApplications" - ] - }, - "UpdateApplication": { - "methods": [ - "UpdateApplication" - ] - } - } - } - } - }, "CompanyService": { "clients": { "grpc": { @@ -59,6 +25,11 @@ "GetCompany" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListCompanies": { "methods": [ "ListCompanies" @@ -82,6 +53,11 @@ "methods": [ "CompleteQuery" ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] } } } @@ -96,6 +72,11 @@ "methods": [ "CreateClientEvent" ] + }, + "GetOperation": { + "methods": [ + "GetOperation" + ] } } } @@ -136,6 +117,11 @@ "GetJob" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "ListJobs": { "methods": [ "ListJobs" @@ -160,45 +146,6 @@ } } }, - "ProfileService": { - "clients": { - "grpc": { - "libraryClient": "ProfileClient", - "rpcs": { - "CreateProfile": { - "methods": [ - "CreateProfile" - ] - }, - "DeleteProfile": { - "methods": [ - "DeleteProfile" - ] - }, - "GetProfile": { - "methods": [ - "GetProfile" - ] - }, - "ListProfiles": { - "methods": [ - "ListProfiles" - ] - }, - "SearchProfiles": { - "methods": [ - "SearchProfiles" - ] - }, - "UpdateProfile": { - "methods": [ - "UpdateProfile" - ] - } - } - } - } - }, "TenantService": { "clients": { "grpc": { @@ -214,6 +161,11 @@ "DeleteTenant" ] }, + "GetOperation": { + "methods": [ + "GetOperation" + ] + }, "GetTenant": { "methods": [ "GetTenant" diff --git a/talent/apiv4beta1/job_client.go b/talent/apiv4beta1/job_client.go index b3d581cdb60..ab6cdc7e6f9 100644 --- a/talent/apiv4beta1/job_client.go +++ b/talent/apiv4beta1/job_client.go @@ -52,6 +52,7 @@ type JobCallOptions struct { ListJobs []gax.CallOption SearchJobs []gax.CallOption SearchJobsForAlert []gax.CallOption + GetOperation []gax.CallOption } func defaultJobGRPCClientOptions() []option.ClientOption { @@ -111,6 +112,7 @@ func defaultJobCallOptions() *JobCallOptions { }, SearchJobs: []gax.CallOption{}, SearchJobsForAlert: []gax.CallOption{}, + GetOperation: []gax.CallOption{}, } } @@ -131,6 +133,7 @@ type internalJobClient interface { ListJobs(context.Context, *talentpb.ListJobsRequest, ...gax.CallOption) *JobIterator SearchJobs(context.Context, *talentpb.SearchJobsRequest, ...gax.CallOption) (*talentpb.SearchJobsResponse, error) SearchJobsForAlert(context.Context, *talentpb.SearchJobsRequest, ...gax.CallOption) *SearchJobsResponse_MatchingJobIterator + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) } // JobClient is a client for interacting with Cloud Talent Solution API. @@ -257,6 +260,11 @@ func (c *JobClient) SearchJobsForAlert(ctx context.Context, req *talentpb.Search return c.internalClient.SearchJobsForAlert(ctx, req, opts...) } +// GetOperation is a utility method from google.longrunning.Operations. +func (c *JobClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + // jobGRPCClient is a client for interacting with Cloud Talent Solution API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -278,6 +286,8 @@ type jobGRPCClient struct { // Users should not Close this client. LROClient **lroauto.OperationsClient + operationsClient longrunningpb.OperationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -312,6 +322,7 @@ func NewJobClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, disableDeadlines: disableDeadlines, jobClient: talentpb.NewJobServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -615,6 +626,21 @@ func (c *jobGRPCClient) SearchJobsForAlert(ctx context.Context, req *talentpb.Se return it } +func (c *jobGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + ctx = insertMetadata(ctx, c.xGoogMetadata) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // BatchCreateJobsOperation manages a long-running operation from BatchCreateJobs. type BatchCreateJobsOperation struct { lro *longrunning.Operation diff --git a/talent/apiv4beta1/job_client_example_test.go b/talent/apiv4beta1/job_client_example_test.go index fdd1c77e730..2677fcd9f58 100644 --- a/talent/apiv4beta1/job_client_example_test.go +++ b/talent/apiv4beta1/job_client_example_test.go @@ -22,6 +22,7 @@ import ( talent "cloud.google.com/go/talent/apiv4beta1" "google.golang.org/api/iterator" talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewJobClient() { @@ -253,3 +254,23 @@ func ExampleJobClient_SearchJobsForAlert() { _ = resp } } + +func ExampleJobClient_GetOperation() { + ctx := context.Background() + c, err := talent.NewJobClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/talent/apiv4beta1/tenant_client.go b/talent/apiv4beta1/tenant_client.go index 82328b3938e..bf9af7c8045 100644 --- a/talent/apiv4beta1/tenant_client.go +++ b/talent/apiv4beta1/tenant_client.go @@ -29,6 +29,7 @@ import ( "google.golang.org/api/option/internaloption" gtransport "google.golang.org/api/transport/grpc" talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" @@ -44,6 +45,7 @@ type TenantCallOptions struct { UpdateTenant []gax.CallOption DeleteTenant []gax.CallOption ListTenants []gax.CallOption + GetOperation []gax.CallOption } func defaultTenantGRPCClientOptions() []option.ClientOption { @@ -98,6 +100,7 @@ func defaultTenantCallOptions() *TenantCallOptions { }) }), }, + GetOperation: []gax.CallOption{}, } } @@ -111,6 +114,7 @@ type internalTenantClient interface { UpdateTenant(context.Context, *talentpb.UpdateTenantRequest, ...gax.CallOption) (*talentpb.Tenant, error) DeleteTenant(context.Context, *talentpb.DeleteTenantRequest, ...gax.CallOption) error ListTenants(context.Context, *talentpb.ListTenantsRequest, ...gax.CallOption) *TenantIterator + GetOperation(context.Context, *longrunningpb.GetOperationRequest, ...gax.CallOption) (*longrunningpb.Operation, error) } // TenantClient is a client for interacting with Cloud Talent Solution API. @@ -172,6 +176,11 @@ func (c *TenantClient) ListTenants(ctx context.Context, req *talentpb.ListTenant return c.internalClient.ListTenants(ctx, req, opts...) } +// GetOperation is a utility method from google.longrunning.Operations. +func (c *TenantClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + return c.internalClient.GetOperation(ctx, req, opts...) +} + // tenantGRPCClient is a client for interacting with Cloud Talent Solution API over gRPC transport. // // Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. @@ -188,6 +197,8 @@ type tenantGRPCClient struct { // The gRPC API client. tenantClient talentpb.TenantServiceClient + operationsClient longrunningpb.OperationsClient + // The x-goog-* metadata to be sent with each request. xGoogMetadata metadata.MD } @@ -222,6 +233,7 @@ func NewTenantClient(ctx context.Context, opts ...option.ClientOption) (*TenantC disableDeadlines: disableDeadlines, tenantClient: talentpb.NewTenantServiceClient(connPool), CallOptions: &client.CallOptions, + operationsClient: longrunningpb.NewOperationsClient(connPool), } c.setGoogleClientInfo() @@ -381,6 +393,21 @@ func (c *tenantGRPCClient) ListTenants(ctx context.Context, req *talentpb.ListTe return it } +func (c *tenantGRPCClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error) { + ctx = insertMetadata(ctx, c.xGoogMetadata) + opts = append((*c.CallOptions).GetOperation[0:len((*c.CallOptions).GetOperation):len((*c.CallOptions).GetOperation)], opts...) + var resp *longrunningpb.Operation + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + // TenantIterator manages a stream of *talentpb.Tenant. type TenantIterator struct { items []*talentpb.Tenant diff --git a/talent/apiv4beta1/tenant_client_example_test.go b/talent/apiv4beta1/tenant_client_example_test.go index 31d10f88f81..34f470dad1b 100644 --- a/talent/apiv4beta1/tenant_client_example_test.go +++ b/talent/apiv4beta1/tenant_client_example_test.go @@ -22,6 +22,7 @@ import ( talent "cloud.google.com/go/talent/apiv4beta1" "google.golang.org/api/iterator" talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1" + longrunningpb "google.golang.org/genproto/googleapis/longrunning" ) func ExampleNewTenantClient() { @@ -139,3 +140,23 @@ func ExampleTenantClient_ListTenants() { _ = resp } } + +func ExampleTenantClient_GetOperation() { + ctx := context.Background() + c, err := talent.NewTenantClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &longrunningpb.GetOperationRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/longrunning#GetOperationRequest. + } + resp, err := c.GetOperation(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/talent/go.mod b/talent/go.mod index 00de65b0483..a34fbb75118 100644 --- a/talent/go.mod +++ b/talent/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.102.0 github.com/googleapis/gax-go/v2 v2.4.0 google.golang.org/api v0.83.0 - google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 + google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) diff --git a/talent/go.sum b/talent/go.sum index 9d89b5ec51d..598c7bda95e 100644 --- a/talent/go.sum +++ b/talent/go.sum @@ -573,8 +573,9 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac h1:ByeiW1F67iV9o8ipGskA+HWzSkMbRJuKLlwCdPxzn7A= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= 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=