All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.services.logging.v2beta1.model.LogSink Maven / Gradle / Ivy

/*
 * Copyright 2010 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/google/apis-client-generator/
 * (build: 2016-07-08 17:28:43 UTC)
 * on 2016-10-11 at 14:55:20 UTC 
 * Modify at your own risk.
 */

package com.google.api.services.logging.v2beta1.model;

/**
 * Describes a sink used to export log entries outside of Stackdriver Logging.
 *
 * 

This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the Stackdriver Logging API. For a detailed explanation * see: * https://developers.google.com/api-client-library/java/google-http-java-client/json *

* * @author Google, Inc. */ @SuppressWarnings("javadoc") public final class LogSink extends com.google.api.client.json.GenericJson { /** * Required. The export destination. See [Exporting Logs With Sinks](/logging/docs/api/tasks * /exporting-logs). Examples: * * "storage.googleapis.com/my-gcs-bucket" "bigquery.googleapis.com/projects/my-project- * id/datasets/my-dataset" "pubsub.googleapis.com/projects/my-project/topics/my-topic" * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String destination; /** * Optional. Time at which this sink expires. * The value may be {@code null}. */ @com.google.api.client.util.Key private String endTime; /** * Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). Only log entries * matching the filter are exported. The filter must be consistent with the log entry format * specified by the `outputVersionFormat` parameter, regardless of the format of the log entry * that was originally written to Stackdriver Logging. Example filter (V2 format): * * logName=projects/my-projectid/logs/syslog AND severity>=ERROR * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String filter; /** * Required. The client-assigned sink identifier, unique within the project. Example: `"my-syslog- * errors-to-pubsub"`. Sink identifiers are limited to 1000 characters and can include only the * following characters: `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum * length of the name is 100 characters. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String name; /** * Optional. The log entry version to use for this sink's exported log entries. This version does * not have to correspond to the version of the log entry that was written to Stackdriver Logging. * If omitted, the v2 format is used. * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String outputVersionFormat; /** * Optional. Time range for which this sink is active. Logs are exported only if start_time <= * entry.timestamp < end_time Both start_time and end_time may be omitted to specify (half) * infinite ranges. The start_time must be less than the end_time. * The value may be {@code null}. */ @com.google.api.client.util.Key private String startTime; /** * Output only. The IAM identity to which the destination needs to grant write access. This may * be a service account or a group. Examples (Do not assume these specific values): * "serviceAccount:[email protected]" "group:[email protected]" * * For GCS destinations, the role "roles/owner" is required on the bucket For Cloud Pubsub * destinations, the role "roles/pubsub.publisher" is required on the topic For BigQuery, * the role "roles/editor" is required on the dataset * The value may be {@code null}. */ @com.google.api.client.util.Key private java.lang.String writerIdentity; /** * Required. The export destination. See [Exporting Logs With Sinks](/logging/docs/api/tasks * /exporting-logs). Examples: * * "storage.googleapis.com/my-gcs-bucket" "bigquery.googleapis.com/projects/my-project- * id/datasets/my-dataset" "pubsub.googleapis.com/projects/my-project/topics/my-topic" * @return value or {@code null} for none */ public java.lang.String getDestination() { return destination; } /** * Required. The export destination. See [Exporting Logs With Sinks](/logging/docs/api/tasks * /exporting-logs). Examples: * * "storage.googleapis.com/my-gcs-bucket" "bigquery.googleapis.com/projects/my-project- * id/datasets/my-dataset" "pubsub.googleapis.com/projects/my-project/topics/my-topic" * @param destination destination or {@code null} for none */ public LogSink setDestination(java.lang.String destination) { this.destination = destination; return this; } /** * Optional. Time at which this sink expires. * @return value or {@code null} for none */ public String getEndTime() { return endTime; } /** * Optional. Time at which this sink expires. * @param endTime endTime or {@code null} for none */ public LogSink setEndTime(String endTime) { this.endTime = endTime; return this; } /** * Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). Only log entries * matching the filter are exported. The filter must be consistent with the log entry format * specified by the `outputVersionFormat` parameter, regardless of the format of the log entry * that was originally written to Stackdriver Logging. Example filter (V2 format): * * logName=projects/my-projectid/logs/syslog AND severity>=ERROR * @return value or {@code null} for none */ public java.lang.String getFilter() { return filter; } /** * Optional. An [advanced logs filter](/logging/docs/view/advanced_filters). Only log entries * matching the filter are exported. The filter must be consistent with the log entry format * specified by the `outputVersionFormat` parameter, regardless of the format of the log entry * that was originally written to Stackdriver Logging. Example filter (V2 format): * * logName=projects/my-projectid/logs/syslog AND severity>=ERROR * @param filter filter or {@code null} for none */ public LogSink setFilter(java.lang.String filter) { this.filter = filter; return this; } /** * Required. The client-assigned sink identifier, unique within the project. Example: `"my-syslog- * errors-to-pubsub"`. Sink identifiers are limited to 1000 characters and can include only the * following characters: `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum * length of the name is 100 characters. * @return value or {@code null} for none */ public java.lang.String getName() { return name; } /** * Required. The client-assigned sink identifier, unique within the project. Example: `"my-syslog- * errors-to-pubsub"`. Sink identifiers are limited to 1000 characters and can include only the * following characters: `A-Z`, `a-z`, `0-9`, and the special characters `_-.`. The maximum * length of the name is 100 characters. * @param name name or {@code null} for none */ public LogSink setName(java.lang.String name) { this.name = name; return this; } /** * Optional. The log entry version to use for this sink's exported log entries. This version does * not have to correspond to the version of the log entry that was written to Stackdriver Logging. * If omitted, the v2 format is used. * @return value or {@code null} for none */ public java.lang.String getOutputVersionFormat() { return outputVersionFormat; } /** * Optional. The log entry version to use for this sink's exported log entries. This version does * not have to correspond to the version of the log entry that was written to Stackdriver Logging. * If omitted, the v2 format is used. * @param outputVersionFormat outputVersionFormat or {@code null} for none */ public LogSink setOutputVersionFormat(java.lang.String outputVersionFormat) { this.outputVersionFormat = outputVersionFormat; return this; } /** * Optional. Time range for which this sink is active. Logs are exported only if start_time <= * entry.timestamp < end_time Both start_time and end_time may be omitted to specify (half) * infinite ranges. The start_time must be less than the end_time. * @return value or {@code null} for none */ public String getStartTime() { return startTime; } /** * Optional. Time range for which this sink is active. Logs are exported only if start_time <= * entry.timestamp < end_time Both start_time and end_time may be omitted to specify (half) * infinite ranges. The start_time must be less than the end_time. * @param startTime startTime or {@code null} for none */ public LogSink setStartTime(String startTime) { this.startTime = startTime; return this; } /** * Output only. The IAM identity to which the destination needs to grant write access. This may * be a service account or a group. Examples (Do not assume these specific values): * "serviceAccount:[email protected]" "group:[email protected]" * * For GCS destinations, the role "roles/owner" is required on the bucket For Cloud Pubsub * destinations, the role "roles/pubsub.publisher" is required on the topic For BigQuery, * the role "roles/editor" is required on the dataset * @return value or {@code null} for none */ public java.lang.String getWriterIdentity() { return writerIdentity; } /** * Output only. The IAM identity to which the destination needs to grant write access. This may * be a service account or a group. Examples (Do not assume these specific values): * "serviceAccount:[email protected]" "group:[email protected]" * * For GCS destinations, the role "roles/owner" is required on the bucket For Cloud Pubsub * destinations, the role "roles/pubsub.publisher" is required on the topic For BigQuery, * the role "roles/editor" is required on the dataset * @param writerIdentity writerIdentity or {@code null} for none */ public LogSink setWriterIdentity(java.lang.String writerIdentity) { this.writerIdentity = writerIdentity; return this; } @Override public LogSink set(String fieldName, Object value) { return (LogSink) super.set(fieldName, value); } @Override public LogSink clone() { return (LogSink) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy