Documentation ¶
Overview ¶
Package advisorynotifications provides access to the Advisory Notifications API.
For product documentation, see: https://cloud.google.com/advisory-notifications
Library status ¶
These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.
When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.
Creating a client ¶
Usage example:
import "google.golang.org/api/advisorynotifications/v1" ... ctx := context.Background() advisorynotificationsService, err := advisorynotifications.NewService(ctx)
In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
Other authentication options ¶
To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:
advisorynotificationsService, err := advisorynotifications.NewService(ctx, option.WithAPIKey("AIza..."))
To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:
config := &oauth2.Config{...} // ... token, err := config.Exchange(ctx, ...) advisorynotificationsService, err := advisorynotifications.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
See google.golang.org/api/option.ClientOption for details on options.
Index ¶
- Constants
- type GoogleCloudAdvisorynotificationsV1Attachment
- type GoogleCloudAdvisorynotificationsV1Csv
- type GoogleCloudAdvisorynotificationsV1CsvCsvRow
- type GoogleCloudAdvisorynotificationsV1ListNotificationsResponse
- type GoogleCloudAdvisorynotificationsV1Message
- type GoogleCloudAdvisorynotificationsV1MessageBody
- type GoogleCloudAdvisorynotificationsV1Notification
- type GoogleCloudAdvisorynotificationsV1NotificationSettings
- type GoogleCloudAdvisorynotificationsV1Settings
- type GoogleCloudAdvisorynotificationsV1Subject
- type GoogleCloudAdvisorynotificationsV1Text
- type OrganizationsLocationsGetSettingsCall
- func (c *OrganizationsLocationsGetSettingsCall) Context(ctx context.Context) *OrganizationsLocationsGetSettingsCall
- func (c *OrganizationsLocationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Settings, error)
- func (c *OrganizationsLocationsGetSettingsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGetSettingsCall
- func (c *OrganizationsLocationsGetSettingsCall) Header() http.Header
- func (c *OrganizationsLocationsGetSettingsCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGetSettingsCall
- type OrganizationsLocationsNotificationsGetCall
- func (c *OrganizationsLocationsNotificationsGetCall) Context(ctx context.Context) *OrganizationsLocationsNotificationsGetCall
- func (c *OrganizationsLocationsNotificationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Notification, error)
- func (c *OrganizationsLocationsNotificationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsNotificationsGetCall
- func (c *OrganizationsLocationsNotificationsGetCall) Header() http.Header
- func (c *OrganizationsLocationsNotificationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsNotificationsGetCall
- func (c *OrganizationsLocationsNotificationsGetCall) LanguageCode(languageCode string) *OrganizationsLocationsNotificationsGetCall
- type OrganizationsLocationsNotificationsListCall
- func (c *OrganizationsLocationsNotificationsListCall) Context(ctx context.Context) *OrganizationsLocationsNotificationsListCall
- func (c *OrganizationsLocationsNotificationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1ListNotificationsResponse, error)
- func (c *OrganizationsLocationsNotificationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsNotificationsListCall
- func (c *OrganizationsLocationsNotificationsListCall) Header() http.Header
- func (c *OrganizationsLocationsNotificationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsNotificationsListCall
- func (c *OrganizationsLocationsNotificationsListCall) LanguageCode(languageCode string) *OrganizationsLocationsNotificationsListCall
- func (c *OrganizationsLocationsNotificationsListCall) PageSize(pageSize int64) *OrganizationsLocationsNotificationsListCall
- func (c *OrganizationsLocationsNotificationsListCall) PageToken(pageToken string) *OrganizationsLocationsNotificationsListCall
- func (c *OrganizationsLocationsNotificationsListCall) Pages(ctx context.Context, ...) error
- func (c *OrganizationsLocationsNotificationsListCall) View(view string) *OrganizationsLocationsNotificationsListCall
- type OrganizationsLocationsNotificationsService
- type OrganizationsLocationsService
- type OrganizationsLocationsUpdateSettingsCall
- func (c *OrganizationsLocationsUpdateSettingsCall) Context(ctx context.Context) *OrganizationsLocationsUpdateSettingsCall
- func (c *OrganizationsLocationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Settings, error)
- func (c *OrganizationsLocationsUpdateSettingsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsUpdateSettingsCall
- func (c *OrganizationsLocationsUpdateSettingsCall) Header() http.Header
- type OrganizationsService
- type ProjectsLocationsNotificationsGetCall
- func (c *ProjectsLocationsNotificationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotificationsGetCall
- func (c *ProjectsLocationsNotificationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Notification, error)
- func (c *ProjectsLocationsNotificationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotificationsGetCall
- func (c *ProjectsLocationsNotificationsGetCall) Header() http.Header
- func (c *ProjectsLocationsNotificationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotificationsGetCall
- func (c *ProjectsLocationsNotificationsGetCall) LanguageCode(languageCode string) *ProjectsLocationsNotificationsGetCall
- type ProjectsLocationsNotificationsListCall
- func (c *ProjectsLocationsNotificationsListCall) Context(ctx context.Context) *ProjectsLocationsNotificationsListCall
- func (c *ProjectsLocationsNotificationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1ListNotificationsResponse, error)
- func (c *ProjectsLocationsNotificationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotificationsListCall
- func (c *ProjectsLocationsNotificationsListCall) Header() http.Header
- func (c *ProjectsLocationsNotificationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotificationsListCall
- func (c *ProjectsLocationsNotificationsListCall) LanguageCode(languageCode string) *ProjectsLocationsNotificationsListCall
- func (c *ProjectsLocationsNotificationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotificationsListCall
- func (c *ProjectsLocationsNotificationsListCall) PageToken(pageToken string) *ProjectsLocationsNotificationsListCall
- func (c *ProjectsLocationsNotificationsListCall) Pages(ctx context.Context, ...) error
- func (c *ProjectsLocationsNotificationsListCall) View(view string) *ProjectsLocationsNotificationsListCall
- type ProjectsLocationsNotificationsService
- type ProjectsLocationsService
- type ProjectsService
- type Service
Constants ¶
const ( // See, edit, configure, and delete your Google Cloud data and see the // email address for your Google Account. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleCloudAdvisorynotificationsV1Attachment ¶
type GoogleCloudAdvisorynotificationsV1Attachment struct { // Csv: A CSV file attachment. Max size is 10 MB. Csv *GoogleCloudAdvisorynotificationsV1Csv `json:"csv,omitempty"` // DisplayName: The title of the attachment. DisplayName string `json:"displayName,omitempty"` // ForceSendFields is a list of field names (e.g. "Csv") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Csv") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1Attachment: Attachment with specific information about the issue.
func (*GoogleCloudAdvisorynotificationsV1Attachment) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1Attachment) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1Csv ¶
type GoogleCloudAdvisorynotificationsV1Csv struct { // DataRows: The list of data rows in a CSV file, as string arrays // rather than as a single comma-separated string. DataRows []*GoogleCloudAdvisorynotificationsV1CsvCsvRow `json:"dataRows,omitempty"` // Headers: The list of headers for data columns in a CSV file. Headers []string `json:"headers,omitempty"` // ForceSendFields is a list of field names (e.g. "DataRows") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "DataRows") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1Csv: A representation of a CSV file attachment, as a list of column headers and a list of data rows.
func (*GoogleCloudAdvisorynotificationsV1Csv) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1Csv) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1CsvCsvRow ¶
type GoogleCloudAdvisorynotificationsV1CsvCsvRow struct { // Entries: The data entries in a CSV file row, as a string array rather // than a single comma-separated string. Entries []string `json:"entries,omitempty"` // ForceSendFields is a list of field names (e.g. "Entries") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Entries") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1CsvCsvRow: A representation of a single data row in a CSV file.
func (*GoogleCloudAdvisorynotificationsV1CsvCsvRow) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1CsvCsvRow) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1ListNotificationsResponse ¶
type GoogleCloudAdvisorynotificationsV1ListNotificationsResponse struct { // NextPageToken: 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 `json:"nextPageToken,omitempty"` // Notifications: List of notifications under a given parent. Notifications []*GoogleCloudAdvisorynotificationsV1Notification `json:"notifications,omitempty"` // TotalSize: Estimation of a total number of notifications. TotalSize int64 `json:"totalSize,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "NextPageToken") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1ListNotificationsResponse: Response of ListNotifications endpoint.
func (*GoogleCloudAdvisorynotificationsV1ListNotificationsResponse) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1ListNotificationsResponse) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1Message ¶
type GoogleCloudAdvisorynotificationsV1Message struct { // Attachments: The attachments to download. Attachments []*GoogleCloudAdvisorynotificationsV1Attachment `json:"attachments,omitempty"` // Body: The message content. Body *GoogleCloudAdvisorynotificationsV1MessageBody `json:"body,omitempty"` // CreateTime: The Message creation timestamp. CreateTime string `json:"createTime,omitempty"` // LocalizationTime: Time when Message was localized LocalizationTime string `json:"localizationTime,omitempty"` // ForceSendFields is a list of field names (e.g. "Attachments") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Attachments") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1Message: A message which contains notification details.
func (*GoogleCloudAdvisorynotificationsV1Message) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1Message) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1MessageBody ¶
type GoogleCloudAdvisorynotificationsV1MessageBody struct { // Text: The text content of the message body. Text *GoogleCloudAdvisorynotificationsV1Text `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "Text") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Text") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1MessageBody: A message body containing text.
func (*GoogleCloudAdvisorynotificationsV1MessageBody) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1MessageBody) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1Notification ¶
type GoogleCloudAdvisorynotificationsV1Notification struct { // CreateTime: Output only. Time the notification was created. CreateTime string `json:"createTime,omitempty"` // Messages: A list of messages in the notification. Messages []*GoogleCloudAdvisorynotificationsV1Message `json:"messages,omitempty"` // Name: The resource name of the notification. Format: // organizations/{organization}/locations/{location}/notifications/{notif // ication} or // projects/{project}/locations/{location}/notifications/{notification}. Name string `json:"name,omitempty"` // NotificationType: Type of notification // // Possible values: // "NOTIFICATION_TYPE_UNSPECIFIED" - Default type // "NOTIFICATION_TYPE_SECURITY_PRIVACY_ADVISORY" - Security and // privacy advisory notifications // "NOTIFICATION_TYPE_SENSITIVE_ACTIONS" - Sensitive action // notifications // "NOTIFICATION_TYPE_SECURITY_MSA" - General security MSA // "NOTIFICATION_TYPE_THREAT_HORIZONS" - Threat horizons MSA NotificationType string `json:"notificationType,omitempty"` // Subject: The subject line of the notification. Subject *GoogleCloudAdvisorynotificationsV1Subject `json:"subject,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "CreateTime") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1Notification: A notification object for notifying customers about security and privacy issues.
func (*GoogleCloudAdvisorynotificationsV1Notification) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1Notification) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1NotificationSettings ¶
type GoogleCloudAdvisorynotificationsV1NotificationSettings struct { // Enabled: Whether the associated NotificationType is enabled. Enabled bool `json:"enabled,omitempty"` // ForceSendFields is a list of field names (e.g. "Enabled") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Enabled") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1NotificationSettings: Settings for each NotificationType.
func (*GoogleCloudAdvisorynotificationsV1NotificationSettings) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1NotificationSettings) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1Settings ¶
type GoogleCloudAdvisorynotificationsV1Settings struct { // Etag: Required. Fingerprint for optimistic concurrency returned in // Get requests. Must be provided for Update requests. If the value // provided does not match the value known to the server, ABORTED will // be thrown, and the client should retry the read-modify-write cycle. Etag string `json:"etag,omitempty"` // Name: Identifier. The resource name of the settings to retrieve. // Format: organizations/{organization}/locations/{location}/settings. Name string `json:"name,omitempty"` // NotificationSettings: Required. Map of each notification type and its // settings to get/set all settings at once. The server will validate // the value for each notification type. NotificationSettings map[string]GoogleCloudAdvisorynotificationsV1NotificationSettings `json:"notificationSettings,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. "Etag") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Etag") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1Settings: Settings for Advisory Notifications.
func (*GoogleCloudAdvisorynotificationsV1Settings) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1Settings) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1Subject ¶
type GoogleCloudAdvisorynotificationsV1Subject struct { // Text: The text content. Text *GoogleCloudAdvisorynotificationsV1Text `json:"text,omitempty"` // ForceSendFields is a list of field names (e.g. "Text") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "Text") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1Subject: A subject line of a notification.
func (*GoogleCloudAdvisorynotificationsV1Subject) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1Subject) MarshalJSON() ([]byte, error)
type GoogleCloudAdvisorynotificationsV1Text ¶
type GoogleCloudAdvisorynotificationsV1Text struct { // EnText: The English copy. EnText string `json:"enText,omitempty"` // LocalizationState: Status of the localization. // // Possible values: // "LOCALIZATION_STATE_UNSPECIFIED" - Not used. // "LOCALIZATION_STATE_NOT_APPLICABLE" - 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. // "LOCALIZATION_STATE_PENDING" - Localization for requested language // is in progress, and not ready yet. // "LOCALIZATION_STATE_COMPLETED" - Localization for requested // language is completed. LocalizationState string `json:"localizationState,omitempty"` // LocalizedText: The requested localized copy (if applicable). LocalizedText string `json:"localizedText,omitempty"` // ForceSendFields is a list of field names (e.g. "EnText") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "EnText") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` }
GoogleCloudAdvisorynotificationsV1Text: A text object containing the English text and its localized copies.
func (*GoogleCloudAdvisorynotificationsV1Text) MarshalJSON ¶
func (s *GoogleCloudAdvisorynotificationsV1Text) MarshalJSON() ([]byte, error)
type OrganizationsLocationsGetSettingsCall ¶
type OrganizationsLocationsGetSettingsCall struct {
// contains filtered or unexported fields
}
func (*OrganizationsLocationsGetSettingsCall) Context ¶
func (c *OrganizationsLocationsGetSettingsCall) Context(ctx context.Context) *OrganizationsLocationsGetSettingsCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*OrganizationsLocationsGetSettingsCall) Do ¶
func (c *OrganizationsLocationsGetSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Settings, error)
Do executes the "advisorynotifications.organizations.locations.getSettings" call. Exactly one of *GoogleCloudAdvisorynotificationsV1Settings or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudAdvisorynotificationsV1Settings.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*OrganizationsLocationsGetSettingsCall) Fields ¶
func (c *OrganizationsLocationsGetSettingsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsGetSettingsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*OrganizationsLocationsGetSettingsCall) Header ¶
func (c *OrganizationsLocationsGetSettingsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*OrganizationsLocationsGetSettingsCall) IfNoneMatch ¶
func (c *OrganizationsLocationsGetSettingsCall) IfNoneMatch(entityTag string) *OrganizationsLocationsGetSettingsCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
type OrganizationsLocationsNotificationsGetCall ¶
type OrganizationsLocationsNotificationsGetCall struct {
// contains filtered or unexported fields
}
func (*OrganizationsLocationsNotificationsGetCall) Context ¶
func (c *OrganizationsLocationsNotificationsGetCall) Context(ctx context.Context) *OrganizationsLocationsNotificationsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*OrganizationsLocationsNotificationsGetCall) Do ¶
func (c *OrganizationsLocationsNotificationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Notification, error)
Do executes the "advisorynotifications.organizations.locations.notifications.get" call. Exactly one of *GoogleCloudAdvisorynotificationsV1Notification or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudAdvisorynotificationsV1Notification.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*OrganizationsLocationsNotificationsGetCall) Fields ¶
func (c *OrganizationsLocationsNotificationsGetCall) Fields(s ...googleapi.Field) *OrganizationsLocationsNotificationsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*OrganizationsLocationsNotificationsGetCall) Header ¶
func (c *OrganizationsLocationsNotificationsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*OrganizationsLocationsNotificationsGetCall) IfNoneMatch ¶
func (c *OrganizationsLocationsNotificationsGetCall) IfNoneMatch(entityTag string) *OrganizationsLocationsNotificationsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*OrganizationsLocationsNotificationsGetCall) LanguageCode ¶
func (c *OrganizationsLocationsNotificationsGetCall) LanguageCode(languageCode string) *OrganizationsLocationsNotificationsGetCall
LanguageCode sets the optional parameter "languageCode": 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.
type OrganizationsLocationsNotificationsListCall ¶
type OrganizationsLocationsNotificationsListCall struct {
// contains filtered or unexported fields
}
func (*OrganizationsLocationsNotificationsListCall) Context ¶
func (c *OrganizationsLocationsNotificationsListCall) Context(ctx context.Context) *OrganizationsLocationsNotificationsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*OrganizationsLocationsNotificationsListCall) Do ¶
func (c *OrganizationsLocationsNotificationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1ListNotificationsResponse, error)
Do executes the "advisorynotifications.organizations.locations.notifications.list" call. Exactly one of *GoogleCloudAdvisorynotificationsV1ListNotificationsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudAdvisorynotificationsV1ListNotificationsResponse.ServerRes ponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*OrganizationsLocationsNotificationsListCall) Fields ¶
func (c *OrganizationsLocationsNotificationsListCall) Fields(s ...googleapi.Field) *OrganizationsLocationsNotificationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*OrganizationsLocationsNotificationsListCall) Header ¶
func (c *OrganizationsLocationsNotificationsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*OrganizationsLocationsNotificationsListCall) IfNoneMatch ¶
func (c *OrganizationsLocationsNotificationsListCall) IfNoneMatch(entityTag string) *OrganizationsLocationsNotificationsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*OrganizationsLocationsNotificationsListCall) LanguageCode ¶
func (c *OrganizationsLocationsNotificationsListCall) LanguageCode(languageCode string) *OrganizationsLocationsNotificationsListCall
LanguageCode sets the optional parameter "languageCode": 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.
func (*OrganizationsLocationsNotificationsListCall) PageSize ¶
func (c *OrganizationsLocationsNotificationsListCall) PageSize(pageSize int64) *OrganizationsLocationsNotificationsListCall
PageSize sets the optional parameter "pageSize": 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.
func (*OrganizationsLocationsNotificationsListCall) PageToken ¶
func (c *OrganizationsLocationsNotificationsListCall) PageToken(pageToken string) *OrganizationsLocationsNotificationsListCall
PageToken sets the optional parameter "pageToken": 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.
func (*OrganizationsLocationsNotificationsListCall) Pages ¶
func (c *OrganizationsLocationsNotificationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAdvisorynotificationsV1ListNotificationsResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
func (*OrganizationsLocationsNotificationsListCall) View ¶
func (c *OrganizationsLocationsNotificationsListCall) View(view string) *OrganizationsLocationsNotificationsListCall
View sets the optional parameter "view": Specifies which parts of the notification resource should be returned in the response.
Possible values:
"NOTIFICATION_VIEW_UNSPECIFIED" - Not specified, equivalent to
BASIC.
"BASIC" - 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.
"FULL" - Include everything.
type OrganizationsLocationsNotificationsService ¶
type OrganizationsLocationsNotificationsService struct {
// contains filtered or unexported fields
}
func NewOrganizationsLocationsNotificationsService ¶
func NewOrganizationsLocationsNotificationsService(s *Service) *OrganizationsLocationsNotificationsService
func (*OrganizationsLocationsNotificationsService) Get ¶
func (r *OrganizationsLocationsNotificationsService) Get(name string) *OrganizationsLocationsNotificationsGetCall
Get: Gets a notification.
- name: A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{not ification} or projects/{projects}/locations/{location}/notifications/{notification }.
func (*OrganizationsLocationsNotificationsService) List ¶
func (r *OrganizationsLocationsNotificationsService) List(parent string) *OrganizationsLocationsNotificationsListCall
List: Lists notifications under a given parent.
- parent: The parent, which owns this collection of notifications. Must be of the form "organizations/{organization}/locations/{location}" or "projects/{project}/locations/{location}".
type OrganizationsLocationsService ¶
type OrganizationsLocationsService struct { Notifications *OrganizationsLocationsNotificationsService // contains filtered or unexported fields }
func NewOrganizationsLocationsService ¶
func NewOrganizationsLocationsService(s *Service) *OrganizationsLocationsService
func (*OrganizationsLocationsService) GetSettings ¶
func (r *OrganizationsLocationsService) GetSettings(name string) *OrganizationsLocationsGetSettingsCall
GetSettings: Get notification settings.
- name: The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.
func (*OrganizationsLocationsService) UpdateSettings ¶
func (r *OrganizationsLocationsService) UpdateSettings(name string, googlecloudadvisorynotificationsv1settings *GoogleCloudAdvisorynotificationsV1Settings) *OrganizationsLocationsUpdateSettingsCall
UpdateSettings: Update notification settings.
- name: Identifier. The resource name of the settings to retrieve. Format: organizations/{organization}/locations/{location}/settings.
type OrganizationsLocationsUpdateSettingsCall ¶
type OrganizationsLocationsUpdateSettingsCall struct {
// contains filtered or unexported fields
}
func (*OrganizationsLocationsUpdateSettingsCall) Context ¶
func (c *OrganizationsLocationsUpdateSettingsCall) Context(ctx context.Context) *OrganizationsLocationsUpdateSettingsCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*OrganizationsLocationsUpdateSettingsCall) Do ¶
func (c *OrganizationsLocationsUpdateSettingsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Settings, error)
Do executes the "advisorynotifications.organizations.locations.updateSettings" call. Exactly one of *GoogleCloudAdvisorynotificationsV1Settings or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudAdvisorynotificationsV1Settings.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*OrganizationsLocationsUpdateSettingsCall) Fields ¶
func (c *OrganizationsLocationsUpdateSettingsCall) Fields(s ...googleapi.Field) *OrganizationsLocationsUpdateSettingsCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*OrganizationsLocationsUpdateSettingsCall) Header ¶
func (c *OrganizationsLocationsUpdateSettingsCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
type OrganizationsService ¶
type OrganizationsService struct { Locations *OrganizationsLocationsService // contains filtered or unexported fields }
func NewOrganizationsService ¶
func NewOrganizationsService(s *Service) *OrganizationsService
type ProjectsLocationsNotificationsGetCall ¶
type ProjectsLocationsNotificationsGetCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsNotificationsGetCall) Context ¶
func (c *ProjectsLocationsNotificationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotificationsGetCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsNotificationsGetCall) Do ¶
func (c *ProjectsLocationsNotificationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1Notification, error)
Do executes the "advisorynotifications.projects.locations.notifications.get" call. Exactly one of *GoogleCloudAdvisorynotificationsV1Notification or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudAdvisorynotificationsV1Notification.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsNotificationsGetCall) Fields ¶
func (c *ProjectsLocationsNotificationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotificationsGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsNotificationsGetCall) Header ¶
func (c *ProjectsLocationsNotificationsGetCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsNotificationsGetCall) IfNoneMatch ¶
func (c *ProjectsLocationsNotificationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotificationsGetCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ProjectsLocationsNotificationsGetCall) LanguageCode ¶
func (c *ProjectsLocationsNotificationsGetCall) LanguageCode(languageCode string) *ProjectsLocationsNotificationsGetCall
LanguageCode sets the optional parameter "languageCode": 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.
type ProjectsLocationsNotificationsListCall ¶
type ProjectsLocationsNotificationsListCall struct {
// contains filtered or unexported fields
}
func (*ProjectsLocationsNotificationsListCall) Context ¶
func (c *ProjectsLocationsNotificationsListCall) Context(ctx context.Context) *ProjectsLocationsNotificationsListCall
Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.
func (*ProjectsLocationsNotificationsListCall) Do ¶
func (c *ProjectsLocationsNotificationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAdvisorynotificationsV1ListNotificationsResponse, error)
Do executes the "advisorynotifications.projects.locations.notifications.list" call. Exactly one of *GoogleCloudAdvisorynotificationsV1ListNotificationsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *GoogleCloudAdvisorynotificationsV1ListNotificationsResponse.ServerRes ponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.
func (*ProjectsLocationsNotificationsListCall) Fields ¶
func (c *ProjectsLocationsNotificationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotificationsListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*ProjectsLocationsNotificationsListCall) Header ¶
func (c *ProjectsLocationsNotificationsListCall) Header() http.Header
Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.
func (*ProjectsLocationsNotificationsListCall) IfNoneMatch ¶
func (c *ProjectsLocationsNotificationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotificationsListCall
IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.
func (*ProjectsLocationsNotificationsListCall) LanguageCode ¶
func (c *ProjectsLocationsNotificationsListCall) LanguageCode(languageCode string) *ProjectsLocationsNotificationsListCall
LanguageCode sets the optional parameter "languageCode": 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.
func (*ProjectsLocationsNotificationsListCall) PageSize ¶
func (c *ProjectsLocationsNotificationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotificationsListCall
PageSize sets the optional parameter "pageSize": 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.
func (*ProjectsLocationsNotificationsListCall) PageToken ¶
func (c *ProjectsLocationsNotificationsListCall) PageToken(pageToken string) *ProjectsLocationsNotificationsListCall
PageToken sets the optional parameter "pageToken": 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.
func (*ProjectsLocationsNotificationsListCall) Pages ¶
func (c *ProjectsLocationsNotificationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAdvisorynotificationsV1ListNotificationsResponse) error) error
Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.
func (*ProjectsLocationsNotificationsListCall) View ¶
func (c *ProjectsLocationsNotificationsListCall) View(view string) *ProjectsLocationsNotificationsListCall
View sets the optional parameter "view": Specifies which parts of the notification resource should be returned in the response.
Possible values:
"NOTIFICATION_VIEW_UNSPECIFIED" - Not specified, equivalent to
BASIC.
"BASIC" - 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.
"FULL" - Include everything.
type ProjectsLocationsNotificationsService ¶
type ProjectsLocationsNotificationsService struct {
// contains filtered or unexported fields
}
func NewProjectsLocationsNotificationsService ¶
func NewProjectsLocationsNotificationsService(s *Service) *ProjectsLocationsNotificationsService
func (*ProjectsLocationsNotificationsService) Get ¶
func (r *ProjectsLocationsNotificationsService) Get(name string) *ProjectsLocationsNotificationsGetCall
Get: Gets a notification.
- name: A name of the notification to retrieve. Format: organizations/{organization}/locations/{location}/notifications/{not ification} or projects/{projects}/locations/{location}/notifications/{notification }.
func (*ProjectsLocationsNotificationsService) List ¶
func (r *ProjectsLocationsNotificationsService) List(parent string) *ProjectsLocationsNotificationsListCall
List: Lists notifications under a given parent.
- parent: The parent, which owns this collection of notifications. Must be of the form "organizations/{organization}/locations/{location}" or "projects/{project}/locations/{location}".
type ProjectsLocationsService ¶
type ProjectsLocationsService struct { Notifications *ProjectsLocationsNotificationsService // contains filtered or unexported fields }
func NewProjectsLocationsService ¶
func NewProjectsLocationsService(s *Service) *ProjectsLocationsService
type ProjectsService ¶
type ProjectsService struct { Locations *ProjectsLocationsService // contains filtered or unexported fields }
func NewProjectsService ¶
func NewProjectsService(s *Service) *ProjectsService
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Organizations *OrganizationsService Projects *ProjectsService // contains filtered or unexported fields }
func New
deprecated
New creates a new Service. It uses the provided http.Client for requests.
Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
func NewService ¶
NewService creates a new Service.