Variables
NotificationView_name, NotificationView_value
var (
NotificationView_name = map[int32]string{
0: "NOTIFICATION_VIEW_UNSPECIFIED",
1: "BASIC",
2: "FULL",
}
NotificationView_value = map[string]int32{
"NOTIFICATION_VIEW_UNSPECIFIED": 0,
"BASIC": 1,
"FULL": 2,
}
)
Enum value maps for NotificationView.
LocalizationState_name, LocalizationState_value
var (
LocalizationState_name = map[int32]string{
0: "LOCALIZATION_STATE_UNSPECIFIED",
1: "LOCALIZATION_STATE_NOT_APPLICABLE",
2: "LOCALIZATION_STATE_PENDING",
3: "LOCALIZATION_STATE_COMPLETED",
}
LocalizationState_value = map[string]int32{
"LOCALIZATION_STATE_UNSPECIFIED": 0,
"LOCALIZATION_STATE_NOT_APPLICABLE": 1,
"LOCALIZATION_STATE_PENDING": 2,
"LOCALIZATION_STATE_COMPLETED": 3,
}
)
Enum value maps for LocalizationState.
NotificationType_name, NotificationType_value
var (
NotificationType_name = map[int32]string{
0: "NOTIFICATION_TYPE_UNSPECIFIED",
1: "NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY",
2: "NOTIFICATION_TYPE_SENSITIVE_ACTIONS",
}
NotificationType_value = map[string]int32{
"NOTIFICATION_TYPE_UNSPECIFIED": 0,
"NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY": 1,
"NOTIFICATION_TYPE_SENSITIVE_ACTIONS": 2,
}
)
Enum value maps for NotificationType.
File_google_cloud_advisorynotifications_v1_service_proto
var File_google_cloud_advisorynotifications_v1_service_proto protoreflect.FileDescriptor
Functions
func RegisterAdvisoryNotificationsServiceServer
func RegisterAdvisoryNotificationsServiceServer(s *grpc.Server, srv AdvisoryNotificationsServiceServer)
AdvisoryNotificationsServiceClient
type AdvisoryNotificationsServiceClient interface {
// Lists notifications under a given parent.
ListNotifications(ctx context.Context, in *ListNotificationsRequest, opts ...grpc.CallOption) (*ListNotificationsResponse, error)
// Gets a notification.
GetNotification(ctx context.Context, in *GetNotificationRequest, opts ...grpc.CallOption) (*Notification, error)
}
AdvisoryNotificationsServiceClient is the client API for AdvisoryNotificationsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAdvisoryNotificationsServiceClient
func NewAdvisoryNotificationsServiceClient(cc grpc.ClientConnInterface) AdvisoryNotificationsServiceClient
AdvisoryNotificationsServiceServer
type AdvisoryNotificationsServiceServer interface {
// Lists notifications under a given parent.
ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error)
// Gets a notification.
GetNotification(context.Context, *GetNotificationRequest) (*Notification, error)
}
AdvisoryNotificationsServiceServer is the server API for AdvisoryNotificationsService service.
Attachment
type Attachment struct {
// Data type of the attachment.
//
// Types that are assignable to Data:
// *Attachment_Csv
Data isAttachment_Data `protobuf_oneof:"data"`
// The title of the attachment.
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// contains filtered or unexported fields
}
Attachment with specific information about the issue.
func (*Attachment) Descriptor
func (*Attachment) Descriptor() ([]byte, []int)
Deprecated: Use Attachment.ProtoReflect.Descriptor instead.
func (*Attachment) GetCsv
func (x *Attachment) GetCsv() *Csv
func (*Attachment) GetData
func (m *Attachment) GetData() isAttachment_Data
func (*Attachment) GetDisplayName
func (x *Attachment) GetDisplayName() string
func (*Attachment) ProtoMessage
func (*Attachment) ProtoMessage()
func (*Attachment) ProtoReflect
func (x *Attachment) ProtoReflect() protoreflect.Message
func (*Attachment) Reset
func (x *Attachment) Reset()
func (*Attachment) String
func (x *Attachment) String() string
Attachment_Csv
type Attachment_Csv struct {
// A CSV file attachment. Max size is 10 MB.
Csv *Csv `protobuf:"bytes,2,opt,name=csv,proto3,oneof"`
}
Csv
type Csv struct {
// The list of headers for data columns in a CSV file.
Headers []string `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
// The list of data rows in a CSV file, as string arrays rather than as a
// single comma-separated string.
DataRows []*Csv_CsvRow `protobuf:"bytes,2,rep,name=data_rows,json=dataRows,proto3" json:"data_rows,omitempty"`
// contains filtered or unexported fields
}
A representation of a CSV file attachment, as a list of column headers and a list of data rows.
func (*Csv) Descriptor
Deprecated: Use Csv.ProtoReflect.Descriptor instead.
func (*Csv) GetDataRows
func (x *Csv) GetDataRows() []*Csv_CsvRow
func (*Csv) GetHeaders
func (*Csv) ProtoMessage
func (*Csv) ProtoMessage()
func (*Csv) ProtoReflect
func (x *Csv) ProtoReflect() protoreflect.Message
func (*Csv) Reset
func (x *Csv) Reset()
func (*Csv) String
Csv_CsvRow
type Csv_CsvRow struct {
// The data entries in a CSV file row, as a string array rather than a
// single comma-separated string.
Entries []string `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
// contains filtered or unexported fields
}
A representation of a single data row in a CSV file.
func (*Csv_CsvRow) Descriptor
func (*Csv_CsvRow) Descriptor() ([]byte, []int)
Deprecated: Use Csv_CsvRow.ProtoReflect.Descriptor instead.
func (*Csv_CsvRow) GetEntries
func (x *Csv_CsvRow) GetEntries() []string
func (*Csv_CsvRow) ProtoMessage
func (*Csv_CsvRow) ProtoMessage()
func (*Csv_CsvRow) ProtoReflect
func (x *Csv_CsvRow) ProtoReflect() protoreflect.Message
func (*Csv_CsvRow) Reset
func (x *Csv_CsvRow) Reset()
func (*Csv_CsvRow) String
func (x *Csv_CsvRow) String() string
GetNotificationRequest
type GetNotificationRequest struct {
// Required. A name of the notification to retrieve.
// Format:
// organizations/{organization}/locations/{location}/notifications/{notification}.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// 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.
LanguageCode string `protobuf:"bytes,5,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// contains filtered or unexported fields
}
Request for fetching a notification.
func (*GetNotificationRequest) Descriptor
func (*GetNotificationRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetNotificationRequest.ProtoReflect.Descriptor instead.
func (*GetNotificationRequest) GetLanguageCode
func (x *GetNotificationRequest) GetLanguageCode() string
func (*GetNotificationRequest) GetName
func (x *GetNotificationRequest) GetName() string
func (*GetNotificationRequest) ProtoMessage
func (*GetNotificationRequest) ProtoMessage()
func (*GetNotificationRequest) ProtoReflect
func (x *GetNotificationRequest) ProtoReflect() protoreflect.Message
func (*GetNotificationRequest) Reset
func (x *GetNotificationRequest) Reset()
func (*GetNotificationRequest) String
func (x *GetNotificationRequest) String() string
ListNotificationsRequest
type ListNotificationsRequest struct {
// Required. The parent, which owns this collection of notifications.
// Must be of the form "organizations/{organization}/locations/{location}".
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// 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.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// 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.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// Specifies which parts of the notification resource should be returned
// in the response.
View NotificationView `protobuf:"varint,4,opt,name=view,proto3,enum=google.cloud.advisorynotifications.v1.NotificationView" json:"view,omitempty"`
// 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.
LanguageCode string `protobuf:"bytes,5,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// contains filtered or unexported fields
}
Request for fetching all notifications for a given parent.
func (*ListNotificationsRequest) Descriptor
func (*ListNotificationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListNotificationsRequest.ProtoReflect.Descriptor instead.
func (*ListNotificationsRequest) GetLanguageCode
func (x *ListNotificationsRequest) GetLanguageCode() string
func (*ListNotificationsRequest) GetPageSize
func (x *ListNotificationsRequest) GetPageSize() int32
func (*ListNotificationsRequest) GetPageToken
func (x *ListNotificationsRequest) GetPageToken() string
func (*ListNotificationsRequest) GetParent
func (x *ListNotificationsRequest) GetParent() string
func (*ListNotificationsRequest) GetView
func (x *ListNotificationsRequest) GetView() NotificationView
func (*ListNotificationsRequest) ProtoMessage
func (*ListNotificationsRequest) ProtoMessage()
func (*ListNotificationsRequest) ProtoReflect
func (x *ListNotificationsRequest) ProtoReflect() protoreflect.Message
func (*ListNotificationsRequest) Reset
func (x *ListNotificationsRequest) Reset()
func (*ListNotificationsRequest) String
func (x *ListNotificationsRequest) String() string
ListNotificationsResponse
type ListNotificationsResponse struct {
// List of notifications under a given parent.
Notifications []*Notification `protobuf:"bytes,1,rep,name=notifications,proto3" json:"notifications,omitempty"`
// A token, which can be sent as `page_token` to retrieve the next page.
// If this field is omitted, there are no subsequent pages.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// Estimation of a total number of notifications.
TotalSize int32 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
// contains filtered or unexported fields
}
Response of ListNotifications endpoint.
func (*ListNotificationsResponse) Descriptor
func (*ListNotificationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListNotificationsResponse.ProtoReflect.Descriptor instead.
func (*ListNotificationsResponse) GetNextPageToken
func (x *ListNotificationsResponse) GetNextPageToken() string
func (*ListNotificationsResponse) GetNotifications
func (x *ListNotificationsResponse) GetNotifications() []*Notification
func (*ListNotificationsResponse) GetTotalSize
func (x *ListNotificationsResponse) GetTotalSize() int32
func (*ListNotificationsResponse) ProtoMessage
func (*ListNotificationsResponse) ProtoMessage()
func (*ListNotificationsResponse) ProtoReflect
func (x *ListNotificationsResponse) ProtoReflect() protoreflect.Message
func (*ListNotificationsResponse) Reset
func (x *ListNotificationsResponse) Reset()
func (*ListNotificationsResponse) String
func (x *ListNotificationsResponse) String() string
LocalizationState
type LocalizationState int32
Status of localized text.
LocalizationState_LOCALIZATION_STATE_UNSPECIFIED, LocalizationState_LOCALIZATION_STATE_NOT_APPLICABLE, LocalizationState_LOCALIZATION_STATE_PENDING, LocalizationState_LOCALIZATION_STATE_COMPLETED
const (
// Not used.
LocalizationState_LOCALIZATION_STATE_UNSPECIFIED LocalizationState = 0
// Localization is not applicable for requested language. This can happen
// when:
// - The requested language was not supported by Advisory Notifications at the
// time of localization (including notifications created before the
// localization feature was launched).
// - The requested language is English, so only the English text is returned.
LocalizationState_LOCALIZATION_STATE_NOT_APPLICABLE LocalizationState = 1
// Localization for requested language is in progress, and not ready yet.
LocalizationState_LOCALIZATION_STATE_PENDING LocalizationState = 2
// Localization for requested language is completed.
LocalizationState_LOCALIZATION_STATE_COMPLETED LocalizationState = 3
)
func (LocalizationState) Descriptor
func (LocalizationState) Descriptor() protoreflect.EnumDescriptor
func (LocalizationState) Enum
func (x LocalizationState) Enum() *LocalizationState
func (LocalizationState) EnumDescriptor
func (LocalizationState) EnumDescriptor() ([]byte, []int)
Deprecated: Use LocalizationState.Descriptor instead.
func (LocalizationState) Number
func (x LocalizationState) Number() protoreflect.EnumNumber
func (LocalizationState) String
func (x LocalizationState) String() string
func (LocalizationState) Type
func (LocalizationState) Type() protoreflect.EnumType
Message
type Message struct {
// The message content.
Body *Message_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"`
// The attachments to download.
Attachments []*Attachment `protobuf:"bytes,2,rep,name=attachments,proto3" json:"attachments,omitempty"`
// The Message creation timestamp.
CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Time when Message was localized
LocalizationTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=localization_time,json=localizationTime,proto3" json:"localization_time,omitempty"`
// contains filtered or unexported fields
}
A message which contains notification details.
func (*Message) Descriptor
Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) GetAttachments
func (x *Message) GetAttachments() []*Attachment
func (*Message) GetBody
func (x *Message) GetBody() *Message_Body
func (*Message) GetCreateTime
func (x *Message) GetCreateTime() *timestamppb.Timestamp
func (*Message) GetLocalizationTime
func (x *Message) GetLocalizationTime() *timestamppb.Timestamp
func (*Message) ProtoMessage
func (*Message) ProtoMessage()
func (*Message) ProtoReflect
func (x *Message) ProtoReflect() protoreflect.Message
func (*Message) Reset
func (x *Message) Reset()
func (*Message) String
Message_Body
type Message_Body struct {
// The text content of the message body.
Text *Text `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
// contains filtered or unexported fields
}
A message body containing text.
func (*Message_Body) Descriptor
func (*Message_Body) Descriptor() ([]byte, []int)
Deprecated: Use Message_Body.ProtoReflect.Descriptor instead.
func (*Message_Body) GetText
func (x *Message_Body) GetText() *Text
func (*Message_Body) ProtoMessage
func (*Message_Body) ProtoMessage()
func (*Message_Body) ProtoReflect
func (x *Message_Body) ProtoReflect() protoreflect.Message
func (*Message_Body) Reset
func (x *Message_Body) Reset()
func (*Message_Body) String
func (x *Message_Body) String() string
Notification
type Notification struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Subject *Subject `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"`
CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
NotificationType NotificationType "" /* 171 byte string literal not displayed */
}
A notification object for notifying customers about security and privacy issues.
func (*Notification) Descriptor
func (*Notification) Descriptor() ([]byte, []int)
Deprecated: Use Notification.ProtoReflect.Descriptor instead.
func (*Notification) GetCreateTime
func (x *Notification) GetCreateTime() *timestamppb.Timestamp
func (*Notification) GetMessages
func (x *Notification) GetMessages() []*Message
func (*Notification) GetName
func (x *Notification) GetName() string
func (*Notification) GetNotificationType
func (x *Notification) GetNotificationType() NotificationType
func (*Notification) GetSubject
func (x *Notification) GetSubject() *Subject
func (*Notification) ProtoMessage
func (*Notification) ProtoMessage()
func (*Notification) ProtoReflect
func (x *Notification) ProtoReflect() protoreflect.Message
func (*Notification) Reset
func (x *Notification) Reset()
func (*Notification) String
func (x *Notification) String() string
NotificationType
type NotificationType int32
Type of notification
NotificationType_NOTIFICATION_TYPE_UNSPECIFIED, NotificationType_NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY, NotificationType_NOTIFICATION_TYPE_SENSITIVE_ACTIONS
const (
// Default type
NotificationType_NOTIFICATION_TYPE_UNSPECIFIED NotificationType = 0
// Security and privacy advisory notifications
NotificationType_NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY NotificationType = 1
// Sensitive action notifications
NotificationType_NOTIFICATION_TYPE_SENSITIVE_ACTIONS NotificationType = 2
)
func (NotificationType) Descriptor
func (NotificationType) Descriptor() protoreflect.EnumDescriptor
func (NotificationType) Enum
func (x NotificationType) Enum() *NotificationType
func (NotificationType) EnumDescriptor
func (NotificationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use NotificationType.Descriptor instead.
func (NotificationType) Number
func (x NotificationType) Number() protoreflect.EnumNumber
func (NotificationType) String
func (x NotificationType) String() string
func (NotificationType) Type
func (NotificationType) Type() protoreflect.EnumType
NotificationView
type NotificationView int32
Notification view.
NotificationView_NOTIFICATION_VIEW_UNSPECIFIED, NotificationView_BASIC, NotificationView_FULL
const (
// Not specified, equivalent to BASIC.
NotificationView_NOTIFICATION_VIEW_UNSPECIFIED NotificationView = 0
// Server responses only include title, creation time and Notification ID.
// Note: for internal use responses also include the last update time,
// the latest message text and whether notification has attachments.
NotificationView_BASIC NotificationView = 1
// Include everything.
NotificationView_FULL NotificationView = 2
)
func (NotificationView) Descriptor
func (NotificationView) Descriptor() protoreflect.EnumDescriptor
func (NotificationView) Enum
func (x NotificationView) Enum() *NotificationView
func (NotificationView) EnumDescriptor
func (NotificationView) EnumDescriptor() ([]byte, []int)
Deprecated: Use NotificationView.Descriptor instead.
func (NotificationView) Number
func (x NotificationView) Number() protoreflect.EnumNumber
func (NotificationView) String
func (x NotificationView) String() string
func (NotificationView) Type
func (NotificationView) Type() protoreflect.EnumType
Subject
type Subject struct {
// The text content.
Text *Text `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
// contains filtered or unexported fields
}
A subject line of a notification.
func (*Subject) Descriptor
Deprecated: Use Subject.ProtoReflect.Descriptor instead.
func (*Subject) GetText
func (*Subject) ProtoMessage
func (*Subject) ProtoMessage()
func (*Subject) ProtoReflect
func (x *Subject) ProtoReflect() protoreflect.Message
func (*Subject) Reset
func (x *Subject) Reset()
func (*Subject) String
Text
type Text struct {
EnText string `protobuf:"bytes,1,opt,name=en_text,json=enText,proto3" json:"en_text,omitempty"`
LocalizedText string `protobuf:"bytes,2,opt,name=localized_text,json=localizedText,proto3" json:"localized_text,omitempty"`
LocalizationState LocalizationState "" /* 174 byte string literal not displayed */
}
A text object containing the English text and its localized copies.
func (*Text) Descriptor
Deprecated: Use Text.ProtoReflect.Descriptor instead.
func (*Text) GetEnText
func (*Text) GetLocalizationState
func (x *Text) GetLocalizationState() LocalizationState
func (*Text) GetLocalizedText
func (*Text) ProtoMessage
func (*Text) ProtoMessage()
func (*Text) ProtoReflect
func (x *Text) ProtoReflect() protoreflect.Message
func (*Text) Reset
func (x *Text) Reset()
func (*Text) String
UnimplementedAdvisoryNotificationsServiceServer
type UnimplementedAdvisoryNotificationsServiceServer struct {
}
UnimplementedAdvisoryNotificationsServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedAdvisoryNotificationsServiceServer) GetNotification
func (*UnimplementedAdvisoryNotificationsServiceServer) GetNotification(context.Context, *GetNotificationRequest) (*Notification, error)
func (*UnimplementedAdvisoryNotificationsServiceServer) ListNotifications
func (*UnimplementedAdvisoryNotificationsServiceServer) ListNotifications(context.Context, *ListNotificationsRequest) (*ListNotificationsResponse, error)