Skip to content

Commit

Permalink
logging: update from proto (#1739)
Browse files Browse the repository at this point in the history
Fix #481.
  • Loading branch information
pongad authored Mar 13, 2017
1 parent e52a0b6 commit e884cb8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ public final ConfigSettings getSettings() {
* }
* </code></pre>
*
* @param parent Required. The parent resource whose sinks are to be listed. Examples:
* `"projects/my-logging-project"`, `"organizations/123456789"`.
* @param parent Required. The parent resource whose sinks are to be listed:
* <p>"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
* "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final ListSinksPagedResponse listSinks(ParentNameOneof parent) {
Expand Down Expand Up @@ -285,9 +286,11 @@ public final UnaryCallable<ListSinksRequest, ListSinksResponse> listSinksCallabl
* }
* </code></pre>
*
* @param sinkName Required. The parent resource name of the sink:
* @param sinkName Required. The resource name of the sink:
* <p>"projects/[PROJECT_ID]/sinks/[SINK_ID]"
* "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
* "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
* "folders/[FOLDER_ID]/sinks/[SINK_ID]"
* <p>Example: `"projects/my-project-id/sinks/my-sink-id"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
Expand Down Expand Up @@ -362,6 +365,7 @@ public final UnaryCallable<GetSinkRequest, LogSink> getSinkCallable() {
*
* @param parent Required. The resource in which to create the sink:
* <p>"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
* "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
* <p>Examples: `"projects/my-logging-project"`, `"organizations/123456789"`.
* @param sink Required. The new sink, whose `name` parameter is a sink identifier that is not
* already in use.
Expand Down Expand Up @@ -452,6 +456,8 @@ public final UnaryCallable<CreateSinkRequest, LogSink> createSinkCallable() {
* resource and the sink identifier:
* <p>"projects/[PROJECT_ID]/sinks/[SINK_ID]"
* "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
* "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
* "folders/[FOLDER_ID]/sinks/[SINK_ID]"
* <p>Example: `"projects/my-project-id/sinks/my-sink-id"`.
* @param sink Required. The updated sink, whose name is the same identifier that appears as part
* of `sink_name`. If `sink_name` does not exist, then this method creates a new sink.
Expand Down Expand Up @@ -541,8 +547,9 @@ public final UnaryCallable<UpdateSinkRequest, LogSink> updateSinkCallable() {
* resource and the sink identifier:
* <p>"projects/[PROJECT_ID]/sinks/[SINK_ID]"
* "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]"
* <p>It is an error if the sink does not exist. Example:
* `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink does not exist.
* "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]"
* "folders/[FOLDER_ID]/sinks/[SINK_ID]"
* <p>Example: `"projects/my-project-id/sinks/my-sink-id"`.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final void deleteSink(SinkNameOneof sinkName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ public final LoggingSettings getSettings() {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes all the log entries in a log. The log reappears if it receives new entries.
* Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries
* written shortly before the delete operation might not be deleted.
*
* <p>Sample code:
*
Expand All @@ -206,6 +207,7 @@ public final LoggingSettings getSettings() {
*
* @param logName Required. The resource name of the log to delete:
* <p>"projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
* "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]"
* <p>`[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"`,
* `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. For more
* information about log names, see [LogEntry][google.logging.v2.LogEntry].
Expand All @@ -220,7 +222,8 @@ public final void deleteLog(LogNameOneof logName) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes all the log entries in a log. The log reappears if it receives new entries.
* Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries
* written shortly before the delete operation might not be deleted.
*
* <p>Sample code:
*
Expand All @@ -243,7 +246,8 @@ private final void deleteLog(DeleteLogRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes all the log entries in a log. The log reappears if it receives new entries.
* Deletes all the log entries in a log. The log reappears if it receives new entries. Log entries
* written shortly before the delete operation might not be deleted.
*
* <p>Sample code:
*
Expand All @@ -265,7 +269,7 @@ public final UnaryCallable<DeleteLogRequest, Empty> deleteLogCallable() {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Writes log entries to Stackdriver Logging. All log entries are written by this method.
* Writes log entries to Stackdriver Logging.
*
* <p>Sample code:
*
Expand All @@ -282,6 +286,7 @@ public final UnaryCallable<DeleteLogRequest, Empty> deleteLogCallable() {
* @param logName Optional. A default log resource name that is assigned to all log entries in
* `entries` that do not specify a value for `log_name`:
* <p>"projects/[PROJECT_ID]/logs/[LOG_ID]" "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]"
* "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" "folders/[FOLDER_ID]/logs/[LOG_ID]"
* <p>`[LOG_ID]` must be URL-encoded. For example, `"projects/my-project-id/logs/syslog"` or
* `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. For more
* information about log names, see [LogEntry][google.logging.v2.LogEntry].
Expand All @@ -295,8 +300,12 @@ public final UnaryCallable<DeleteLogRequest, Empty> deleteLogCallable() {
* parameter, then the log entry's label is not changed. See
* [LogEntry][google.logging.v2.LogEntry].
* @param entries Required. The log entries to write. Values supplied for the fields `log_name`,
* `resource`, and `labels` in this `entries.write` request are added to those log entries
* that do not provide their own values for the fields.
* `resource`, and `labels` in this `entries.write` request are inserted into those log
* entries in this list that do not provide their own values.
* <p>Stackdriver Logging also creates and inserts values for `timestamp` and `insert_id` if
* the entries do not provide them. The created `insert_id` for the N'th entry in this list
* will be greater than earlier entries and less than later entries. Otherwise, the order of
* log entries in this list does not matter.
* <p>To improve throughput and to avoid exceeding the [quota limit](/logging/quota-policy)
* for calls to `entries.write`, you should write multiple log entries at once rather than
* calling this method for each individual log entry.
Expand All @@ -320,7 +329,7 @@ public final WriteLogEntriesResponse writeLogEntries(

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Writes log entries to Stackdriver Logging. All log entries are written by this method.
* Writes log entries to Stackdriver Logging.
*
* <p>Sample code:
*
Expand All @@ -343,7 +352,7 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Writes log entries to Stackdriver Logging. All log entries are written by this method.
* Writes log entries to Stackdriver Logging.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -382,9 +391,10 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ
* }
* </code></pre>
*
* @param resourceNames Required. Names of one or more resources from which to retrieve log
* @param resourceNames Required. Names of one or more parent resources from which to retrieve log
* entries:
* <p>"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
* "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
* <p>Projects listed in the `project_ids` field are added to this list.
* @param filter Optional. A filter that chooses which log entries to return. See [Advanced Logs
* Filters](/logging/docs/view/advanced_filters). Only log entries that match the filter are
Expand All @@ -396,7 +406,7 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ
* are `"timestamp asc"` (default) and `"timestamp desc"`. The first option returns entries in
* order of increasing values of `LogEntry.timestamp` (oldest first), and the second option
* returns entries in order of decreasing timestamps (newest first). Entries with equal
* timestamps are returned in order of `LogEntry.insertId`.
* timestamps are returned in order of their `insert_id` values.
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final ListLogEntriesPagedResponse listLogEntries(
Expand Down Expand Up @@ -573,7 +583,8 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the logs in projects or organizations. Only logs that have entries are listed.
* Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have
* entries are listed.
*
* <p>Sample code:
*
Expand All @@ -588,6 +599,7 @@ public final ListMonitoredResourceDescriptorsPagedResponse listMonitoredResource
*
* @param parent Required. The resource name that owns the logs:
* <p>"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]"
* "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]"
* @throws com.google.api.gax.grpc.ApiException if the remote call fails
*/
public final ListLogsPagedResponse listLogs(ParentNameOneof parent) {
Expand All @@ -598,7 +610,8 @@ public final ListLogsPagedResponse listLogs(ParentNameOneof parent) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the logs in projects or organizations. Only logs that have entries are listed.
* Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have
* entries are listed.
*
* <p>Sample code:
*
Expand All @@ -623,7 +636,8 @@ public final ListLogsPagedResponse listLogs(ListLogsRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the logs in projects or organizations. Only logs that have entries are listed.
* Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have
* entries are listed.
*
* <p>Sample code:
*
Expand All @@ -647,7 +661,8 @@ public final UnaryCallable<ListLogsRequest, ListLogsPagedResponse> listLogsPaged

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists the logs in projects or organizations. Only logs that have entries are listed.
* Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have
* entries are listed.
*
* <p>Sample code:
*
Expand Down

0 comments on commit e884cb8

Please sign in to comment.