// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/logging/v2/logging_config.proto

package com.google.logging.v2;

/**
 * <pre>
 * The parameters to `UpdateSink`.
 * </pre>
 *
 * Protobuf type {@code google.logging.v2.UpdateSinkRequest}
 */
public  final class UpdateSinkRequest extends
    com.google.protobuf.GeneratedMessageLite<
        UpdateSinkRequest, UpdateSinkRequest.Builder> implements
    // @@protoc_insertion_point(message_implements:google.logging.v2.UpdateSinkRequest)
    UpdateSinkRequestOrBuilder {
  private UpdateSinkRequest() {
    sinkName_ = "";
  }
  public static final int SINK_NAME_FIELD_NUMBER = 1;
  private java.lang.String sinkName_;
  /**
   * <pre>
   * Required. The full resource name of the sink to update, including the parent
   * resource and the sink identifier:
   *     "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]"
   * Example: `"projects/my-project-id/sinks/my-sink-id"`.
   * </pre>
   *
   * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
   * @return The sinkName.
   */
  @java.lang.Override
  public java.lang.String getSinkName() {
    return sinkName_;
  }
  /**
   * <pre>
   * Required. The full resource name of the sink to update, including the parent
   * resource and the sink identifier:
   *     "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]"
   * Example: `"projects/my-project-id/sinks/my-sink-id"`.
   * </pre>
   *
   * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
   * @return The bytes for sinkName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getSinkNameBytes() {
    return com.google.protobuf.ByteString.copyFromUtf8(sinkName_);
  }
  /**
   * <pre>
   * Required. The full resource name of the sink to update, including the parent
   * resource and the sink identifier:
   *     "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]"
   * Example: `"projects/my-project-id/sinks/my-sink-id"`.
   * </pre>
   *
   * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
   * @param value The sinkName to set.
   */
  private void setSinkName(
      java.lang.String value) {
    value.getClass();
  
    sinkName_ = value;
  }
  /**
   * <pre>
   * Required. The full resource name of the sink to update, including the parent
   * resource and the sink identifier:
   *     "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]"
   * Example: `"projects/my-project-id/sinks/my-sink-id"`.
   * </pre>
   *
   * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
   */
  private void clearSinkName() {
    
    sinkName_ = getDefaultInstance().getSinkName();
  }
  /**
   * <pre>
   * Required. The full resource name of the sink to update, including the parent
   * resource and the sink identifier:
   *     "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]"
   * Example: `"projects/my-project-id/sinks/my-sink-id"`.
   * </pre>
   *
   * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
   * @param value The bytes for sinkName to set.
   */
  private void setSinkNameBytes(
      com.google.protobuf.ByteString value) {
    checkByteStringIsUtf8(value);
    sinkName_ = value.toStringUtf8();
    
  }

  public static final int SINK_FIELD_NUMBER = 2;
  private com.google.logging.v2.LogSink sink_;
  /**
   * <pre>
   * Required. The updated sink, whose name is the same identifier that appears as part
   * of `sink_name`.
   * </pre>
   *
   * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   */
  @java.lang.Override
  public boolean hasSink() {
    return sink_ != null;
  }
  /**
   * <pre>
   * Required. The updated sink, whose name is the same identifier that appears as part
   * of `sink_name`.
   * </pre>
   *
   * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   */
  @java.lang.Override
  public com.google.logging.v2.LogSink getSink() {
    return sink_ == null ? com.google.logging.v2.LogSink.getDefaultInstance() : sink_;
  }
  /**
   * <pre>
   * Required. The updated sink, whose name is the same identifier that appears as part
   * of `sink_name`.
   * </pre>
   *
   * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   */
  private void setSink(com.google.logging.v2.LogSink value) {
    value.getClass();
  sink_ = value;
    
    }
  /**
   * <pre>
   * Required. The updated sink, whose name is the same identifier that appears as part
   * of `sink_name`.
   * </pre>
   *
   * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   */
  @java.lang.SuppressWarnings({"ReferenceEquality"})
  private void mergeSink(com.google.logging.v2.LogSink value) {
    value.getClass();
  if (sink_ != null &&
        sink_ != com.google.logging.v2.LogSink.getDefaultInstance()) {
      sink_ =
        com.google.logging.v2.LogSink.newBuilder(sink_).mergeFrom(value).buildPartial();
    } else {
      sink_ = value;
    }
    
  }
  /**
   * <pre>
   * Required. The updated sink, whose name is the same identifier that appears as part
   * of `sink_name`.
   * </pre>
   *
   * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   */
  private void clearSink() {  sink_ = null;
    
  }

  public static final int UNIQUE_WRITER_IDENTITY_FIELD_NUMBER = 3;
  private boolean uniqueWriterIdentity_;
  /**
   * <pre>
   * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
   * for a description of this field. When updating a sink, the effect of this
   * field on the value of `writer_identity` in the updated sink depends on both
   * the old and new values of this field:
   * +   If the old and new values of this field are both false or both true,
   *     then there is no change to the sink's `writer_identity`.
   * +   If the old value is false and the new value is true, then
   *     `writer_identity` is changed to a unique service account.
   * +   It is an error if the old value is true and the new value is
   *     set to false or defaulted to false.
   * </pre>
   *
   * <code>bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   * @return The uniqueWriterIdentity.
   */
  @java.lang.Override
  public boolean getUniqueWriterIdentity() {
    return uniqueWriterIdentity_;
  }
  /**
   * <pre>
   * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
   * for a description of this field. When updating a sink, the effect of this
   * field on the value of `writer_identity` in the updated sink depends on both
   * the old and new values of this field:
   * +   If the old and new values of this field are both false or both true,
   *     then there is no change to the sink's `writer_identity`.
   * +   If the old value is false and the new value is true, then
   *     `writer_identity` is changed to a unique service account.
   * +   It is an error if the old value is true and the new value is
   *     set to false or defaulted to false.
   * </pre>
   *
   * <code>bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   * @param value The uniqueWriterIdentity to set.
   */
  private void setUniqueWriterIdentity(boolean value) {
    
    uniqueWriterIdentity_ = value;
  }
  /**
   * <pre>
   * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
   * for a description of this field. When updating a sink, the effect of this
   * field on the value of `writer_identity` in the updated sink depends on both
   * the old and new values of this field:
   * +   If the old and new values of this field are both false or both true,
   *     then there is no change to the sink's `writer_identity`.
   * +   If the old value is false and the new value is true, then
   *     `writer_identity` is changed to a unique service account.
   * +   It is an error if the old value is true and the new value is
   *     set to false or defaulted to false.
   * </pre>
   *
   * <code>bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  private void clearUniqueWriterIdentity() {
    
    uniqueWriterIdentity_ = false;
  }

  public static final int UPDATE_MASK_FIELD_NUMBER = 4;
  private com.google.protobuf.FieldMask updateMask_;
  /**
   * <pre>
   * Optional. Field mask that specifies the fields in `sink` that need
   * an update. A sink field will be overwritten if, and only if, it is
   * in the update mask. `name` and output only fields cannot be updated.
   * An empty updateMask is temporarily treated as using the following mask
   * for backwards compatibility purposes:
   *   destination,filter,includeChildren
   * At some point in the future, behavior will be removed and specifying an
   * empty updateMask will be an error.
   * For a detailed `FieldMask` definition, see
   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
   * Example: `updateMask=filter`.
   * </pre>
   *
   * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public boolean hasUpdateMask() {
    return updateMask_ != null;
  }
  /**
   * <pre>
   * Optional. Field mask that specifies the fields in `sink` that need
   * an update. A sink field will be overwritten if, and only if, it is
   * in the update mask. `name` and output only fields cannot be updated.
   * An empty updateMask is temporarily treated as using the following mask
   * for backwards compatibility purposes:
   *   destination,filter,includeChildren
   * At some point in the future, behavior will be removed and specifying an
   * empty updateMask will be an error.
   * For a detailed `FieldMask` definition, see
   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
   * Example: `updateMask=filter`.
   * </pre>
   *
   * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.Override
  public com.google.protobuf.FieldMask getUpdateMask() {
    return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_;
  }
  /**
   * <pre>
   * Optional. Field mask that specifies the fields in `sink` that need
   * an update. A sink field will be overwritten if, and only if, it is
   * in the update mask. `name` and output only fields cannot be updated.
   * An empty updateMask is temporarily treated as using the following mask
   * for backwards compatibility purposes:
   *   destination,filter,includeChildren
   * At some point in the future, behavior will be removed and specifying an
   * empty updateMask will be an error.
   * For a detailed `FieldMask` definition, see
   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
   * Example: `updateMask=filter`.
   * </pre>
   *
   * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  private void setUpdateMask(com.google.protobuf.FieldMask value) {
    value.getClass();
  updateMask_ = value;
    
    }
  /**
   * <pre>
   * Optional. Field mask that specifies the fields in `sink` that need
   * an update. A sink field will be overwritten if, and only if, it is
   * in the update mask. `name` and output only fields cannot be updated.
   * An empty updateMask is temporarily treated as using the following mask
   * for backwards compatibility purposes:
   *   destination,filter,includeChildren
   * At some point in the future, behavior will be removed and specifying an
   * empty updateMask will be an error.
   * For a detailed `FieldMask` definition, see
   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
   * Example: `updateMask=filter`.
   * </pre>
   *
   * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  @java.lang.SuppressWarnings({"ReferenceEquality"})
  private void mergeUpdateMask(com.google.protobuf.FieldMask value) {
    value.getClass();
  if (updateMask_ != null &&
        updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) {
      updateMask_ =
        com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial();
    } else {
      updateMask_ = value;
    }
    
  }
  /**
   * <pre>
   * Optional. Field mask that specifies the fields in `sink` that need
   * an update. A sink field will be overwritten if, and only if, it is
   * in the update mask. `name` and output only fields cannot be updated.
   * An empty updateMask is temporarily treated as using the following mask
   * for backwards compatibility purposes:
   *   destination,filter,includeChildren
   * At some point in the future, behavior will be removed and specifying an
   * empty updateMask will be an error.
   * For a detailed `FieldMask` definition, see
   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
   * Example: `updateMask=filter`.
   * </pre>
   *
   * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
   */
  private void clearUpdateMask() {  updateMask_ = null;
    
  }

  public static com.google.logging.v2.UpdateSinkRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data, extensionRegistry);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.logging.v2.UpdateSinkRequest parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input, extensionRegistry);
  }

  public static Builder newBuilder() {
    return (Builder) DEFAULT_INSTANCE.createBuilder();
  }
  public static Builder newBuilder(com.google.logging.v2.UpdateSinkRequest prototype) {
    return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
  }

  /**
   * <pre>
   * The parameters to `UpdateSink`.
   * </pre>
   *
   * Protobuf type {@code google.logging.v2.UpdateSinkRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageLite.Builder<
        com.google.logging.v2.UpdateSinkRequest, Builder> implements
      // @@protoc_insertion_point(builder_implements:google.logging.v2.UpdateSinkRequest)
      com.google.logging.v2.UpdateSinkRequestOrBuilder {
    // Construct using com.google.logging.v2.UpdateSinkRequest.newBuilder()
    private Builder() {
      super(DEFAULT_INSTANCE);
    }


    /**
     * <pre>
     * Required. The full resource name of the sink to update, including the parent
     * resource and the sink identifier:
     *     "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]"
     * Example: `"projects/my-project-id/sinks/my-sink-id"`.
     * </pre>
     *
     * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
     * @return The sinkName.
     */
    @java.lang.Override
    public java.lang.String getSinkName() {
      return instance.getSinkName();
    }
    /**
     * <pre>
     * Required. The full resource name of the sink to update, including the parent
     * resource and the sink identifier:
     *     "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]"
     * Example: `"projects/my-project-id/sinks/my-sink-id"`.
     * </pre>
     *
     * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
     * @return The bytes for sinkName.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getSinkNameBytes() {
      return instance.getSinkNameBytes();
    }
    /**
     * <pre>
     * Required. The full resource name of the sink to update, including the parent
     * resource and the sink identifier:
     *     "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]"
     * Example: `"projects/my-project-id/sinks/my-sink-id"`.
     * </pre>
     *
     * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
     * @param value The sinkName to set.
     * @return This builder for chaining.
     */
    public Builder setSinkName(
        java.lang.String value) {
      copyOnWrite();
      instance.setSinkName(value);
      return this;
    }
    /**
     * <pre>
     * Required. The full resource name of the sink to update, including the parent
     * resource and the sink identifier:
     *     "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]"
     * Example: `"projects/my-project-id/sinks/my-sink-id"`.
     * </pre>
     *
     * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
     * @return This builder for chaining.
     */
    public Builder clearSinkName() {
      copyOnWrite();
      instance.clearSinkName();
      return this;
    }
    /**
     * <pre>
     * Required. The full resource name of the sink to update, including the parent
     * resource and the sink identifier:
     *     "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]"
     * Example: `"projects/my-project-id/sinks/my-sink-id"`.
     * </pre>
     *
     * <code>string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }</code>
     * @param value The bytes for sinkName to set.
     * @return This builder for chaining.
     */
    public Builder setSinkNameBytes(
        com.google.protobuf.ByteString value) {
      copyOnWrite();
      instance.setSinkNameBytes(value);
      return this;
    }

    /**
     * <pre>
     * Required. The updated sink, whose name is the same identifier that appears as part
     * of `sink_name`.
     * </pre>
     *
     * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    @java.lang.Override
    public boolean hasSink() {
      return instance.hasSink();
    }
    /**
     * <pre>
     * Required. The updated sink, whose name is the same identifier that appears as part
     * of `sink_name`.
     * </pre>
     *
     * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    @java.lang.Override
    public com.google.logging.v2.LogSink getSink() {
      return instance.getSink();
    }
    /**
     * <pre>
     * Required. The updated sink, whose name is the same identifier that appears as part
     * of `sink_name`.
     * </pre>
     *
     * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setSink(com.google.logging.v2.LogSink value) {
      copyOnWrite();
      instance.setSink(value);
      return this;
      }
    /**
     * <pre>
     * Required. The updated sink, whose name is the same identifier that appears as part
     * of `sink_name`.
     * </pre>
     *
     * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setSink(
        com.google.logging.v2.LogSink.Builder builderForValue) {
      copyOnWrite();
      instance.setSink(builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Required. The updated sink, whose name is the same identifier that appears as part
     * of `sink_name`.
     * </pre>
     *
     * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder mergeSink(com.google.logging.v2.LogSink value) {
      copyOnWrite();
      instance.mergeSink(value);
      return this;
    }
    /**
     * <pre>
     * Required. The updated sink, whose name is the same identifier that appears as part
     * of `sink_name`.
     * </pre>
     *
     * <code>.google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder clearSink() {  copyOnWrite();
      instance.clearSink();
      return this;
    }

    /**
     * <pre>
     * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
     * for a description of this field. When updating a sink, the effect of this
     * field on the value of `writer_identity` in the updated sink depends on both
     * the old and new values of this field:
     * +   If the old and new values of this field are both false or both true,
     *     then there is no change to the sink's `writer_identity`.
     * +   If the old value is false and the new value is true, then
     *     `writer_identity` is changed to a unique service account.
     * +   It is an error if the old value is true and the new value is
     *     set to false or defaulted to false.
     * </pre>
     *
     * <code>bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return The uniqueWriterIdentity.
     */
    @java.lang.Override
    public boolean getUniqueWriterIdentity() {
      return instance.getUniqueWriterIdentity();
    }
    /**
     * <pre>
     * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
     * for a description of this field. When updating a sink, the effect of this
     * field on the value of `writer_identity` in the updated sink depends on both
     * the old and new values of this field:
     * +   If the old and new values of this field are both false or both true,
     *     then there is no change to the sink's `writer_identity`.
     * +   If the old value is false and the new value is true, then
     *     `writer_identity` is changed to a unique service account.
     * +   It is an error if the old value is true and the new value is
     *     set to false or defaulted to false.
     * </pre>
     *
     * <code>bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param value The uniqueWriterIdentity to set.
     * @return This builder for chaining.
     */
    public Builder setUniqueWriterIdentity(boolean value) {
      copyOnWrite();
      instance.setUniqueWriterIdentity(value);
      return this;
    }
    /**
     * <pre>
     * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink]
     * for a description of this field. When updating a sink, the effect of this
     * field on the value of `writer_identity` in the updated sink depends on both
     * the old and new values of this field:
     * +   If the old and new values of this field are both false or both true,
     *     then there is no change to the sink's `writer_identity`.
     * +   If the old value is false and the new value is true, then
     *     `writer_identity` is changed to a unique service account.
     * +   It is an error if the old value is true and the new value is
     *     set to false or defaulted to false.
     * </pre>
     *
     * <code>bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return This builder for chaining.
     */
    public Builder clearUniqueWriterIdentity() {
      copyOnWrite();
      instance.clearUniqueWriterIdentity();
      return this;
    }

    /**
     * <pre>
     * Optional. Field mask that specifies the fields in `sink` that need
     * an update. A sink field will be overwritten if, and only if, it is
     * in the update mask. `name` and output only fields cannot be updated.
     * An empty updateMask is temporarily treated as using the following mask
     * for backwards compatibility purposes:
     *   destination,filter,includeChildren
     * At some point in the future, behavior will be removed and specifying an
     * empty updateMask will be an error.
     * For a detailed `FieldMask` definition, see
     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
     * Example: `updateMask=filter`.
     * </pre>
     *
     * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public boolean hasUpdateMask() {
      return instance.hasUpdateMask();
    }
    /**
     * <pre>
     * Optional. Field mask that specifies the fields in `sink` that need
     * an update. A sink field will be overwritten if, and only if, it is
     * in the update mask. `name` and output only fields cannot be updated.
     * An empty updateMask is temporarily treated as using the following mask
     * for backwards compatibility purposes:
     *   destination,filter,includeChildren
     * At some point in the future, behavior will be removed and specifying an
     * empty updateMask will be an error.
     * For a detailed `FieldMask` definition, see
     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
     * Example: `updateMask=filter`.
     * </pre>
     *
     * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    @java.lang.Override
    public com.google.protobuf.FieldMask getUpdateMask() {
      return instance.getUpdateMask();
    }
    /**
     * <pre>
     * Optional. Field mask that specifies the fields in `sink` that need
     * an update. A sink field will be overwritten if, and only if, it is
     * in the update mask. `name` and output only fields cannot be updated.
     * An empty updateMask is temporarily treated as using the following mask
     * for backwards compatibility purposes:
     *   destination,filter,includeChildren
     * At some point in the future, behavior will be removed and specifying an
     * empty updateMask will be an error.
     * For a detailed `FieldMask` definition, see
     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
     * Example: `updateMask=filter`.
     * </pre>
     *
     * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder setUpdateMask(com.google.protobuf.FieldMask value) {
      copyOnWrite();
      instance.setUpdateMask(value);
      return this;
      }
    /**
     * <pre>
     * Optional. Field mask that specifies the fields in `sink` that need
     * an update. A sink field will be overwritten if, and only if, it is
     * in the update mask. `name` and output only fields cannot be updated.
     * An empty updateMask is temporarily treated as using the following mask
     * for backwards compatibility purposes:
     *   destination,filter,includeChildren
     * At some point in the future, behavior will be removed and specifying an
     * empty updateMask will be an error.
     * For a detailed `FieldMask` definition, see
     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
     * Example: `updateMask=filter`.
     * </pre>
     *
     * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder setUpdateMask(
        com.google.protobuf.FieldMask.Builder builderForValue) {
      copyOnWrite();
      instance.setUpdateMask(builderForValue.build());
      return this;
    }
    /**
     * <pre>
     * Optional. Field mask that specifies the fields in `sink` that need
     * an update. A sink field will be overwritten if, and only if, it is
     * in the update mask. `name` and output only fields cannot be updated.
     * An empty updateMask is temporarily treated as using the following mask
     * for backwards compatibility purposes:
     *   destination,filter,includeChildren
     * At some point in the future, behavior will be removed and specifying an
     * empty updateMask will be an error.
     * For a detailed `FieldMask` definition, see
     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
     * Example: `updateMask=filter`.
     * </pre>
     *
     * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) {
      copyOnWrite();
      instance.mergeUpdateMask(value);
      return this;
    }
    /**
     * <pre>
     * Optional. Field mask that specifies the fields in `sink` that need
     * an update. A sink field will be overwritten if, and only if, it is
     * in the update mask. `name` and output only fields cannot be updated.
     * An empty updateMask is temporarily treated as using the following mask
     * for backwards compatibility purposes:
     *   destination,filter,includeChildren
     * At some point in the future, behavior will be removed and specifying an
     * empty updateMask will be an error.
     * For a detailed `FieldMask` definition, see
     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask
     * Example: `updateMask=filter`.
     * </pre>
     *
     * <code>.google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    public Builder clearUpdateMask() {  copyOnWrite();
      instance.clearUpdateMask();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:google.logging.v2.UpdateSinkRequest)
  }
  @java.lang.Override
  @java.lang.SuppressWarnings({"unchecked", "fallthrough"})
  protected final java.lang.Object dynamicMethod(
      com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
      java.lang.Object arg0, java.lang.Object arg1) {
    switch (method) {
      case NEW_MUTABLE_INSTANCE: {
        return new com.google.logging.v2.UpdateSinkRequest();
      }
      case NEW_BUILDER: {
        return new Builder();
      }
      case BUILD_MESSAGE_INFO: {
          java.lang.Object[] objects = new java.lang.Object[] {
            "sinkName_",
            "sink_",
            "uniqueWriterIdentity_",
            "updateMask_",
          };
          java.lang.String info =
              "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\u0208\u0002\t" +
              "\u0003\u0007\u0004\t";
          return newMessageInfo(DEFAULT_INSTANCE, info, objects);
      }
      // fall through
      case GET_DEFAULT_INSTANCE: {
        return DEFAULT_INSTANCE;
      }
      case GET_PARSER: {
        com.google.protobuf.Parser<com.google.logging.v2.UpdateSinkRequest> parser = PARSER;
        if (parser == null) {
          synchronized (com.google.logging.v2.UpdateSinkRequest.class) {
            parser = PARSER;
            if (parser == null) {
              parser =
                  new DefaultInstanceBasedParser<com.google.logging.v2.UpdateSinkRequest>(
                      DEFAULT_INSTANCE);
              PARSER = parser;
            }
          }
        }
        return parser;
    }
    case GET_MEMOIZED_IS_INITIALIZED: {
      return (byte) 1;
    }
    case SET_MEMOIZED_IS_INITIALIZED: {
      return null;
    }
    }
    throw new UnsupportedOperationException();
  }


  // @@protoc_insertion_point(class_scope:google.logging.v2.UpdateSinkRequest)
  private static final com.google.logging.v2.UpdateSinkRequest DEFAULT_INSTANCE;
  static {
    UpdateSinkRequest defaultInstance = new UpdateSinkRequest();
    // New instances are implicitly immutable so no need to make
    // immutable.
    DEFAULT_INSTANCE = defaultInstance;
    com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
      UpdateSinkRequest.class, defaultInstance);
  }

  public static com.google.logging.v2.UpdateSinkRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static volatile com.google.protobuf.Parser<UpdateSinkRequest> PARSER;

  public static com.google.protobuf.Parser<UpdateSinkRequest> parser() {
    return DEFAULT_INSTANCE.getParserForType();
  }
}

