Reference documentation and code samples for the App Optimize V1BETA API class Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.
Client for the AppOptimize service.
Service for managing and querying optimization reports.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the AppOptimize Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all AppOptimize clients ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the AppOptimize 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_report
def create_report(request, options = nil) -> ::Gapic::Operation
def create_report(parent: nil, report_id: nil, report: nil) -> ::Gapic::OperationCreates a new report.
This initiates a long-running operation that, upon completion, results
in a report resource. Once the report is created, its results can be read
via ReadReport.
def create_report(request, options = nil) -> ::Gapic::Operationcreate_report via a request object, either of type
CreateReportRequest or an equivalent Hash.
- request (::Google::Cloud::Appoptimize::V1beta::CreateReportRequest, ::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_report(parent: nil, report_id: nil, report: nil) -> ::Gapic::Operationcreate_report 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 Google Cloud project that will own the report.
This value does not define the scope of the report data. See
Report.scopefor setting the data scope.Format:
projects/{project}/locations/{location}. - report_id (::String) — Required. The ID to use for this report. This ID must be unique within the parent project and should comply with RFC 1034 restrictions (letters, numbers, and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum).
- report (::Google::Cloud::Appoptimize::V1beta::Report, ::Hash) — Required. The report resource to create.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/appoptimize/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Appoptimize::V1beta::CreateReportRequest.new # Call the create_report method. result = client.create_report 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
#delete_report
def delete_report(request, options = nil) -> ::Google::Protobuf::Empty
def delete_report(name: nil, allow_missing: nil) -> ::Google::Protobuf::EmptyDeletes the specified report.
def delete_report(request, options = nil) -> ::Google::Protobuf::Emptydelete_report via a request object, either of type
DeleteReportRequest or an equivalent Hash.
- request (::Google::Cloud::Appoptimize::V1beta::DeleteReportRequest, ::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_report(name: nil, allow_missing: nil) -> ::Google::Protobuf::Emptydelete_report 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 name of the report to delete.
Format:
projects/{project}/locations/{location}/reports/{report_id}. - allow_missing (::Boolean) — Optional. If set to true, and the report is not found, the request will succeed but no action will be taken on the server.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/appoptimize/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Appoptimize::V1beta::DeleteReportRequest.new # Call the delete_report method. result = client.delete_report request # The returned object is of type Google::Protobuf::Empty. p result
#get_report
def get_report(request, options = nil) -> ::Google::Cloud::Appoptimize::V1beta::Report
def get_report(name: nil) -> ::Google::Cloud::Appoptimize::V1beta::ReportRetrieves the details of a report configuration.
def get_report(request, options = nil) -> ::Google::Cloud::Appoptimize::V1beta::Reportget_report via a request object, either of type
GetReportRequest or an equivalent Hash.
- request (::Google::Cloud::Appoptimize::V1beta::GetReportRequest, ::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_report(name: nil) -> ::Google::Cloud::Appoptimize::V1beta::Reportget_report 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 name of the report to retrieve.
Format:
projects/{project}/locations/{location}/reports/{report_id}.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Appoptimize::V1beta::Report)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/appoptimize/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Appoptimize::V1beta::GetReportRequest.new # Call the get_report method. result = client.get_report request # The returned object is of type Google::Cloud::Appoptimize::V1beta::Report. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new AppOptimize client object.
- (config) — Configure the AppOptimize client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new do |config| config.timeout = 10.0 end
#list_reports
def list_reports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>
def list_reports(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>Lists reports within a given project.
def list_reports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>list_reports via a request object, either of type
ListReportsRequest or an equivalent Hash.
- request (::Google::Cloud::Appoptimize::V1beta::ListReportsRequest, ::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_reports(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>list_reports 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 project whose reports are to be listed.
Format:
projects/{project}/locations/{location}. - page_size (::Integer) — Optional. The maximum number of reports to return. The service may return fewer than this value. If unspecified, the server will determine the number of results to return.
-
page_token (::String) — Optional. A page token, received from a previous
ListReportscall. Provide this to retrieve the subsequent page.When paginating, all other parameters provided to
ListReportsmust match the call that provided the page token.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Appoptimize::V1beta::Report>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/appoptimize/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Appoptimize::V1beta::ListReportsRequest.new # Call the list_reports method. result = client.list_reports 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::Appoptimize::V1beta::Report. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::Appoptimize::V1beta::AppOptimize::OperationsGet the associated client for long-running operations.
#read_report
def read_report(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>
def read_report(name: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>Reads data within a specified report.
def read_report(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>read_report via a request object, either of type
ReadReportRequest or an equivalent Hash.
- request (::Google::Cloud::Appoptimize::V1beta::ReadReportRequest, ::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 read_report(name: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>read_report 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 report to query.
Format:
projects/{project}/locations/{location}/reports/{report_id}. - page_size (::Integer) — Optional. The maximum number of rows to return. The service may return fewer than this value. If unspecified, at most 10,000 rows will be returned per page. The maximum allowed value is 25,000; values above 25,000 are coerced to 25,000.
-
page_token (::String) — Optional. A page token, received from a previous
ReadReportcall, to retrieve the subsequent page of results. Whenpage_tokenis specified,job_referencemust also be provided from the previous response, and thestatementfield must not be set.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Protobuf::ListValue>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/appoptimize/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Appoptimize::V1beta::AppOptimize::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Appoptimize::V1beta::ReadReportRequest.new # Call the read_report method. result = client.read_report 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::Protobuf::ListValue. p item end
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)