Advisory Notifications V1 API - Class Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::Rest::Client (v0.2.0)

Reference documentation and code samples for the Advisory Notifications V1 API class Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::Rest::Client.

REST client for the AdvisoryNotificationsService service.

Service to manage Security and Privacy Notifications.

Inherits

  • Object

Methods

.configure

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

Configure the AdvisoryNotificationsService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all AdvisoryNotificationsService clients
::Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the AdvisoryNotificationsService 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#get_notification

def get_notification(request, options = nil) -> ::Google::Cloud::AdvisoryNotifications::V1::Notification
def get_notification(name: nil, language_code: nil) -> ::Google::Cloud::AdvisoryNotifications::V1::Notification

Gets a notification.

Overloads
def get_notification(request, options = nil) -> ::Google::Cloud::AdvisoryNotifications::V1::Notification
Pass arguments to get_notification via a request object, either of type GetNotificationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AdvisoryNotifications::V1::GetNotificationRequest, ::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_notification(name: nil, language_code: nil) -> ::Google::Cloud::AdvisoryNotifications::V1::Notification
Pass arguments to get_notification 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
  • name (::String) — Required. A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{notification}.
  • language_code (::String) — ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#initialize

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

Create a new AdvisoryNotificationsService REST client object.

Yields
  • (config) — Configure the AdvisoryNotificationsService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::AdvisoryNotifications::V1::AdvisoryNotificationsService::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_notifications

def list_notifications(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AdvisoryNotifications::V1::Notification>
def list_notifications(parent: nil, page_size: nil, page_token: nil, view: nil, language_code: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AdvisoryNotifications::V1::Notification>

Lists notifications under a given parent.

Overloads
def list_notifications(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AdvisoryNotifications::V1::Notification>
Pass arguments to list_notifications via a request object, either of type ListNotificationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AdvisoryNotifications::V1::ListNotificationsRequest, ::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_notifications(parent: nil, page_size: nil, page_token: nil, view: nil, language_code: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AdvisoryNotifications::V1::Notification>
Pass arguments to list_notifications 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 parent, which owns this collection of notifications. Must be of the form "organizations/{organization}/locations/{location}".
  • page_size (::Integer) — The maximum number of notifications to return. The service may return fewer than this value. If unspecified or equal to 0, at most 50 notifications will be returned. The maximum value is 50; values above 50 will be coerced to 50.
  • page_token (::String) — A page token returned from a previous request. When paginating, all other parameters provided in the request must match the call that returned the page token.
  • view (::Google::Cloud::AdvisoryNotifications::V1::NotificationView) — Specifies which parts of the notification resource should be returned in the response.
  • language_code (::String) — ISO code for requested localization language. If unset, will be interpereted as "en". If the requested language is valid, but not supported for this notification, English will be returned with an "Not applicable" LocalizationState. If the ISO code is invalid (i.e. not a real language), this RPC will throw an error.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.