// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/longrunning/operations.proto

package com.google.longrunning;

/**
 * <pre>
 * A message representing the message types used by a long-running operation.
 * Example:
 *   rpc LongRunningRecognize(LongRunningRecognizeRequest)
 *       returns (google.longrunning.Operation) {
 *     option (google.longrunning.operation_info) = {
 *       response_type: "LongRunningRecognizeResponse"
 *       metadata_type: "LongRunningRecognizeMetadata"
 *     };
 *   }
 * </pre>
 *
 * Protobuf type {@code google.longrunning.OperationInfo}
 */
public  final class OperationInfo extends
    com.google.protobuf.GeneratedMessageLite<
        OperationInfo, OperationInfo.Builder> implements
    // @@protoc_insertion_point(message_implements:google.longrunning.OperationInfo)
    OperationInfoOrBuilder {
  private OperationInfo() {
    responseType_ = "";
    metadataType_ = "";
  }
  public static final int RESPONSE_TYPE_FIELD_NUMBER = 1;
  private java.lang.String responseType_;
  /**
   * <pre>
   * Required. The message name of the primary return type for this
   * long-running operation.
   * This type will be used to deserialize the LRO's response.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string response_type = 1;</code>
   * @return The responseType.
   */
  @java.lang.Override
  public java.lang.String getResponseType() {
    return responseType_;
  }
  /**
   * <pre>
   * Required. The message name of the primary return type for this
   * long-running operation.
   * This type will be used to deserialize the LRO's response.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string response_type = 1;</code>
   * @return The bytes for responseType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getResponseTypeBytes() {
    return com.google.protobuf.ByteString.copyFromUtf8(responseType_);
  }
  /**
   * <pre>
   * Required. The message name of the primary return type for this
   * long-running operation.
   * This type will be used to deserialize the LRO's response.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string response_type = 1;</code>
   * @param value The responseType to set.
   */
  private void setResponseType(
      java.lang.String value) {
    value.getClass();
  
    responseType_ = value;
  }
  /**
   * <pre>
   * Required. The message name of the primary return type for this
   * long-running operation.
   * This type will be used to deserialize the LRO's response.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string response_type = 1;</code>
   */
  private void clearResponseType() {
    
    responseType_ = getDefaultInstance().getResponseType();
  }
  /**
   * <pre>
   * Required. The message name of the primary return type for this
   * long-running operation.
   * This type will be used to deserialize the LRO's response.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string response_type = 1;</code>
   * @param value The bytes for responseType to set.
   */
  private void setResponseTypeBytes(
      com.google.protobuf.ByteString value) {
    checkByteStringIsUtf8(value);
    responseType_ = value.toStringUtf8();
    
  }

  public static final int METADATA_TYPE_FIELD_NUMBER = 2;
  private java.lang.String metadataType_;
  /**
   * <pre>
   * Required. The message name of the metadata type for this long-running
   * operation.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string metadata_type = 2;</code>
   * @return The metadataType.
   */
  @java.lang.Override
  public java.lang.String getMetadataType() {
    return metadataType_;
  }
  /**
   * <pre>
   * Required. The message name of the metadata type for this long-running
   * operation.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string metadata_type = 2;</code>
   * @return The bytes for metadataType.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getMetadataTypeBytes() {
    return com.google.protobuf.ByteString.copyFromUtf8(metadataType_);
  }
  /**
   * <pre>
   * Required. The message name of the metadata type for this long-running
   * operation.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string metadata_type = 2;</code>
   * @param value The metadataType to set.
   */
  private void setMetadataType(
      java.lang.String value) {
    value.getClass();
  
    metadataType_ = value;
  }
  /**
   * <pre>
   * Required. The message name of the metadata type for this long-running
   * operation.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string metadata_type = 2;</code>
   */
  private void clearMetadataType() {
    
    metadataType_ = getDefaultInstance().getMetadataType();
  }
  /**
   * <pre>
   * Required. The message name of the metadata type for this long-running
   * operation.
   * If the response is in a different package from the rpc, a fully-qualified
   * message name must be used (e.g. `google.protobuf.Struct`).
   * Note: Altering this value constitutes a breaking change.
   * </pre>
   *
   * <code>string metadata_type = 2;</code>
   * @param value The bytes for metadataType to set.
   */
  private void setMetadataTypeBytes(
      com.google.protobuf.ByteString value) {
    checkByteStringIsUtf8(value);
    metadataType_ = value.toStringUtf8();
    
  }

  public static com.google.longrunning.OperationInfo parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.longrunning.OperationInfo 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.longrunning.OperationInfo parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.longrunning.OperationInfo 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.longrunning.OperationInfo parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, data);
  }
  public static com.google.longrunning.OperationInfo 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.longrunning.OperationInfo parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.longrunning.OperationInfo 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.longrunning.OperationInfo parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input);
  }
  public static com.google.longrunning.OperationInfo parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
  }
  public static com.google.longrunning.OperationInfo parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageLite.parseFrom(
        DEFAULT_INSTANCE, input);
  }
  public static com.google.longrunning.OperationInfo 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.longrunning.OperationInfo prototype) {
    return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
  }

  /**
   * <pre>
   * A message representing the message types used by a long-running operation.
   * Example:
   *   rpc LongRunningRecognize(LongRunningRecognizeRequest)
   *       returns (google.longrunning.Operation) {
   *     option (google.longrunning.operation_info) = {
   *       response_type: "LongRunningRecognizeResponse"
   *       metadata_type: "LongRunningRecognizeMetadata"
   *     };
   *   }
   * </pre>
   *
   * Protobuf type {@code google.longrunning.OperationInfo}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageLite.Builder<
        com.google.longrunning.OperationInfo, Builder> implements
      // @@protoc_insertion_point(builder_implements:google.longrunning.OperationInfo)
      com.google.longrunning.OperationInfoOrBuilder {
    // Construct using com.google.longrunning.OperationInfo.newBuilder()
    private Builder() {
      super(DEFAULT_INSTANCE);
    }


    /**
     * <pre>
     * Required. The message name of the primary return type for this
     * long-running operation.
     * This type will be used to deserialize the LRO's response.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string response_type = 1;</code>
     * @return The responseType.
     */
    @java.lang.Override
    public java.lang.String getResponseType() {
      return instance.getResponseType();
    }
    /**
     * <pre>
     * Required. The message name of the primary return type for this
     * long-running operation.
     * This type will be used to deserialize the LRO's response.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string response_type = 1;</code>
     * @return The bytes for responseType.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getResponseTypeBytes() {
      return instance.getResponseTypeBytes();
    }
    /**
     * <pre>
     * Required. The message name of the primary return type for this
     * long-running operation.
     * This type will be used to deserialize the LRO's response.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string response_type = 1;</code>
     * @param value The responseType to set.
     * @return This builder for chaining.
     */
    public Builder setResponseType(
        java.lang.String value) {
      copyOnWrite();
      instance.setResponseType(value);
      return this;
    }
    /**
     * <pre>
     * Required. The message name of the primary return type for this
     * long-running operation.
     * This type will be used to deserialize the LRO's response.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string response_type = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearResponseType() {
      copyOnWrite();
      instance.clearResponseType();
      return this;
    }
    /**
     * <pre>
     * Required. The message name of the primary return type for this
     * long-running operation.
     * This type will be used to deserialize the LRO's response.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string response_type = 1;</code>
     * @param value The bytes for responseType to set.
     * @return This builder for chaining.
     */
    public Builder setResponseTypeBytes(
        com.google.protobuf.ByteString value) {
      copyOnWrite();
      instance.setResponseTypeBytes(value);
      return this;
    }

    /**
     * <pre>
     * Required. The message name of the metadata type for this long-running
     * operation.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string metadata_type = 2;</code>
     * @return The metadataType.
     */
    @java.lang.Override
    public java.lang.String getMetadataType() {
      return instance.getMetadataType();
    }
    /**
     * <pre>
     * Required. The message name of the metadata type for this long-running
     * operation.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string metadata_type = 2;</code>
     * @return The bytes for metadataType.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getMetadataTypeBytes() {
      return instance.getMetadataTypeBytes();
    }
    /**
     * <pre>
     * Required. The message name of the metadata type for this long-running
     * operation.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string metadata_type = 2;</code>
     * @param value The metadataType to set.
     * @return This builder for chaining.
     */
    public Builder setMetadataType(
        java.lang.String value) {
      copyOnWrite();
      instance.setMetadataType(value);
      return this;
    }
    /**
     * <pre>
     * Required. The message name of the metadata type for this long-running
     * operation.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string metadata_type = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearMetadataType() {
      copyOnWrite();
      instance.clearMetadataType();
      return this;
    }
    /**
     * <pre>
     * Required. The message name of the metadata type for this long-running
     * operation.
     * If the response is in a different package from the rpc, a fully-qualified
     * message name must be used (e.g. `google.protobuf.Struct`).
     * Note: Altering this value constitutes a breaking change.
     * </pre>
     *
     * <code>string metadata_type = 2;</code>
     * @param value The bytes for metadataType to set.
     * @return This builder for chaining.
     */
    public Builder setMetadataTypeBytes(
        com.google.protobuf.ByteString value) {
      copyOnWrite();
      instance.setMetadataTypeBytes(value);
      return this;
    }

    // @@protoc_insertion_point(builder_scope:google.longrunning.OperationInfo)
  }
  @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.longrunning.OperationInfo();
      }
      case NEW_BUILDER: {
        return new Builder();
      }
      case BUILD_MESSAGE_INFO: {
          java.lang.Object[] objects = new java.lang.Object[] {
            "responseType_",
            "metadataType_",
          };
          java.lang.String info =
              "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0208\u0002\u0208" +
              "";
          return newMessageInfo(DEFAULT_INSTANCE, info, objects);
      }
      // fall through
      case GET_DEFAULT_INSTANCE: {
        return DEFAULT_INSTANCE;
      }
      case GET_PARSER: {
        com.google.protobuf.Parser<com.google.longrunning.OperationInfo> parser = PARSER;
        if (parser == null) {
          synchronized (com.google.longrunning.OperationInfo.class) {
            parser = PARSER;
            if (parser == null) {
              parser =
                  new DefaultInstanceBasedParser<com.google.longrunning.OperationInfo>(
                      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.longrunning.OperationInfo)
  private static final com.google.longrunning.OperationInfo DEFAULT_INSTANCE;
  static {
    OperationInfo defaultInstance = new OperationInfo();
    // New instances are implicitly immutable so no need to make
    // immutable.
    DEFAULT_INSTANCE = defaultInstance;
    com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
      OperationInfo.class, defaultInstance);
  }

  public static com.google.longrunning.OperationInfo getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

