Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::LintingService::Client.
Client for the LintingService service.
This service provides all methods related to the 1p Linter.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the LintingService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all LintingService clients ::Google::Cloud::ApiHub::V1::LintingService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the LintingService 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)
#get_style_guide
def get_style_guide(request, options = nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide
def get_style_guide(name: nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide
Get the style guide being used for linting.
def get_style_guide(request, options = nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide
get_style_guide
via a request object, either of type
GetStyleGuideRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::GetStyleGuideRequest, ::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_style_guide(name: nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide
get_style_guide
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 spec to retrieve.
Format:
projects/{project}/locations/{location}/plugins/{plugin}/styleGuide
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::ApiHub::V1::StyleGuide)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::LintingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::GetStyleGuideRequest.new # Call the get_style_guide method. result = client.get_style_guide request # The returned object is of type Google::Cloud::ApiHub::V1::StyleGuide. p result
#get_style_guide_contents
def get_style_guide_contents(request, options = nil) -> ::Google::Cloud::ApiHub::V1::StyleGuideContents
def get_style_guide_contents(name: nil) -> ::Google::Cloud::ApiHub::V1::StyleGuideContents
Get the contents of the style guide.
def get_style_guide_contents(request, options = nil) -> ::Google::Cloud::ApiHub::V1::StyleGuideContents
get_style_guide_contents
via a request object, either of type
GetStyleGuideContentsRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::GetStyleGuideContentsRequest, ::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_style_guide_contents(name: nil) -> ::Google::Cloud::ApiHub::V1::StyleGuideContents
get_style_guide_contents
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 StyleGuide whose contents need to be retrieved.
There is exactly one style guide resource per project per location.
The expected format is
projects/{project}/locations/{location}/plugins/{plugin}/styleGuide
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::ApiHub::V1::StyleGuideContents)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::LintingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::GetStyleGuideContentsRequest.new # Call the get_style_guide_contents method. result = client.get_style_guide_contents request # The returned object is of type Google::Cloud::ApiHub::V1::StyleGuideContents. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new LintingService client object.
- (config) — Configure the LintingService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::ApiHub::V1::LintingService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::ApiHub::V1::LintingService::Client.new do |config| config.timeout = 10.0 end
#lint_spec
def lint_spec(request, options = nil) -> ::Google::Protobuf::Empty
def lint_spec(name: nil) -> ::Google::Protobuf::Empty
Lints the requested spec and updates the corresponding API Spec with the lint response. This lint response will be available in all subsequent Get and List Spec calls to Core service.
def lint_spec(request, options = nil) -> ::Google::Protobuf::Empty
lint_spec
via a request object, either of type
Google::Cloud::ApiHub::V1::LintSpecRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::LintSpecRequest, ::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 lint_spec(name: nil) -> ::Google::Protobuf::Empty
lint_spec
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 spec to be linted.
Format:
projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
- (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/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::LintingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::LintSpecRequest.new # Call the lint_spec method. result = client.lint_spec request # The returned object is of type Google::Protobuf::Empty. p result
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_style_guide
def update_style_guide(request, options = nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide
def update_style_guide(style_guide: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide
Update the styleGuide to be used for liniting in by API hub.
def update_style_guide(request, options = nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide
update_style_guide
via a request object, either of type
UpdateStyleGuideRequest or an equivalent Hash.
- request (::Google::Cloud::ApiHub::V1::UpdateStyleGuideRequest, ::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_style_guide(style_guide: nil, update_mask: nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide
update_style_guide
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).
- style_guide (::Google::Cloud::ApiHub::V1::StyleGuide, ::Hash) — Required. The Style guide resource to update.
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. The list of fields to update.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::ApiHub::V1::StyleGuide)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/api_hub/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::ApiHub::V1::LintingService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::ApiHub::V1::UpdateStyleGuideRequest.new # Call the update_style_guide method. result = client.update_style_guide request # The returned object is of type Google::Cloud::ApiHub::V1::StyleGuide. p result