Package com.google.cloud.advisorynotifications.v1 (0.8.0)

A client to Advisory Notifications API

The interfaces provided are listed below, along with usage samples.

AdvisoryNotificationsServiceClient

Service Description: Service to manage Security and Privacy Notifications.

Sample for AdvisoryNotificationsServiceClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
     AdvisoryNotificationsServiceClient.create()) {
   NotificationName name = NotificationName.of("[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]");
   Notification response = advisoryNotificationsServiceClient.getNotification(name);
 }
 

Classes

AdvisoryNotificationsServiceClient

Service Description: Service to manage Security and Privacy Notifications.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
     AdvisoryNotificationsServiceClient.create()) {
   NotificationName name = NotificationName.of("[ORGANIZATION]", "[LOCATION]", "[NOTIFICATION]");
   Notification response = advisoryNotificationsServiceClient.getNotification(name);
 }
 

Note: close() needs to be called on the AdvisoryNotificationsServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of AdvisoryNotificationsServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 AdvisoryNotificationsServiceSettings advisoryNotificationsServiceSettings =
     AdvisoryNotificationsServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
     AdvisoryNotificationsServiceClient.create(advisoryNotificationsServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 AdvisoryNotificationsServiceSettings advisoryNotificationsServiceSettings =
     AdvisoryNotificationsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
     AdvisoryNotificationsServiceClient.create(advisoryNotificationsServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 AdvisoryNotificationsServiceSettings advisoryNotificationsServiceSettings =
     AdvisoryNotificationsServiceSettings.newHttpJsonBuilder().build();
 AdvisoryNotificationsServiceClient advisoryNotificationsServiceClient =
     AdvisoryNotificationsServiceClient.create(advisoryNotificationsServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

AdvisoryNotificationsServiceClient.ListNotificationsFixedSizeCollection

AdvisoryNotificationsServiceClient.ListNotificationsPage

AdvisoryNotificationsServiceClient.ListNotificationsPagedResponse

AdvisoryNotificationsServiceGrpc

Service to manage Security and Privacy Notifications.

AdvisoryNotificationsServiceGrpc.AdvisoryNotificationsServiceBlockingStub

A stub to allow clients to do synchronous rpc calls to service AdvisoryNotificationsService.

Service to manage Security and Privacy Notifications.

AdvisoryNotificationsServiceGrpc.AdvisoryNotificationsServiceFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service AdvisoryNotificationsService.

Service to manage Security and Privacy Notifications.

AdvisoryNotificationsServiceGrpc.AdvisoryNotificationsServiceImplBase

Base class for the server implementation of the service AdvisoryNotificationsService.

Service to manage Security and Privacy Notifications.

AdvisoryNotificationsServiceGrpc.AdvisoryNotificationsServiceStub

A stub to allow clients to do asynchronous rpc calls to service AdvisoryNotificationsService.

Service to manage Security and Privacy Notifications.

AdvisoryNotificationsServiceSettings

Settings class to configure an instance of AdvisoryNotificationsServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (advisorynotifications.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of getNotification to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 AdvisoryNotificationsServiceSettings.Builder advisoryNotificationsServiceSettingsBuilder =
     AdvisoryNotificationsServiceSettings.newBuilder();
 advisoryNotificationsServiceSettingsBuilder
     .getNotificationSettings()
     .setRetrySettings(
         advisoryNotificationsServiceSettingsBuilder
             .getNotificationSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 AdvisoryNotificationsServiceSettings advisoryNotificationsServiceSettings =
     advisoryNotificationsServiceSettingsBuilder.build();
 

AdvisoryNotificationsServiceSettings.Builder

Builder for AdvisoryNotificationsServiceSettings.

Attachment

Attachment with specific information about the issue.

Protobuf type google.cloud.advisorynotifications.v1.Attachment

Attachment.Builder

Attachment with specific information about the issue.

Protobuf type google.cloud.advisorynotifications.v1.Attachment

Csv

A representation of a CSV file attachment, as a list of column headers and a list of data rows.

Protobuf type google.cloud.advisorynotifications.v1.Csv

Csv.Builder

A representation of a CSV file attachment, as a list of column headers and a list of data rows.

Protobuf type google.cloud.advisorynotifications.v1.Csv

Csv.CsvRow

A representation of a single data row in a CSV file.

Protobuf type google.cloud.advisorynotifications.v1.Csv.CsvRow

Csv.CsvRow.Builder

A representation of a single data row in a CSV file.

Protobuf type google.cloud.advisorynotifications.v1.Csv.CsvRow

GetNotificationRequest

Request for fetching a notification.

Protobuf type google.cloud.advisorynotifications.v1.GetNotificationRequest

GetNotificationRequest.Builder

Request for fetching a notification.

Protobuf type google.cloud.advisorynotifications.v1.GetNotificationRequest

ListNotificationsRequest

Request for fetching all notifications for a given parent.

Protobuf type google.cloud.advisorynotifications.v1.ListNotificationsRequest

ListNotificationsRequest.Builder

Request for fetching all notifications for a given parent.

Protobuf type google.cloud.advisorynotifications.v1.ListNotificationsRequest

ListNotificationsResponse

Response of ListNotifications endpoint.

Protobuf type google.cloud.advisorynotifications.v1.ListNotificationsResponse

ListNotificationsResponse.Builder

Response of ListNotifications endpoint.

Protobuf type google.cloud.advisorynotifications.v1.ListNotificationsResponse

LocationName

LocationName.Builder

Builder for organizations/{organization}/locations/{location}.

Message

A message which contains notification details.

Protobuf type google.cloud.advisorynotifications.v1.Message

Message.Body

A message body containing text.

Protobuf type google.cloud.advisorynotifications.v1.Message.Body

Message.Body.Builder

A message body containing text.

Protobuf type google.cloud.advisorynotifications.v1.Message.Body

Message.Builder

A message which contains notification details.

Protobuf type google.cloud.advisorynotifications.v1.Message

Notification

A notification object for notifying customers about security and privacy issues.

Protobuf type google.cloud.advisorynotifications.v1.Notification

Notification.Builder

A notification object for notifying customers about security and privacy issues.

Protobuf type google.cloud.advisorynotifications.v1.Notification

NotificationName

NotificationName.Builder

Builder for organizations/{organization}/locations/{location}/notifications/{notification}.

ServiceProto

Subject

A subject line of a notification.

Protobuf type google.cloud.advisorynotifications.v1.Subject

Subject.Builder

A subject line of a notification.

Protobuf type google.cloud.advisorynotifications.v1.Subject

Text

A text object containing the English text and its localized copies.

Protobuf type google.cloud.advisorynotifications.v1.Text

Text.Builder

A text object containing the English text and its localized copies.

Protobuf type google.cloud.advisorynotifications.v1.Text

Interfaces

AdvisoryNotificationsServiceGrpc.AsyncService

Service to manage Security and Privacy Notifications.

AttachmentOrBuilder

Csv.CsvRowOrBuilder

CsvOrBuilder

GetNotificationRequestOrBuilder

ListNotificationsRequestOrBuilder

ListNotificationsResponseOrBuilder

Message.BodyOrBuilder

MessageOrBuilder

NotificationOrBuilder

SubjectOrBuilder

TextOrBuilder

Enums

Attachment.DataCase

LocalizationState

Status of localized text.

Protobuf enum google.cloud.advisorynotifications.v1.LocalizationState

NotificationType

Type of notification

Protobuf enum google.cloud.advisorynotifications.v1.NotificationType

NotificationView

Notification view.

Protobuf enum google.cloud.advisorynotifications.v1.NotificationView