# Phishing Protection V1beta1 API - Class Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::Rest::Client (v0.16.0)

0.16.0 (latest) 0.15.1 0.14.0 0.13.1 0.12.0 0.11.1 0.10.0 0.9.2 0.8.2 0.7.0 0.6.1 0.5.0 0.4.0 0.3.5 Reference documentation and code samples for the Phishing Protection V1beta1 API class Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::Rest::Client.

REST client for the PhishingProtectionService service.


<br />

Service to report phishing URIs.

## Inherits

- Object

## Includes

- [Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::Paths](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Paths)

## Methods

### .configure

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

Configure the PhishingProtectionService Client class.


<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Rest-Client-Configuration "Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::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-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Rest-Client-Configuration))
**Example**

```ruby
# Modify the configuration for all PhishingProtectionService clients
::Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::Rest::Client.configure do |config|
  config.timeout = 10.0
end
```

### #configure

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

Configure the PhishingProtectionService 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-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Rest-Client#Google__Cloud__PhishingProtection__V1beta1__PhishingProtectionService__Rest__Client_configure_class_ "Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::Rest::Client.configure (method)").

<br />

See [Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Rest-Client-Configuration "Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::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-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Rest-Client-Configuration))
**Returns**

- ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Rest-Client-Configuration))

### #initialize

    def initialize() { |config| ... } -> Client

Create a new PhishingProtectionService REST client object.
**Yields**

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

- **config** ([Client::Configuration](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Rest-Client-Configuration))
**Returns**

- ([Client](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-PhishingProtectionService-Rest-Client)) --- a new instance of Client
**Example**

```ruby
# Create a client using the default configuration
client = ::Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::Rest::Client.new do |config|
  config.timeout = 10.0
end
```

### #logger

    def logger() -> Logger

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

- (Logger)

### #report_phishing

    def report_phishing(request, options = nil) -> ::Google::Cloud::PhishingProtection::V1beta1::ReportPhishingResponse
    def report_phishing(parent: nil, uri: nil) -> ::Google::Cloud::PhishingProtection::V1beta1::ReportPhishingResponse

Reports a URI suspected of containing phishing content to be reviewed. Once
the report review is complete, its result can be found in the Cloud
Security Command Center findings dashboard for Phishing Protection. If the
result verifies the existence of malicious phishing content, the site will
be added the to [Google's Social Engineering
lists](https://support.google.com/webmasters/answer/6350487/) in order to
protect users that could get exposed to this threat in the future.
**Overloads**

    def report_phishing(request, options = nil) -> ::Google::Cloud::PhishingProtection::V1beta1::ReportPhishingResponse

Pass arguments to `report_phishing` via a request object, either of type [ReportPhishingRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-ReportPhishingRequest "Google::Cloud::PhishingProtection::V1beta1::ReportPhishingRequest (class)") or an equivalent Hash. **Parameters**

- **request** ([::Google::Cloud::PhishingProtection::V1beta1::ReportPhishingRequest](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-ReportPhishingRequest), ::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 report_phishing(parent: nil, uri: nil) -> ::Google::Cloud::PhishingProtection::V1beta1::ReportPhishingResponse

Pass arguments to `report_phishing` 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**

- **parent** (::String) --- Required. The name of the project for which the report will be created, in the format "projects/{project_number}".
- **uri** (::String) --- Required. The URI that is being reported for phishing content to be analyzed.
**Yields**

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

- **result** ([::Google::Cloud::PhishingProtection::V1beta1::ReportPhishingResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-ReportPhishingResponse))
- **operation** (::Gapic::Rest::TransportOperation)
**Returns**

- ([::Google::Cloud::PhishingProtection::V1beta1::ReportPhishingResponse](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-phishing_protection-v1beta1/latest/Google-Cloud-PhishingProtection-V1beta1-ReportPhishingResponse))
**Raises**

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

Basic example

```ruby
require "google/cloud/phishing_protection/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::PhishingProtection::V1beta1::PhishingProtectionService::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::PhishingProtection::V1beta1::ReportPhishingRequest.new

# Call the report_phishing method.
result = client.report_phishing request

# The returned object is of type Google::Cloud::PhishingProtection::V1beta1::ReportPhishingResponse.
p result
```

### #universe_domain

    def universe_domain() -> String

The effective universe domain
**Returns**

- (String)