Reference documentation and code samples for the Cloud Talent Solution V4 API class Google::Cloud::Talent::V4::TenantService::Rest::Client.
REST client for the TenantService service.
A service that handles tenant management, including CRUD and enumeration.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the TenantService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all TenantService clients ::Google::Cloud::Talent::V4::TenantService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the TenantService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#create_tenant
def create_tenant(request, options = nil) -> ::Google::Cloud::Talent::V4::Tenant
def create_tenant(parent: nil, tenant: nil) -> ::Google::Cloud::Talent::V4::Tenant
Creates a new tenant entity.
def create_tenant(request, options = nil) -> ::Google::Cloud::Talent::V4::Tenant
create_tenant
via a request object, either of type
CreateTenantRequest or an equivalent Hash.
- request (::Google::Cloud::Talent::V4::CreateTenantRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_tenant(parent: nil, tenant: nil) -> ::Google::Cloud::Talent::V4::Tenant
create_tenant
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Resource name of the project under which the tenant is created.
The format is "projects/{project_id}", for example, "projects/foo".
- tenant (::Google::Cloud::Talent::V4::Tenant, ::Hash) — Required. The tenant to be created.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Talent::V4::Tenant)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#delete_tenant
def delete_tenant(request, options = nil) -> ::Google::Protobuf::Empty
def delete_tenant(name: nil) -> ::Google::Protobuf::Empty
Deletes specified tenant.
def delete_tenant(request, options = nil) -> ::Google::Protobuf::Empty
delete_tenant
via a request object, either of type
DeleteTenantRequest or an equivalent Hash.
- request (::Google::Cloud::Talent::V4::DeleteTenantRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_tenant(name: nil) -> ::Google::Protobuf::Empty
delete_tenant
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the tenant to be deleted.
The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Protobuf::Empty)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#get_tenant
def get_tenant(request, options = nil) -> ::Google::Cloud::Talent::V4::Tenant
def get_tenant(name: nil) -> ::Google::Cloud::Talent::V4::Tenant
Retrieves specified tenant.
def get_tenant(request, options = nil) -> ::Google::Cloud::Talent::V4::Tenant
get_tenant
via a request object, either of type
GetTenantRequest or an equivalent Hash.
- request (::Google::Cloud::Talent::V4::GetTenantRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_tenant(name: nil) -> ::Google::Cloud::Talent::V4::Tenant
get_tenant
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. The resource name of the tenant to be retrieved.
The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Talent::V4::Tenant)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
#initialize
def initialize() { |config| ... } -> Client
Create a new TenantService REST client object.
- (config) — Configure the TenantService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Talent::V4::TenantService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Talent::V4::TenantService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_tenants
def list_tenants(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4::Tenant>
def list_tenants(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4::Tenant>
Lists all tenants associated with the project.
def list_tenants(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4::Tenant>
list_tenants
via a request object, either of type
ListTenantsRequest or an equivalent Hash.
- request (::Google::Cloud::Talent::V4::ListTenantsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_tenants(parent: nil, page_token: nil, page_size: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4::Tenant>
list_tenants
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
parent (::String) — Required. Resource name of the project under which the tenant is created.
The format is "projects/{project_id}", for example, "projects/foo".
- page_token (::String) — The starting indicator from which to return results.
- page_size (::Integer) — The maximum number of tenants to be returned, at most 100. Default is 100 if a non-positive number is provided.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4::Tenant>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::Talent::V4::Tenant>)
- (::Google::Cloud::Error) — if the REST call is aborted.
#update_tenant
def update_tenant(request, options = nil) -> ::Google::Cloud::Talent::V4::Tenant
def update_tenant(tenant: nil, update_mask: nil) -> ::Google::Cloud::Talent::V4::Tenant
Updates specified tenant.
def update_tenant(request, options = nil) -> ::Google::Cloud::Talent::V4::Tenant
update_tenant
via a request object, either of type
UpdateTenantRequest or an equivalent Hash.
- request (::Google::Cloud::Talent::V4::UpdateTenantRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_tenant(tenant: nil, update_mask: nil) -> ::Google::Cloud::Talent::V4::Tenant
update_tenant
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- tenant (::Google::Cloud::Talent::V4::Tenant, ::Hash) — Required. The tenant resource to replace the current resource in the system.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Strongly recommended for the best service experience.
If update_mask is provided, only the specified fields in tenant are updated. Otherwise all the fields are updated.
A field mask to specify the tenant fields to be updated. Only top level fields of Tenant are supported.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Talent::V4::Tenant)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.