Back to godoc.org
cloud.google.com/go / talent / apiv4beta1

Package talent

v0.67.0
Latest Go to latest

The latest major version is .

Published: 0 hours ago | License: Apache-2.0 | Module: cloud.google.com/go

Overview

Package talent is an auto-generated package for the Cloud Talent Solution API.

Cloud Talent Solution provides the capability to create, read, update, and delete job postings, as well as search jobs based on keywords and filters.

NOTE: This package is in beta. It is not stable, and may be subject to changes.

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

For information about setting deadlines, reusing contexts, and more please visit pkg.go.dev/cloud.google.com/go.

Index

Examples

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

type ApplicationCallOptions

type ApplicationCallOptions struct {
	CreateApplication []gax.CallOption
	GetApplication    []gax.CallOption
	UpdateApplication []gax.CallOption
	DeleteApplication []gax.CallOption
	ListApplications  []gax.CallOption
}

ApplicationCallOptions contains the retry settings for each method of ApplicationClient.

type ApplicationClient

type ApplicationClient struct {

	// The call options for this service.
	CallOptions *ApplicationCallOptions
	// contains filtered or unexported fields
}

ApplicationClient is a client for interacting with Cloud Talent Solution API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewApplicationClient

func NewApplicationClient(ctx context.Context, opts ...option.ClientOption) (*ApplicationClient, error)

NewApplicationClient creates a new application service client.

A service that handles application management, including CRUD and enumeration.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewApplicationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*ApplicationClient) Close

func (c *ApplicationClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ApplicationClient) Connection

func (c *ApplicationClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ApplicationClient) CreateApplication

func (c *ApplicationClient) CreateApplication(ctx context.Context, req *talentpb.CreateApplicationRequest, opts ...gax.CallOption) (*talentpb.Application, error)

CreateApplication creates a new application entity.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewApplicationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.CreateApplicationRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateApplication(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ApplicationClient) DeleteApplication

func (c *ApplicationClient) DeleteApplication(ctx context.Context, req *talentpb.DeleteApplicationRequest, opts ...gax.CallOption) error

DeleteApplication deletes specified application.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewApplicationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.DeleteApplicationRequest{
		// TODO: Fill request struct fields.
	}
	err = c.DeleteApplication(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*ApplicationClient) GetApplication

func (c *ApplicationClient) GetApplication(ctx context.Context, req *talentpb.GetApplicationRequest, opts ...gax.CallOption) (*talentpb.Application, error)

GetApplication retrieves specified application.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewApplicationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.GetApplicationRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetApplication(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ApplicationClient) ListApplications

func (c *ApplicationClient) ListApplications(ctx context.Context, req *talentpb.ListApplicationsRequest, opts ...gax.CallOption) *ApplicationIterator

ListApplications lists all applications associated with the profile.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	"google.golang.org/api/iterator"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := talent.NewApplicationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.ListApplicationsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListApplications(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ApplicationClient) UpdateApplication

func (c *ApplicationClient) UpdateApplication(ctx context.Context, req *talentpb.UpdateApplicationRequest, opts ...gax.CallOption) (*talentpb.Application, error)

UpdateApplication updates specified application.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewApplicationClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.UpdateApplicationRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateApplication(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type ApplicationIterator

type ApplicationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*talentpb.Application, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ApplicationIterator manages a stream of *talentpb.Application.

func (*ApplicationIterator) Next

func (it *ApplicationIterator) Next() (*talentpb.Application, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ApplicationIterator) PageInfo

func (it *ApplicationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type BatchCreateJobsOperation

type BatchCreateJobsOperation struct {
	// contains filtered or unexported fields
}

BatchCreateJobsOperation manages a long-running operation from BatchCreateJobs.

func (*BatchCreateJobsOperation) Done

func (op *BatchCreateJobsOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*BatchCreateJobsOperation) Metadata

func (op *BatchCreateJobsOperation) Metadata() (*talentpb.BatchOperationMetadata, error)

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*BatchCreateJobsOperation) Name

func (op *BatchCreateJobsOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*BatchCreateJobsOperation) Poll

func (op *BatchCreateJobsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*talentpb.JobOperationResult, error)

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*BatchCreateJobsOperation) Wait

func (op *BatchCreateJobsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*talentpb.JobOperationResult, error)

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type BatchUpdateJobsOperation

type BatchUpdateJobsOperation struct {
	// contains filtered or unexported fields
}

BatchUpdateJobsOperation manages a long-running operation from BatchUpdateJobs.

func (*BatchUpdateJobsOperation) Done

func (op *BatchUpdateJobsOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*BatchUpdateJobsOperation) Metadata

func (op *BatchUpdateJobsOperation) Metadata() (*talentpb.BatchOperationMetadata, error)

Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.

func (*BatchUpdateJobsOperation) Name

func (op *BatchUpdateJobsOperation) Name() string

Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.

func (*BatchUpdateJobsOperation) Poll

func (op *BatchUpdateJobsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*talentpb.JobOperationResult, error)

Poll fetches the latest state of the long-running operation.

Poll also fetches the latest metadata, which can be retrieved by Metadata.

If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.

func (*BatchUpdateJobsOperation) Wait

func (op *BatchUpdateJobsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*talentpb.JobOperationResult, error)

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

type CompanyCallOptions

type CompanyCallOptions struct {
	CreateCompany []gax.CallOption
	GetCompany    []gax.CallOption
	UpdateCompany []gax.CallOption
	DeleteCompany []gax.CallOption
	ListCompanies []gax.CallOption
}

CompanyCallOptions contains the retry settings for each method of CompanyClient.

type CompanyClient

type CompanyClient struct {

	// The call options for this service.
	CallOptions *CompanyCallOptions
	// contains filtered or unexported fields
}

CompanyClient is a client for interacting with Cloud Talent Solution API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewCompanyClient

func NewCompanyClient(ctx context.Context, opts ...option.ClientOption) (*CompanyClient, error)

NewCompanyClient creates a new company service client.

A service that handles company management, including CRUD and enumeration.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewCompanyClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*CompanyClient) Close

func (c *CompanyClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*CompanyClient) Connection

func (c *CompanyClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*CompanyClient) CreateCompany

func (c *CompanyClient) CreateCompany(ctx context.Context, req *talentpb.CreateCompanyRequest, opts ...gax.CallOption) (*talentpb.Company, error)

CreateCompany creates a new company entity.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewCompanyClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.CreateCompanyRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateCompany(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CompanyClient) DeleteCompany

func (c *CompanyClient) DeleteCompany(ctx context.Context, req *talentpb.DeleteCompanyRequest, opts ...gax.CallOption) error

DeleteCompany deletes specified company. Prerequisite: The company has no jobs associated with it.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewCompanyClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.DeleteCompanyRequest{
		// TODO: Fill request struct fields.
	}
	err = c.DeleteCompany(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*CompanyClient) GetCompany

func (c *CompanyClient) GetCompany(ctx context.Context, req *talentpb.GetCompanyRequest, opts ...gax.CallOption) (*talentpb.Company, error)

GetCompany retrieves specified company.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewCompanyClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.GetCompanyRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetCompany(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CompanyClient) ListCompanies

func (c *CompanyClient) ListCompanies(ctx context.Context, req *talentpb.ListCompaniesRequest, opts ...gax.CallOption) *CompanyIterator

ListCompanies lists all companies associated with the project.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	"google.golang.org/api/iterator"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := talent.NewCompanyClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.ListCompaniesRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListCompanies(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*CompanyClient) UpdateCompany

func (c *CompanyClient) UpdateCompany(ctx context.Context, req *talentpb.UpdateCompanyRequest, opts ...gax.CallOption) (*talentpb.Company, error)

UpdateCompany updates specified company.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewCompanyClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.UpdateCompanyRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateCompany(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type CompanyIterator

type CompanyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*talentpb.Company, nextPageToken string, err error)
	// contains filtered or unexported fields
}

CompanyIterator manages a stream of *talentpb.Company.

func (*CompanyIterator) Next

func (it *CompanyIterator) Next() (*talentpb.Company, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*CompanyIterator) PageInfo

func (it *CompanyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type CompletionCallOptions

type CompletionCallOptions struct {
	CompleteQuery []gax.CallOption
}

CompletionCallOptions contains the retry settings for each method of CompletionClient.

type CompletionClient

type CompletionClient struct {

	// The call options for this service.
	CallOptions *CompletionCallOptions
	// contains filtered or unexported fields
}

CompletionClient is a client for interacting with Cloud Talent Solution API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewCompletionClient

func NewCompletionClient(ctx context.Context, opts ...option.ClientOption) (*CompletionClient, error)

NewCompletionClient creates a new completion client.

A service handles auto completion.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewCompletionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*CompletionClient) Close

func (c *CompletionClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*CompletionClient) CompleteQuery

func (c *CompletionClient) CompleteQuery(ctx context.Context, req *talentpb.CompleteQueryRequest, opts ...gax.CallOption) (*talentpb.CompleteQueryResponse, error)

CompleteQuery completes the specified prefix with keyword suggestions. Intended for use by a job search auto-complete search box.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewCompletionClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.CompleteQueryRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CompleteQuery(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*CompletionClient) Connection

func (c *CompletionClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

type EventCallOptions

type EventCallOptions struct {
	CreateClientEvent []gax.CallOption
}

EventCallOptions contains the retry settings for each method of EventClient.

type EventClient

type EventClient struct {

	// The call options for this service.
	CallOptions *EventCallOptions
	// contains filtered or unexported fields
}

EventClient is a client for interacting with Cloud Talent Solution API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewEventClient

func NewEventClient(ctx context.Context, opts ...option.ClientOption) (*EventClient, error)

NewEventClient creates a new event service client.

A service handles client event report.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewEventClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*EventClient) Close

func (c *EventClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*EventClient) Connection

func (c *EventClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*EventClient) CreateClientEvent

func (c *EventClient) CreateClientEvent(ctx context.Context, req *talentpb.CreateClientEventRequest, opts ...gax.CallOption) (*talentpb.ClientEvent, error)

CreateClientEvent report events issued when end user interacts with customer’s application that uses Cloud Talent Solution. You may inspect the created events in self service tools (at https://console.cloud.google.com/talent-solution/overview). Learn more (at https://cloud.google.com/talent-solution/docs/management-tools) about self service tools.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewEventClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.CreateClientEventRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateClientEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type JobCallOptions

type JobCallOptions struct {
	CreateJob          []gax.CallOption
	BatchCreateJobs    []gax.CallOption
	GetJob             []gax.CallOption
	UpdateJob          []gax.CallOption
	BatchUpdateJobs    []gax.CallOption
	DeleteJob          []gax.CallOption
	BatchDeleteJobs    []gax.CallOption
	ListJobs           []gax.CallOption
	SearchJobs         []gax.CallOption
	SearchJobsForAlert []gax.CallOption
}

JobCallOptions contains the retry settings for each method of JobClient.

type JobClient

type JobClient struct {

	// LROClient is used internally to handle longrunning operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient

	// The call options for this service.
	CallOptions *JobCallOptions
	// contains filtered or unexported fields
}

JobClient is a client for interacting with Cloud Talent Solution API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewJobClient

func NewJobClient(ctx context.Context, opts ...option.ClientOption) (*JobClient, error)

NewJobClient creates a new job service client.

A service handles job management, including job CRUD, enumeration and search.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*JobClient) BatchCreateJobs

func (c *JobClient) BatchCreateJobs(ctx context.Context, req *talentpb.BatchCreateJobsRequest, opts ...gax.CallOption) (*BatchCreateJobsOperation, error)

BatchCreateJobs begins executing a batch create jobs operation.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.BatchCreateJobsRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.BatchCreateJobs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) BatchCreateJobsOperation

func (c *JobClient) BatchCreateJobsOperation(name string) *BatchCreateJobsOperation

BatchCreateJobsOperation returns a new BatchCreateJobsOperation from a given name. The name must be that of a previously created BatchCreateJobsOperation, possibly from a different process.

func (*JobClient) BatchDeleteJobs

func (c *JobClient) BatchDeleteJobs(ctx context.Context, req *talentpb.BatchDeleteJobsRequest, opts ...gax.CallOption) error

BatchDeleteJobs deletes a list of Jobs by filter.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.BatchDeleteJobsRequest{
		// TODO: Fill request struct fields.
	}
	err = c.BatchDeleteJobs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) BatchUpdateJobs

func (c *JobClient) BatchUpdateJobs(ctx context.Context, req *talentpb.BatchUpdateJobsRequest, opts ...gax.CallOption) (*BatchUpdateJobsOperation, error)

BatchUpdateJobs begins executing a batch update jobs operation.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.BatchUpdateJobsRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.BatchUpdateJobs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) BatchUpdateJobsOperation

func (c *JobClient) BatchUpdateJobsOperation(name string) *BatchUpdateJobsOperation

BatchUpdateJobsOperation returns a new BatchUpdateJobsOperation from a given name. The name must be that of a previously created BatchUpdateJobsOperation, possibly from a different process.

func (*JobClient) Close

func (c *JobClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*JobClient) Connection

func (c *JobClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*JobClient) CreateJob

func (c *JobClient) CreateJob(ctx context.Context, req *talentpb.CreateJobRequest, opts ...gax.CallOption) (*talentpb.Job, error)

CreateJob creates a new job.

Typically, the job becomes searchable within 10 seconds, but it may take up to 5 minutes.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.CreateJobRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) DeleteJob

func (c *JobClient) DeleteJob(ctx context.Context, req *talentpb.DeleteJobRequest, opts ...gax.CallOption) error

DeleteJob deletes the specified job.

Typically, the job becomes unsearchable within 10 seconds, but it may take up to 5 minutes.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.DeleteJobRequest{
		// TODO: Fill request struct fields.
	}
	err = c.DeleteJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*JobClient) GetJob

func (c *JobClient) GetJob(ctx context.Context, req *talentpb.GetJobRequest, opts ...gax.CallOption) (*talentpb.Job, error)

GetJob retrieves the specified job, whose status is OPEN or recently EXPIRED within the last 90 days.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.GetJobRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) ListJobs

func (c *JobClient) ListJobs(ctx context.Context, req *talentpb.ListJobsRequest, opts ...gax.CallOption) *JobIterator

ListJobs lists jobs by filter.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	"google.golang.org/api/iterator"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.ListJobsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListJobs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*JobClient) SearchJobs

func (c *JobClient) SearchJobs(ctx context.Context, req *talentpb.SearchJobsRequest, opts ...gax.CallOption) (*talentpb.SearchJobsResponse, error)

SearchJobs searches for jobs using the provided SearchJobsRequest.

This call constrains the visibility of jobs present in the database, and only returns jobs that the caller has permission to search against.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.SearchJobsRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.SearchJobs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*JobClient) SearchJobsForAlert

func (c *JobClient) SearchJobsForAlert(ctx context.Context, req *talentpb.SearchJobsRequest, opts ...gax.CallOption) *SearchJobsResponse_MatchingJobIterator

SearchJobsForAlert searches for jobs using the provided SearchJobsRequest.

This API call is intended for the use case of targeting passive job seekers (for example, job seekers who have signed up to receive email alerts about potential job opportunities), and has different algorithmic adjustments that are targeted to passive job seekers.

This call constrains the visibility of jobs present in the database, and only returns jobs the caller has permission to search against.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	"google.golang.org/api/iterator"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.SearchJobsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.SearchJobsForAlert(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*JobClient) UpdateJob

func (c *JobClient) UpdateJob(ctx context.Context, req *talentpb.UpdateJobRequest, opts ...gax.CallOption) (*talentpb.Job, error)

UpdateJob updates specified job.

Typically, updated contents become visible in search results within 10 seconds, but it may take up to 5 minutes.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewJobClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.UpdateJobRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateJob(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type JobIterator

type JobIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*talentpb.Job, nextPageToken string, err error)
	// contains filtered or unexported fields
}

JobIterator manages a stream of *talentpb.Job.

func (*JobIterator) Next

func (it *JobIterator) Next() (*talentpb.Job, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*JobIterator) PageInfo

func (it *JobIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type ProfileCallOptions

type ProfileCallOptions struct {
	ListProfiles   []gax.CallOption
	CreateProfile  []gax.CallOption
	GetProfile     []gax.CallOption
	UpdateProfile  []gax.CallOption
	DeleteProfile  []gax.CallOption
	SearchProfiles []gax.CallOption
}

ProfileCallOptions contains the retry settings for each method of ProfileClient.

type ProfileClient

type ProfileClient struct {

	// The call options for this service.
	CallOptions *ProfileCallOptions
	// contains filtered or unexported fields
}

ProfileClient is a client for interacting with Cloud Talent Solution API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewProfileClient

func NewProfileClient(ctx context.Context, opts ...option.ClientOption) (*ProfileClient, error)

NewProfileClient creates a new profile service client.

A service that handles profile management, including profile CRUD, enumeration and search.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewProfileClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*ProfileClient) Close

func (c *ProfileClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ProfileClient) Connection

func (c *ProfileClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ProfileClient) CreateProfile

func (c *ProfileClient) CreateProfile(ctx context.Context, req *talentpb.CreateProfileRequest, opts ...gax.CallOption) (*talentpb.Profile, error)

CreateProfile creates and returns a new profile.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewProfileClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.CreateProfileRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateProfile(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProfileClient) DeleteProfile

func (c *ProfileClient) DeleteProfile(ctx context.Context, req *talentpb.DeleteProfileRequest, opts ...gax.CallOption) error

DeleteProfile deletes the specified profile. Prerequisite: The profile has no associated applications or assignments associated.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewProfileClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.DeleteProfileRequest{
		// TODO: Fill request struct fields.
	}
	err = c.DeleteProfile(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*ProfileClient) GetProfile

func (c *ProfileClient) GetProfile(ctx context.Context, req *talentpb.GetProfileRequest, opts ...gax.CallOption) (*talentpb.Profile, error)

GetProfile gets the specified profile.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewProfileClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.GetProfileRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetProfile(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProfileClient) ListProfiles

func (c *ProfileClient) ListProfiles(ctx context.Context, req *talentpb.ListProfilesRequest, opts ...gax.CallOption) *ProfileIterator

ListProfiles lists profiles by filter. The order is unspecified.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	"google.golang.org/api/iterator"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := talent.NewProfileClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.ListProfilesRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListProfiles(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ProfileClient) SearchProfiles

func (c *ProfileClient) SearchProfiles(ctx context.Context, req *talentpb.SearchProfilesRequest, opts ...gax.CallOption) (*talentpb.SearchProfilesResponse, error)

SearchProfiles searches for profiles within a tenant.

For example, search by raw queries “software engineer in Mountain View” or search by structured filters (location filter, education filter, etc.).

See SearchProfilesRequest for more information.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewProfileClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.SearchProfilesRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.SearchProfiles(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProfileClient) UpdateProfile

func (c *ProfileClient) UpdateProfile(ctx context.Context, req *talentpb.UpdateProfileRequest, opts ...gax.CallOption) (*talentpb.Profile, error)

UpdateProfile updates the specified profile and returns the updated result.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewProfileClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.UpdateProfileRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateProfile(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type ProfileIterator

type ProfileIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*talentpb.Profile, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ProfileIterator manages a stream of *talentpb.Profile.

func (*ProfileIterator) Next

func (it *ProfileIterator) Next() (*talentpb.Profile, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ProfileIterator) PageInfo

func (it *ProfileIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type SearchJobsResponse_MatchingJobIterator

type SearchJobsResponse_MatchingJobIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*talentpb.SearchJobsResponse_MatchingJob, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SearchJobsResponse_MatchingJobIterator manages a stream of *talentpb.SearchJobsResponse_MatchingJob.

func (*SearchJobsResponse_MatchingJobIterator) Next

func (it *SearchJobsResponse_MatchingJobIterator) Next() (*talentpb.SearchJobsResponse_MatchingJob, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SearchJobsResponse_MatchingJobIterator) PageInfo

func (it *SearchJobsResponse_MatchingJobIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

type TenantCallOptions

type TenantCallOptions struct {
	CreateTenant []gax.CallOption
	GetTenant    []gax.CallOption
	UpdateTenant []gax.CallOption
	DeleteTenant []gax.CallOption
	ListTenants  []gax.CallOption
}

TenantCallOptions contains the retry settings for each method of TenantClient.

type TenantClient

type TenantClient struct {

	// The call options for this service.
	CallOptions *TenantCallOptions
	// contains filtered or unexported fields
}

TenantClient is a client for interacting with Cloud Talent Solution API.

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewTenantClient

func NewTenantClient(ctx context.Context, opts ...option.ClientOption) (*TenantClient, error)

NewTenantClient creates a new tenant service client.

A service that handles tenant management, including CRUD and enumeration.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewTenantClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*TenantClient) Close

func (c *TenantClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TenantClient) Connection

func (c *TenantClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TenantClient) CreateTenant

func (c *TenantClient) CreateTenant(ctx context.Context, req *talentpb.CreateTenantRequest, opts ...gax.CallOption) (*talentpb.Tenant, error)

CreateTenant creates a new tenant entity.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewTenantClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.CreateTenantRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.CreateTenant(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TenantClient) DeleteTenant

func (c *TenantClient) DeleteTenant(ctx context.Context, req *talentpb.DeleteTenantRequest, opts ...gax.CallOption) error

DeleteTenant deletes specified tenant.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	ctx := context.Background()
	c, err := talent.NewTenantClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.DeleteTenantRequest{
		// TODO: Fill request struct fields.
	}
	err = c.DeleteTenant(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*TenantClient) GetTenant

func (c *TenantClient) GetTenant(ctx context.Context, req *talentpb.GetTenantRequest, opts ...gax.CallOption) (*talentpb.Tenant, error)

GetTenant retrieves specified tenant.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewTenantClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.GetTenantRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetTenant(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TenantClient) ListTenants

func (c *TenantClient) ListTenants(ctx context.Context, req *talentpb.ListTenantsRequest, opts ...gax.CallOption) *TenantIterator

ListTenants lists all tenants associated with the project.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	"google.golang.org/api/iterator"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := talent.NewTenantClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.ListTenantsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListTenants(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TenantClient) UpdateTenant

func (c *TenantClient) UpdateTenant(ctx context.Context, req *talentpb.UpdateTenantRequest, opts ...gax.CallOption) (*talentpb.Tenant, error)

UpdateTenant updates specified tenant.

Example

Code:

package main

import (
	talent "cloud.google.com/go/talent/apiv4beta1"
	"context"
	talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"
)

func main() {
	// import talentpb "google.golang.org/genproto/googleapis/cloud/talent/v4beta1"

	ctx := context.Background()
	c, err := talent.NewTenantClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &talentpb.UpdateTenantRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.UpdateTenant(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

type TenantIterator

type TenantIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*talentpb.Tenant, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TenantIterator manages a stream of *talentpb.Tenant.

func (*TenantIterator) Next

func (it *TenantIterator) Next() (*talentpb.Tenant, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TenantIterator) PageInfo

func (it *TenantIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier