Reference documentation and code samples for the Discovery Engine V1 API class Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.
REST client for the UserLicenseService service.
Service for managing User Licenses.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the UserLicenseService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all UserLicenseService clients ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.configure do |config| config.timeout = 10.0 end
#batch_update_user_licenses
def batch_update_user_licenses(request, options = nil) -> ::Gapic::Operation
def batch_update_user_licenses(inline_source: nil, parent: nil, delete_unassigned_user_licenses: nil) -> ::Gapic::Operation
Updates the User License. This method is used for batch assign/unassign licenses to users.
def batch_update_user_licenses(request, options = nil) -> ::Gapic::Operation
batch_update_user_licenses
via a request object, either of type
BatchUpdateUserLicensesRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest, ::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 batch_update_user_licenses(inline_source: nil, parent: nil, delete_unassigned_user_licenses: nil) -> ::Gapic::Operation
batch_update_user_licenses
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).
- inline_source (::Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest::InlineSource, ::Hash) — The inline source for the input content for document embeddings.
-
parent (::String) — Required. The parent [UserStore][] resource name, format:
projects/{project}/locations/{location}/userStores/{user_store_id}
. - delete_unassigned_user_licenses (::Boolean) — Optional. If true, if user licenses removed associated license config, the user license will be deleted. By default which is false, the user license will be updated to unassigned state.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::BatchUpdateUserLicensesRequest.new # Call the batch_update_user_licenses method. result = client.batch_update_user_licenses request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the UserLicenseService 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)
#initialize
def initialize() { |config| ... } -> Client
Create a new UserLicenseService REST client object.
- (config) — Configure the UserLicenseService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_user_licenses
def list_user_licenses(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>
def list_user_licenses(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>
Lists the User Licenses.
def list_user_licenses(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>
list_user_licenses
via a request object, either of type
ListUserLicensesRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest, ::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_user_licenses(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>
list_user_licenses
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. The parent [UserStore][] resource name, format:
projects/{project}/locations/{location}/userStores/{user_store_id}
. -
page_size (::Integer) — Optional. Requested page size. Server may return fewer items than
requested. If unspecified, defaults to 10. The maximum value is 50; values
above 50 will be coerced to 50.
If this field is negative, an INVALID_ARGUMENT error is returned.
-
page_token (::String) — Optional. A page token, received from a previous
ListUserLicenses
call. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListUserLicenses
must match the call that provided the page token. -
filter (::String) —
Optional. Filter for the list request.
Supported fields:
license_assignment_state
Examples:
license_assignment_state = ASSIGNED
to list assigned user licenses.license_assignment_state = NO_LICENSE
to list not licensed users.license_assignment_state = NO_LICENSE_ATTEMPTED_LOGIN
to list users who attempted login but no license assigned.license_assignment_state != NO_LICENSE_ATTEMPTED_LOGIN
to filter out users who attempted login but no license assigned.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::UserLicense>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/discovery_engine/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1::ListUserLicensesRequest.new # Call the list_user_licenses method. result = client.list_user_licenses request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::DiscoveryEngine::V1::UserLicense. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Rest::Operations
Get the associated client for long-running operations.
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)