1.2.0 (latest) 1.1.0 1.0.3 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.1 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::LintingService::Rest::Client.

REST client for the LintingService service.


<br />

This service provides all methods related to the 1p Linter.

## Inherits

- Object

## Includes

- [Google::Cloud::ApiHub::V1::LintingService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Paths)

## Methods

### .configure

    def self.configure() { |config| ... } -> Client::Configuration

Configure the LintingService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Rest-Client-Configuration "Google::Cloud::ApiHub::V1::LintingService::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Rest-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all LintingService clients
::Google::Cloud::ApiHub::V1::LintingService::Rest::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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Rest-Client#Google__Cloud__ApiHub__V1__LintingService__Rest__Client_configure_class_ "Google::Cloud::ApiHub::V1::LintingService::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Rest-Client-Configuration "Google::Cloud::ApiHub::V1::LintingService::Rest::Client::Configuration (class)")
for a description of the configuration fields.
**Yields**

- (config) --- Configure the Client client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Rest-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.
**Overloads**

    def get_style_guide(request, options = nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide

Pass arguments to `get_style_guide` via a request object, either of type [GetStyleGuideRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-GetStyleGuideRequest "Google::Cloud::ApiHub::V1::GetStyleGuideRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::ApiHub::V1::GetStyleGuideRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/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

Pass arguments to `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). **Parameter**

- **name** (::String) --- Required. The name of the spec to retrieve. Format: `projects/{project}/locations/{location}/plugins/{plugin}/styleGuide`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::ApiHub::V1::StyleGuide](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-StyleGuide))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::ApiHub::V1::StyleGuide](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-StyleGuide))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::LintingService::Rest::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.
**Overloads**

    def get_style_guide_contents(request, options = nil) -> ::Google::Cloud::ApiHub::V1::StyleGuideContents

Pass arguments to `get_style_guide_contents` via a request object, either of type [GetStyleGuideContentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-GetStyleGuideContentsRequest "Google::Cloud::ApiHub::V1::GetStyleGuideContentsRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::ApiHub::V1::GetStyleGuideContentsRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/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

Pass arguments to `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). **Parameter**

- **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`.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::ApiHub::V1::StyleGuideContents](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-StyleGuideContents))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::ApiHub::V1::StyleGuideContents](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-StyleGuideContents))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::LintingService::Rest::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 REST client object.
**Yields**

- (config) --- Configure the LintingService client.
**Yield Parameter**

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintingService-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::ApiHub::V1::LintingService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::ApiHub::V1::LintingService::Rest::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.
**Overloads**

    def lint_spec(request, options = nil) -> ::Google::Protobuf::Empty

Pass arguments to `lint_spec` via a request object, either of type [Google::Cloud::ApiHub::V1::LintSpecRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-LintSpecRequest "Google::Cloud::ApiHub::V1::LintSpecRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::ApiHub::V1::LintSpecRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/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

Pass arguments to `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). **Parameter**

- **name** (::String) --- Required. The name of the spec to be linted. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}`
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Protobuf-Empty))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Protobuf::Empty](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Protobuf-Empty))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::LintingService::Rest::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::Rest::Client

Get the associated client for mix-in of the Locations.
**Returns**

- (Google::Cloud::Location::Locations::Rest::Client)

### #logger

    def logger() -> Logger

The logger used for request/response debug logging.
**Returns**

- (Logger)

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (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.
**Overloads**

    def update_style_guide(request, options = nil) -> ::Google::Cloud::ApiHub::V1::StyleGuide

Pass arguments to `update_style_guide` via a request object, either of type [UpdateStyleGuideRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-UpdateStyleGuideRequest "Google::Cloud::ApiHub::V1::UpdateStyleGuideRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::ApiHub::V1::UpdateStyleGuideRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/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

Pass arguments to `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). **Parameters**

- **style_guide** ([::Google::Cloud::ApiHub::V1::StyleGuide](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-StyleGuide), ::Hash) --- Required. The Style guide resource to update.
- **update_mask** ([::Google::Protobuf::FieldMask](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Protobuf-FieldMask), ::Hash) --- Optional. The list of fields to update.
**Yields**

- (result, operation) --- Access the result along with the TransportOperation object
**Yield Parameters**

- **result** ([::Google::Cloud::ApiHub::V1::StyleGuide](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-StyleGuide))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::ApiHub::V1::StyleGuide](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_hub-v1/latest/Google-Cloud-ApiHub-V1-StyleGuide))
**Raises**

- (::Google::Cloud::Error) --- if the REST call is aborted.
**Example**

Basic example

```ruby
require "google/cloud/api_hub/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::ApiHub::V1::LintingService::Rest::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
```