Reference documentation and code samples for the Discovery Engine V1BETA API class Google::Cloud::DiscoveryEngine::V1beta::UserLicenseService::Rest::Client.
REST client for the UserLicenseService service.
Service for managing User Licenses.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure 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::V1beta::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::OperationUpdates the User License. This method is used for batch assign/unassign licenses to users.
def batch_update_user_licenses(request, options = nil) -> ::Gapic::Operationbatch_update_user_licenses via a request object, either of type
BatchUpdateUserLicensesRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::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::Operationbatch_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::V1beta::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/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1beta::UserLicenseService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::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::ConfigurationConfigure 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| ... } -> ClientCreate 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::V1beta::UserLicenseService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::DiscoveryEngine::V1beta::UserLicenseService::Rest::Client.new do |config| config.timeout = 10.0 end
#list_license_configs_usage_stats
def list_license_configs_usage_stats(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsUsageStatsResponse
def list_license_configs_usage_stats(parent: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsUsageStatsResponseLists all the {::Google::Cloud::DiscoveryEngine::V1beta::LicenseConfigUsageStats LicenseConfigUsageStats}s associated with the project.
def list_license_configs_usage_stats(request, options = nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsUsageStatsResponselist_license_configs_usage_stats via a request object, either of type
ListLicenseConfigsUsageStatsRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsUsageStatsRequest, ::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_license_configs_usage_stats(parent: nil) -> ::Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsUsageStatsResponselist_license_configs_usage_stats 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 branch resource name, such as
projects/{project}/locations/{location}/userStores/{user_store_id}.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsUsageStatsResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/discovery_engine/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1beta::UserLicenseService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsUsageStatsRequest.new # Call the list_license_configs_usage_stats method. result = client.list_license_configs_usage_stats request # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::ListLicenseConfigsUsageStatsResponse. p result
#list_user_licenses
def list_user_licenses(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::UserLicense>
def list_user_licenses(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::UserLicense>Lists the User Licenses.
def list_user_licenses(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::UserLicense>list_user_licenses via a request object, either of type
ListUserLicensesRequest or an equivalent Hash.
- request (::Google::Cloud::DiscoveryEngine::V1beta::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, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::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
ListUserLicensescall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListUserLicensesmust match the call that provided the page token. -
filter (::String) —
Optional. Filter for the list request.
Supported fields:
license_assignment_stateuser_principal* Examples:license_assignment_state = ASSIGNEDto list assigned user licenses.license_assignment_state = NO_LICENSEto list not licensed users.license_assignment_state = NO_LICENSE_ATTEMPTED_LOGINto list users who attempted login but no license assigned.license_assignment_state != NO_LICENSE_ATTEMPTED_LOGINto filter out users who attempted login but no license assigned.user_principal = user1@example.comto list user license foruser1@example.com.
-
order_by (::String) —
Optional. The order in which the UserLicenses are listed. The value must be a comma-separated list of fields. Default sorting order is ascending. To specify descending order for a field, append a " desc" suffix. Redundant space characters in the syntax are insignificant.
Supported fields (only
user_principalis supported for now):user_principal
If not set, the default ordering is by
user_principal.Examples:
user_principalto order byuser_principalin ascending order.user_principal descto order byuser_principalin descending order.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::UserLicense>)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::UserLicense>)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/discovery_engine/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::DiscoveryEngine::V1beta::UserLicenseService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::DiscoveryEngine::V1beta::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::V1beta::UserLicense. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::DiscoveryEngine::V1beta::UserLicenseService::Rest::OperationsGet the associated client for long-running operations.
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)