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

com.google.appengine.api.urlfetch.URLFetchServicePb Maven / Gradle / Ivy

Go to download

API for Google App Engine standard environment with some of the dependencies shaded (repackaged)

There is a newer version: 2.0.27
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: urlfetch_service.proto

package com.google.appengine.api.urlfetch;

public final class URLFetchServicePb {
  private URLFetchServicePb() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface URLFetchServiceErrorOrBuilder extends
      // @@protoc_insertion_point(interface_extends:java.apphosting.URLFetchServiceError)
      com.google.protobuf.MessageOrBuilder {
  }
  /**
   * Protobuf type {@code java.apphosting.URLFetchServiceError}
   */
  public static final class URLFetchServiceError extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:java.apphosting.URLFetchServiceError)
      URLFetchServiceErrorOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use URLFetchServiceError.newBuilder() to construct.
    private URLFetchServiceError(com.google.protobuf.GeneratedMessageV3.Builder builder) {
      super(builder);
    }
    private URLFetchServiceError() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new URLFetchServiceError();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchServiceError_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchServiceError_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError.Builder.class);
    }

    /**
     * Protobuf enum {@code java.apphosting.URLFetchServiceError.ErrorCode}
     */
    public enum ErrorCode
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * OK = 0;
       */
      OK(0),
      /**
       * INVALID_URL = 1;
       */
      INVALID_URL(1),
      /**
       * FETCH_ERROR = 2;
       */
      FETCH_ERROR(2),
      /**
       * UNSPECIFIED_ERROR = 3;
       */
      UNSPECIFIED_ERROR(3),
      /**
       * RESPONSE_TOO_LARGE = 4;
       */
      RESPONSE_TOO_LARGE(4),
      /**
       * DEADLINE_EXCEEDED = 5;
       */
      DEADLINE_EXCEEDED(5),
      /**
       * SSL_CERTIFICATE_ERROR = 6;
       */
      SSL_CERTIFICATE_ERROR(6),
      /**
       * DNS_ERROR = 7;
       */
      DNS_ERROR(7),
      /**
       * CLOSED = 8;
       */
      CLOSED(8),
      /**
       * INTERNAL_TRANSIENT_ERROR = 9;
       */
      INTERNAL_TRANSIENT_ERROR(9),
      /**
       * TOO_MANY_REDIRECTS = 10;
       */
      TOO_MANY_REDIRECTS(10),
      /**
       * MALFORMED_REPLY = 11;
       */
      MALFORMED_REPLY(11),
      /**
       * CONNECTION_ERROR = 12;
       */
      CONNECTION_ERROR(12),
      /**
       * PAYLOAD_TOO_LARGE = 13;
       */
      PAYLOAD_TOO_LARGE(13),
      ;

      /**
       * OK = 0;
       */
      public static final int OK_VALUE = 0;
      /**
       * INVALID_URL = 1;
       */
      public static final int INVALID_URL_VALUE = 1;
      /**
       * FETCH_ERROR = 2;
       */
      public static final int FETCH_ERROR_VALUE = 2;
      /**
       * UNSPECIFIED_ERROR = 3;
       */
      public static final int UNSPECIFIED_ERROR_VALUE = 3;
      /**
       * RESPONSE_TOO_LARGE = 4;
       */
      public static final int RESPONSE_TOO_LARGE_VALUE = 4;
      /**
       * DEADLINE_EXCEEDED = 5;
       */
      public static final int DEADLINE_EXCEEDED_VALUE = 5;
      /**
       * SSL_CERTIFICATE_ERROR = 6;
       */
      public static final int SSL_CERTIFICATE_ERROR_VALUE = 6;
      /**
       * DNS_ERROR = 7;
       */
      public static final int DNS_ERROR_VALUE = 7;
      /**
       * CLOSED = 8;
       */
      public static final int CLOSED_VALUE = 8;
      /**
       * INTERNAL_TRANSIENT_ERROR = 9;
       */
      public static final int INTERNAL_TRANSIENT_ERROR_VALUE = 9;
      /**
       * TOO_MANY_REDIRECTS = 10;
       */
      public static final int TOO_MANY_REDIRECTS_VALUE = 10;
      /**
       * MALFORMED_REPLY = 11;
       */
      public static final int MALFORMED_REPLY_VALUE = 11;
      /**
       * CONNECTION_ERROR = 12;
       */
      public static final int CONNECTION_ERROR_VALUE = 12;
      /**
       * PAYLOAD_TOO_LARGE = 13;
       */
      public static final int PAYLOAD_TOO_LARGE_VALUE = 13;


      public final int getNumber() {
        return value;
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static ErrorCode valueOf(int value) {
        return forNumber(value);
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       */
      public static ErrorCode forNumber(int value) {
        switch (value) {
          case 0: return OK;
          case 1: return INVALID_URL;
          case 2: return FETCH_ERROR;
          case 3: return UNSPECIFIED_ERROR;
          case 4: return RESPONSE_TOO_LARGE;
          case 5: return DEADLINE_EXCEEDED;
          case 6: return SSL_CERTIFICATE_ERROR;
          case 7: return DNS_ERROR;
          case 8: return CLOSED;
          case 9: return INTERNAL_TRANSIENT_ERROR;
          case 10: return TOO_MANY_REDIRECTS;
          case 11: return MALFORMED_REPLY;
          case 12: return CONNECTION_ERROR;
          case 13: return PAYLOAD_TOO_LARGE;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          ErrorCode> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap() {
              public ErrorCode findValueByNumber(int number) {
                return ErrorCode.forNumber(number);
              }
            };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(ordinal());
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError.getDescriptor().getEnumTypes().get(0);
      }

      private static final ErrorCode[] VALUES = values();

      public static ErrorCode valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        return VALUES[desc.getIndex()];
      }

      private final int value;

      private ErrorCode(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:java.apphosting.URLFetchServiceError.ErrorCode)
    }

    private byte memoizedIsInitialized = -1;
    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError)) {
        return super.equals(obj);
      }
      com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError other = (com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError) obj;

      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * Protobuf type {@code java.apphosting.URLFetchServiceError}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder implements
        // @@protoc_insertion_point(builder_implements:java.apphosting.URLFetchServiceError)
        com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceErrorOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchServiceError_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchServiceError_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError.Builder.class);
      }

      // Construct using com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError.newBuilder()
      private Builder() {

      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);

      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchServiceError_descriptor;
      }

      @java.lang.Override
      public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError getDefaultInstanceForType() {
        return com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError build() {
        com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError buildPartial() {
        com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError result = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError(this);
        onBuilt();
        return result;
      }

      @java.lang.Override
      public Builder clone() {
        return super.clone();
      }
      @java.lang.Override
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.setField(field, value);
      }
      @java.lang.Override
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return super.clearField(field);
      }
      @java.lang.Override
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return super.clearOneof(oneof);
      }
      @java.lang.Override
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return super.setRepeatedField(field, index, value);
      }
      @java.lang.Override
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return super.addRepeatedField(field, value);
      }
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError) {
          return mergeFrom((com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError other) {
        if (other == com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError.getDefaultInstance()) return this;
        this.mergeUnknownFields(other.getUnknownFields());
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              default: {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }
      @java.lang.Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

      @java.lang.Override
      public final Builder mergeUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.mergeUnknownFields(unknownFields);
      }


      // @@protoc_insertion_point(builder_scope:java.apphosting.URLFetchServiceError)
    }

    // @@protoc_insertion_point(class_scope:java.apphosting.URLFetchServiceError)
    private static final com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError();
    }

    public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser
        PARSER = new com.google.protobuf.AbstractParser() {
      @java.lang.Override
      public URLFetchServiceError parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        Builder builder = newBuilder();
        try {
          builder.mergeFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(builder.buildPartial());
        } catch (com.google.protobuf.UninitializedMessageException e) {
          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(builder.buildPartial());
        }
        return builder.buildPartial();
      }
    };

    public static com.google.protobuf.Parser parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchServiceError getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface URLFetchRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:java.apphosting.URLFetchRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * required .java.apphosting.URLFetchRequest.RequestMethod Method = 1;
     * @return Whether the method field is set.
     */
    boolean hasMethod();
    /**
     * required .java.apphosting.URLFetchRequest.RequestMethod Method = 1;
     * @return The method.
     */
    com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod getMethod();

    /**
     * required string Url = 2;
     * @return Whether the url field is set.
     */
    boolean hasUrl();
    /**
     * required string Url = 2;
     * @return The url.
     */
    java.lang.String getUrl();
    /**
     * required string Url = 2;
     * @return The bytes for url.
     */
    com.google.protobuf.ByteString
        getUrlBytes();

    /**
     * repeated group Header = 3 { ... }
     */
    java.util.List 
        getHeaderList();
    /**
     * repeated group Header = 3 { ... }
     */
    com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header getHeader(int index);
    /**
     * repeated group Header = 3 { ... }
     */
    int getHeaderCount();
    /**
     * repeated group Header = 3 { ... }
     */
    java.util.List 
        getHeaderOrBuilderList();
    /**
     * repeated group Header = 3 { ... }
     */
    com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.HeaderOrBuilder getHeaderOrBuilder(
        int index);

    /**
     * 
     * Only specify a payload for POST, PUT and PATCH requests
     * 
* * optional bytes Payload = 6 [ctype = CORD]; * @return Whether the payload field is set. */ boolean hasPayload(); /** *
     * Only specify a payload for POST, PUT and PATCH requests
     * 
* * optional bytes Payload = 6 [ctype = CORD]; * @return The payload. */ com.google.protobuf.ByteString getPayload(); /** *
     * If false, Fastnet will return the real HTTP redirect status code.
     * (this is required for e.g. OpenID RP implementations).  By
     * default, or when this is true, Prometheus sets this to something
     * like 5, but hides the redirect chain from the end user and any
     * eventual successful fetch results in a 200 OK.
     * NOTE: For historical reasons this must be set to false to permit
     * the use of HttpOverRpc back to App Engine. b/22785370
     * 
* * optional bool FollowRedirects = 7 [default = true]; * @return Whether the followRedirects field is set. */ boolean hasFollowRedirects(); /** *
     * If false, Fastnet will return the real HTTP redirect status code.
     * (this is required for e.g. OpenID RP implementations).  By
     * default, or when this is true, Prometheus sets this to something
     * like 5, but hides the redirect chain from the end user and any
     * eventual successful fetch results in a 200 OK.
     * NOTE: For historical reasons this must be set to false to permit
     * the use of HttpOverRpc back to App Engine. b/22785370
     * 
* * optional bool FollowRedirects = 7 [default = true]; * @return The followRedirects. */ boolean getFollowRedirects(); /** *
     * The timeout for the request in seconds.
     * 
* * optional double Deadline = 8; * @return Whether the deadline field is set. */ boolean hasDeadline(); /** *
     * The timeout for the request in seconds.
     * 
* * optional double Deadline = 8; * @return The deadline. */ double getDeadline(); /** *
     * If true, Harpoon will drop the connection and fail the request if it
     * encounters an invalid certificate.
     * WARNING: Do not rely on the default value of this field for certificate
     * validation. There is an appserver flag that applies if the default value
     * is used (urlfetch_harpoon_failonsslcertificateerror_default) which is
     * currently (as of August 2015) set to false. If you want certificate
     * validation then always set the value of this field to true. b/1829826
     * 
* * optional bool MustValidateServerCertificate = 9 [default = true]; * @return Whether the mustValidateServerCertificate field is set. */ boolean hasMustValidateServerCertificate(); /** *
     * If true, Harpoon will drop the connection and fail the request if it
     * encounters an invalid certificate.
     * WARNING: Do not rely on the default value of this field for certificate
     * validation. There is an appserver flag that applies if the default value
     * is used (urlfetch_harpoon_failonsslcertificateerror_default) which is
     * currently (as of August 2015) set to false. If you want certificate
     * validation then always set the value of this field to true. b/1829826
     * 
* * optional bool MustValidateServerCertificate = 9 [default = true]; * @return The mustValidateServerCertificate. */ boolean getMustValidateServerCertificate(); } /** * Protobuf type {@code java.apphosting.URLFetchRequest} */ public static final class URLFetchRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:java.apphosting.URLFetchRequest) URLFetchRequestOrBuilder { private static final long serialVersionUID = 0L; // Use URLFetchRequest.newBuilder() to construct. private URLFetchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private URLFetchRequest() { method_ = 1; url_ = ""; header_ = java.util.Collections.emptyList(); payload_ = com.google.protobuf.ByteString.EMPTY; followRedirects_ = true; mustValidateServerCertificate_ = true; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new URLFetchRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Builder.class); } /** * Protobuf enum {@code java.apphosting.URLFetchRequest.RequestMethod} */ public enum RequestMethod implements com.google.protobuf.ProtocolMessageEnum { /** * GET = 1; */ GET(1), /** * POST = 2; */ POST(2), /** * HEAD = 3; */ HEAD(3), /** * PUT = 4; */ PUT(4), /** * DELETE = 5; */ DELETE(5), /** * PATCH = 6; */ PATCH(6), ; /** * GET = 1; */ public static final int GET_VALUE = 1; /** * POST = 2; */ public static final int POST_VALUE = 2; /** * HEAD = 3; */ public static final int HEAD_VALUE = 3; /** * PUT = 4; */ public static final int PUT_VALUE = 4; /** * DELETE = 5; */ public static final int DELETE_VALUE = 5; /** * PATCH = 6; */ public static final int PATCH_VALUE = 6; public final int getNumber() { return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static RequestMethod valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static RequestMethod forNumber(int value) { switch (value) { case 1: return GET; case 2: return POST; case 3: return HEAD; case 4: return PUT; case 5: return DELETE; case 6: return PATCH; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< RequestMethod> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public RequestMethod findValueByNumber(int number) { return RequestMethod.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.getDescriptor().getEnumTypes().get(0); } private static final RequestMethod[] VALUES = values(); public static RequestMethod valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int value; private RequestMethod(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:java.apphosting.URLFetchRequest.RequestMethod) } public interface HeaderOrBuilder extends // @@protoc_insertion_point(interface_extends:java.apphosting.URLFetchRequest.Header) com.google.protobuf.MessageOrBuilder { /** * required string Key = 4; * @return Whether the key field is set. */ boolean hasKey(); /** * required string Key = 4; * @return The key. */ java.lang.String getKey(); /** * required string Key = 4; * @return The bytes for key. */ com.google.protobuf.ByteString getKeyBytes(); /** * required string Value = 5; * @return Whether the value field is set. */ boolean hasValue(); /** * required string Value = 5; * @return The value. */ java.lang.String getValue(); /** * required string Value = 5; * @return The bytes for value. */ com.google.protobuf.ByteString getValueBytes(); } /** * Protobuf type {@code java.apphosting.URLFetchRequest.Header} */ public static final class Header extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:java.apphosting.URLFetchRequest.Header) HeaderOrBuilder { private static final long serialVersionUID = 0L; // Use Header.newBuilder() to construct. private Header(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Header() { key_ = ""; value_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Header(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_Header_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_Header_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder.class); } private int bitField0_; public static final int KEY_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object key_ = ""; /** * required string Key = 4; * @return Whether the key field is set. */ @java.lang.Override public boolean hasKey() { return ((bitField0_ & 0x00000001) != 0); } /** * required string Key = 4; * @return The key. */ @java.lang.Override public java.lang.String getKey() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { key_ = s; } return s; } } /** * required string Key = 4; * @return The bytes for key. */ @java.lang.Override public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VALUE_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object value_ = ""; /** * required string Value = 5; * @return Whether the value field is set. */ @java.lang.Override public boolean hasValue() { return ((bitField0_ & 0x00000002) != 0); } /** * required string Value = 5; * @return The value. */ @java.lang.Override public java.lang.String getValue() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { value_ = s; } return s; } } /** * required string Value = 5; * @return The bytes for value. */ @java.lang.Override public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasKey()) { memoizedIsInitialized = 0; return false; } if (!hasValue()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, key_); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, value_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, key_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, value_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header)) { return super.equals(obj); } com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header other = (com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header) obj; if (hasKey() != other.hasKey()) return false; if (hasKey()) { if (!getKey() .equals(other.getKey())) return false; } if (hasValue() != other.hasValue()) return false; if (hasValue()) { if (!getValue() .equals(other.getValue())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasKey()) { hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); } if (hasValue()) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code java.apphosting.URLFetchRequest.Header} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:java.apphosting.URLFetchRequest.Header) com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.HeaderOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_Header_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_Header_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder.class); } // Construct using com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; key_ = ""; value_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_Header_descriptor; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header getDefaultInstanceForType() { return com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.getDefaultInstance(); } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header build() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header buildPartial() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header result = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.key_ = key_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.value_ = value_; to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header) { return mergeFrom((com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header other) { if (other == com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.getDefaultInstance()) return this; if (other.hasKey()) { key_ = other.key_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasValue()) { value_ = other.value_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { if (!hasKey()) { return false; } if (!hasValue()) { return false; } return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 34: { key_ = input.readBytes(); bitField0_ |= 0x00000001; break; } // case 34 case 42: { value_ = input.readBytes(); bitField0_ |= 0x00000002; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object key_ = ""; /** * required string Key = 4; * @return Whether the key field is set. */ public boolean hasKey() { return ((bitField0_ & 0x00000001) != 0); } /** * required string Key = 4; * @return The key. */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { key_ = s; } return s; } else { return (java.lang.String) ref; } } /** * required string Key = 4; * @return The bytes for key. */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * required string Key = 4; * @param value The key to set. * @return This builder for chaining. */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } key_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * required string Key = 4; * @return This builder for chaining. */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * required string Key = 4; * @param value The bytes for key to set. * @return This builder for chaining. */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } key_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object value_ = ""; /** * required string Value = 5; * @return Whether the value field is set. */ public boolean hasValue() { return ((bitField0_ & 0x00000002) != 0); } /** * required string Value = 5; * @return The value. */ public java.lang.String getValue() { java.lang.Object ref = value_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { value_ = s; } return s; } else { return (java.lang.String) ref; } } /** * required string Value = 5; * @return The bytes for value. */ public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * required string Value = 5; * @param value The value to set. * @return This builder for chaining. */ public Builder setValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } value_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * required string Value = 5; * @return This builder for chaining. */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * required string Value = 5; * @param value The bytes for value to set. * @return This builder for chaining. */ public Builder setValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } value_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:java.apphosting.URLFetchRequest.Header) } // @@protoc_insertion_point(class_scope:java.apphosting.URLFetchRequest.Header) private static final com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header(); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser
() { @java.lang.Override public Header parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser
parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser
getParserForType() { return PARSER; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int METHOD_FIELD_NUMBER = 1; private int method_ = 1; /** * required .java.apphosting.URLFetchRequest.RequestMethod Method = 1; * @return Whether the method field is set. */ @java.lang.Override public boolean hasMethod() { return ((bitField0_ & 0x00000001) != 0); } /** * required .java.apphosting.URLFetchRequest.RequestMethod Method = 1; * @return The method. */ @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod getMethod() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod result = com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod.forNumber(method_); return result == null ? com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod.GET : result; } public static final int URL_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object url_ = ""; /** * required string Url = 2; * @return Whether the url field is set. */ @java.lang.Override public boolean hasUrl() { return ((bitField0_ & 0x00000002) != 0); } /** * required string Url = 2; * @return The url. */ @java.lang.Override public java.lang.String getUrl() { java.lang.Object ref = url_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { url_ = s; } return s; } } /** * required string Url = 2; * @return The bytes for url. */ @java.lang.Override public com.google.protobuf.ByteString getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); url_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int HEADER_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List header_; /** * repeated group Header = 3 { ... } */ @java.lang.Override public java.util.List getHeaderList() { return header_; } /** * repeated group Header = 3 { ... } */ @java.lang.Override public java.util.List getHeaderOrBuilderList() { return header_; } /** * repeated group Header = 3 { ... } */ @java.lang.Override public int getHeaderCount() { return header_.size(); } /** * repeated group Header = 3 { ... } */ @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header getHeader(int index) { return header_.get(index); } /** * repeated group Header = 3 { ... } */ @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.HeaderOrBuilder getHeaderOrBuilder( int index) { return header_.get(index); } public static final int PAYLOAD_FIELD_NUMBER = 6; private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; /** *
     * Only specify a payload for POST, PUT and PATCH requests
     * 
* * optional bytes Payload = 6 [ctype = CORD]; * @return Whether the payload field is set. */ @java.lang.Override public boolean hasPayload() { return ((bitField0_ & 0x00000004) != 0); } /** *
     * Only specify a payload for POST, PUT and PATCH requests
     * 
* * optional bytes Payload = 6 [ctype = CORD]; * @return The payload. */ @java.lang.Override public com.google.protobuf.ByteString getPayload() { return payload_; } public static final int FOLLOWREDIRECTS_FIELD_NUMBER = 7; private boolean followRedirects_ = true; /** *
     * If false, Fastnet will return the real HTTP redirect status code.
     * (this is required for e.g. OpenID RP implementations).  By
     * default, or when this is true, Prometheus sets this to something
     * like 5, but hides the redirect chain from the end user and any
     * eventual successful fetch results in a 200 OK.
     * NOTE: For historical reasons this must be set to false to permit
     * the use of HttpOverRpc back to App Engine. b/22785370
     * 
* * optional bool FollowRedirects = 7 [default = true]; * @return Whether the followRedirects field is set. */ @java.lang.Override public boolean hasFollowRedirects() { return ((bitField0_ & 0x00000008) != 0); } /** *
     * If false, Fastnet will return the real HTTP redirect status code.
     * (this is required for e.g. OpenID RP implementations).  By
     * default, or when this is true, Prometheus sets this to something
     * like 5, but hides the redirect chain from the end user and any
     * eventual successful fetch results in a 200 OK.
     * NOTE: For historical reasons this must be set to false to permit
     * the use of HttpOverRpc back to App Engine. b/22785370
     * 
* * optional bool FollowRedirects = 7 [default = true]; * @return The followRedirects. */ @java.lang.Override public boolean getFollowRedirects() { return followRedirects_; } public static final int DEADLINE_FIELD_NUMBER = 8; private double deadline_ = 0D; /** *
     * The timeout for the request in seconds.
     * 
* * optional double Deadline = 8; * @return Whether the deadline field is set. */ @java.lang.Override public boolean hasDeadline() { return ((bitField0_ & 0x00000010) != 0); } /** *
     * The timeout for the request in seconds.
     * 
* * optional double Deadline = 8; * @return The deadline. */ @java.lang.Override public double getDeadline() { return deadline_; } public static final int MUSTVALIDATESERVERCERTIFICATE_FIELD_NUMBER = 9; private boolean mustValidateServerCertificate_ = true; /** *
     * If true, Harpoon will drop the connection and fail the request if it
     * encounters an invalid certificate.
     * WARNING: Do not rely on the default value of this field for certificate
     * validation. There is an appserver flag that applies if the default value
     * is used (urlfetch_harpoon_failonsslcertificateerror_default) which is
     * currently (as of August 2015) set to false. If you want certificate
     * validation then always set the value of this field to true. b/1829826
     * 
* * optional bool MustValidateServerCertificate = 9 [default = true]; * @return Whether the mustValidateServerCertificate field is set. */ @java.lang.Override public boolean hasMustValidateServerCertificate() { return ((bitField0_ & 0x00000020) != 0); } /** *
     * If true, Harpoon will drop the connection and fail the request if it
     * encounters an invalid certificate.
     * WARNING: Do not rely on the default value of this field for certificate
     * validation. There is an appserver flag that applies if the default value
     * is used (urlfetch_harpoon_failonsslcertificateerror_default) which is
     * currently (as of August 2015) set to false. If you want certificate
     * validation then always set the value of this field to true. b/1829826
     * 
* * optional bool MustValidateServerCertificate = 9 [default = true]; * @return The mustValidateServerCertificate. */ @java.lang.Override public boolean getMustValidateServerCertificate() { return mustValidateServerCertificate_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasMethod()) { memoizedIsInitialized = 0; return false; } if (!hasUrl()) { memoizedIsInitialized = 0; return false; } for (int i = 0; i < getHeaderCount(); i++) { if (!getHeader(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeEnum(1, method_); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_); } for (int i = 0; i < header_.size(); i++) { output.writeGroup(3, header_.get(i)); } if (((bitField0_ & 0x00000004) != 0)) { output.writeBytes(6, payload_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeBool(7, followRedirects_); } if (((bitField0_ & 0x00000010) != 0)) { output.writeDouble(8, deadline_); } if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(9, mustValidateServerCertificate_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, method_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_); } for (int i = 0; i < header_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeGroupSize(3, header_.get(i)); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(6, payload_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(7, followRedirects_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream .computeDoubleSize(8, deadline_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(9, mustValidateServerCertificate_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest)) { return super.equals(obj); } com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest other = (com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest) obj; if (hasMethod() != other.hasMethod()) return false; if (hasMethod()) { if (method_ != other.method_) return false; } if (hasUrl() != other.hasUrl()) return false; if (hasUrl()) { if (!getUrl() .equals(other.getUrl())) return false; } if (!getHeaderList() .equals(other.getHeaderList())) return false; if (hasPayload() != other.hasPayload()) return false; if (hasPayload()) { if (!getPayload() .equals(other.getPayload())) return false; } if (hasFollowRedirects() != other.hasFollowRedirects()) return false; if (hasFollowRedirects()) { if (getFollowRedirects() != other.getFollowRedirects()) return false; } if (hasDeadline() != other.hasDeadline()) return false; if (hasDeadline()) { if (java.lang.Double.doubleToLongBits(getDeadline()) != java.lang.Double.doubleToLongBits( other.getDeadline())) return false; } if (hasMustValidateServerCertificate() != other.hasMustValidateServerCertificate()) return false; if (hasMustValidateServerCertificate()) { if (getMustValidateServerCertificate() != other.getMustValidateServerCertificate()) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasMethod()) { hash = (37 * hash) + METHOD_FIELD_NUMBER; hash = (53 * hash) + method_; } if (hasUrl()) { hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); } if (getHeaderCount() > 0) { hash = (37 * hash) + HEADER_FIELD_NUMBER; hash = (53 * hash) + getHeaderList().hashCode(); } if (hasPayload()) { hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; hash = (53 * hash) + getPayload().hashCode(); } if (hasFollowRedirects()) { hash = (37 * hash) + FOLLOWREDIRECTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getFollowRedirects()); } if (hasDeadline()) { hash = (37 * hash) + DEADLINE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getDeadline())); } if (hasMustValidateServerCertificate()) { hash = (37 * hash) + MUSTVALIDATESERVERCERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getMustValidateServerCertificate()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code java.apphosting.URLFetchRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:java.apphosting.URLFetchRequest) com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Builder.class); } // Construct using com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; method_ = 1; url_ = ""; if (headerBuilder_ == null) { header_ = java.util.Collections.emptyList(); } else { header_ = null; headerBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); payload_ = com.google.protobuf.ByteString.EMPTY; followRedirects_ = true; deadline_ = 0D; mustValidateServerCertificate_ = true; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchRequest_descriptor; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest getDefaultInstanceForType() { return com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.getDefaultInstance(); } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest build() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest buildPartial() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest result = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest result) { if (headerBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { header_ = java.util.Collections.unmodifiableList(header_); bitField0_ = (bitField0_ & ~0x00000004); } result.header_ = header_; } else { result.header_ = headerBuilder_.build(); } } private void buildPartial0(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.method_ = method_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.url_ = url_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { result.payload_ = payload_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000010) != 0)) { result.followRedirects_ = followRedirects_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000020) != 0)) { result.deadline_ = deadline_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000040) != 0)) { result.mustValidateServerCertificate_ = mustValidateServerCertificate_; to_bitField0_ |= 0x00000020; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest) { return mergeFrom((com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest other) { if (other == com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.getDefaultInstance()) return this; if (other.hasMethod()) { setMethod(other.getMethod()); } if (other.hasUrl()) { url_ = other.url_; bitField0_ |= 0x00000002; onChanged(); } if (headerBuilder_ == null) { if (!other.header_.isEmpty()) { if (header_.isEmpty()) { header_ = other.header_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureHeaderIsMutable(); header_.addAll(other.header_); } onChanged(); } } else { if (!other.header_.isEmpty()) { if (headerBuilder_.isEmpty()) { headerBuilder_.dispose(); headerBuilder_ = null; header_ = other.header_; bitField0_ = (bitField0_ & ~0x00000004); headerBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getHeaderFieldBuilder() : null; } else { headerBuilder_.addAllMessages(other.header_); } } } if (other.hasPayload()) { setPayload(other.getPayload()); } if (other.hasFollowRedirects()) { setFollowRedirects(other.getFollowRedirects()); } if (other.hasDeadline()) { setDeadline(other.getDeadline()); } if (other.hasMustValidateServerCertificate()) { setMustValidateServerCertificate(other.getMustValidateServerCertificate()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { if (!hasMethod()) { return false; } if (!hasUrl()) { return false; } for (int i = 0; i < getHeaderCount(); i++) { if (!getHeader(i).isInitialized()) { return false; } } return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { int tmpRaw = input.readEnum(); com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod tmpValue = com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod.forNumber(tmpRaw); if (tmpValue == null) { mergeUnknownVarintField(1, tmpRaw); } else { method_ = tmpRaw; bitField0_ |= 0x00000001; } break; } // case 8 case 18: { url_ = input.readBytes(); bitField0_ |= 0x00000002; break; } // case 18 case 27: { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header m = input.readGroup(3, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.PARSER, extensionRegistry); if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.add(m); } else { headerBuilder_.addMessage(m); } break; } // case 27 case 50: { payload_ = input.readBytes(); bitField0_ |= 0x00000008; break; } // case 50 case 56: { followRedirects_ = input.readBool(); bitField0_ |= 0x00000010; break; } // case 56 case 65: { deadline_ = input.readDouble(); bitField0_ |= 0x00000020; break; } // case 65 case 72: { mustValidateServerCertificate_ = input.readBool(); bitField0_ |= 0x00000040; break; } // case 72 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private int method_ = 1; /** * required .java.apphosting.URLFetchRequest.RequestMethod Method = 1; * @return Whether the method field is set. */ @java.lang.Override public boolean hasMethod() { return ((bitField0_ & 0x00000001) != 0); } /** * required .java.apphosting.URLFetchRequest.RequestMethod Method = 1; * @return The method. */ @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod getMethod() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod result = com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod.forNumber(method_); return result == null ? com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod.GET : result; } /** * required .java.apphosting.URLFetchRequest.RequestMethod Method = 1; * @param value The method to set. * @return This builder for chaining. */ public Builder setMethod(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.RequestMethod value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; method_ = value.getNumber(); onChanged(); return this; } /** * required .java.apphosting.URLFetchRequest.RequestMethod Method = 1; * @return This builder for chaining. */ public Builder clearMethod() { bitField0_ = (bitField0_ & ~0x00000001); method_ = 1; onChanged(); return this; } private java.lang.Object url_ = ""; /** * required string Url = 2; * @return Whether the url field is set. */ public boolean hasUrl() { return ((bitField0_ & 0x00000002) != 0); } /** * required string Url = 2; * @return The url. */ public java.lang.String getUrl() { java.lang.Object ref = url_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { url_ = s; } return s; } else { return (java.lang.String) ref; } } /** * required string Url = 2; * @return The bytes for url. */ public com.google.protobuf.ByteString getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); url_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * required string Url = 2; * @param value The url to set. * @return This builder for chaining. */ public Builder setUrl( java.lang.String value) { if (value == null) { throw new NullPointerException(); } url_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * required string Url = 2; * @return This builder for chaining. */ public Builder clearUrl() { url_ = getDefaultInstance().getUrl(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * required string Url = 2; * @param value The bytes for url to set. * @return This builder for chaining. */ public Builder setUrlBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } url_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.util.List header_ = java.util.Collections.emptyList(); private void ensureHeaderIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { header_ = new java.util.ArrayList(header_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.HeaderOrBuilder> headerBuilder_; /** * repeated group Header = 3 { ... } */ public java.util.List getHeaderList() { if (headerBuilder_ == null) { return java.util.Collections.unmodifiableList(header_); } else { return headerBuilder_.getMessageList(); } } /** * repeated group Header = 3 { ... } */ public int getHeaderCount() { if (headerBuilder_ == null) { return header_.size(); } else { return headerBuilder_.getCount(); } } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header getHeader(int index) { if (headerBuilder_ == null) { return header_.get(index); } else { return headerBuilder_.getMessage(index); } } /** * repeated group Header = 3 { ... } */ public Builder setHeader( int index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header value) { if (headerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureHeaderIsMutable(); header_.set(index, value); onChanged(); } else { headerBuilder_.setMessage(index, value); } return this; } /** * repeated group Header = 3 { ... } */ public Builder setHeader( int index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder builderForValue) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.set(index, builderForValue.build()); onChanged(); } else { headerBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addHeader(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header value) { if (headerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureHeaderIsMutable(); header_.add(value); onChanged(); } else { headerBuilder_.addMessage(value); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addHeader( int index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header value) { if (headerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureHeaderIsMutable(); header_.add(index, value); onChanged(); } else { headerBuilder_.addMessage(index, value); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addHeader( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder builderForValue) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.add(builderForValue.build()); onChanged(); } else { headerBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addHeader( int index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder builderForValue) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.add(index, builderForValue.build()); onChanged(); } else { headerBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addAllHeader( java.lang.Iterable values) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, header_); onChanged(); } else { headerBuilder_.addAllMessages(values); } return this; } /** * repeated group Header = 3 { ... } */ public Builder clearHeader() { if (headerBuilder_ == null) { header_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { headerBuilder_.clear(); } return this; } /** * repeated group Header = 3 { ... } */ public Builder removeHeader(int index) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.remove(index); onChanged(); } else { headerBuilder_.remove(index); } return this; } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder getHeaderBuilder( int index) { return getHeaderFieldBuilder().getBuilder(index); } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.HeaderOrBuilder getHeaderOrBuilder( int index) { if (headerBuilder_ == null) { return header_.get(index); } else { return headerBuilder_.getMessageOrBuilder(index); } } /** * repeated group Header = 3 { ... } */ public java.util.List getHeaderOrBuilderList() { if (headerBuilder_ != null) { return headerBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(header_); } } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder addHeaderBuilder() { return getHeaderFieldBuilder().addBuilder( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.getDefaultInstance()); } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder addHeaderBuilder( int index) { return getHeaderFieldBuilder().addBuilder( index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.getDefaultInstance()); } /** * repeated group Header = 3 { ... } */ public java.util.List getHeaderBuilderList() { return getHeaderFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.HeaderOrBuilder> getHeaderFieldBuilder() { if (headerBuilder_ == null) { headerBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.Header.Builder, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest.HeaderOrBuilder>( header_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); header_ = null; } return headerBuilder_; } private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; /** *
       * Only specify a payload for POST, PUT and PATCH requests
       * 
* * optional bytes Payload = 6 [ctype = CORD]; * @return Whether the payload field is set. */ @java.lang.Override public boolean hasPayload() { return ((bitField0_ & 0x00000008) != 0); } /** *
       * Only specify a payload for POST, PUT and PATCH requests
       * 
* * optional bytes Payload = 6 [ctype = CORD]; * @return The payload. */ @java.lang.Override public com.google.protobuf.ByteString getPayload() { return payload_; } /** *
       * Only specify a payload for POST, PUT and PATCH requests
       * 
* * optional bytes Payload = 6 [ctype = CORD]; * @param value The payload to set. * @return This builder for chaining. */ public Builder setPayload(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } payload_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
       * Only specify a payload for POST, PUT and PATCH requests
       * 
* * optional bytes Payload = 6 [ctype = CORD]; * @return This builder for chaining. */ public Builder clearPayload() { bitField0_ = (bitField0_ & ~0x00000008); payload_ = getDefaultInstance().getPayload(); onChanged(); return this; } private boolean followRedirects_ = true; /** *
       * If false, Fastnet will return the real HTTP redirect status code.
       * (this is required for e.g. OpenID RP implementations).  By
       * default, or when this is true, Prometheus sets this to something
       * like 5, but hides the redirect chain from the end user and any
       * eventual successful fetch results in a 200 OK.
       * NOTE: For historical reasons this must be set to false to permit
       * the use of HttpOverRpc back to App Engine. b/22785370
       * 
* * optional bool FollowRedirects = 7 [default = true]; * @return Whether the followRedirects field is set. */ @java.lang.Override public boolean hasFollowRedirects() { return ((bitField0_ & 0x00000010) != 0); } /** *
       * If false, Fastnet will return the real HTTP redirect status code.
       * (this is required for e.g. OpenID RP implementations).  By
       * default, or when this is true, Prometheus sets this to something
       * like 5, but hides the redirect chain from the end user and any
       * eventual successful fetch results in a 200 OK.
       * NOTE: For historical reasons this must be set to false to permit
       * the use of HttpOverRpc back to App Engine. b/22785370
       * 
* * optional bool FollowRedirects = 7 [default = true]; * @return The followRedirects. */ @java.lang.Override public boolean getFollowRedirects() { return followRedirects_; } /** *
       * If false, Fastnet will return the real HTTP redirect status code.
       * (this is required for e.g. OpenID RP implementations).  By
       * default, or when this is true, Prometheus sets this to something
       * like 5, but hides the redirect chain from the end user and any
       * eventual successful fetch results in a 200 OK.
       * NOTE: For historical reasons this must be set to false to permit
       * the use of HttpOverRpc back to App Engine. b/22785370
       * 
* * optional bool FollowRedirects = 7 [default = true]; * @param value The followRedirects to set. * @return This builder for chaining. */ public Builder setFollowRedirects(boolean value) { followRedirects_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** *
       * If false, Fastnet will return the real HTTP redirect status code.
       * (this is required for e.g. OpenID RP implementations).  By
       * default, or when this is true, Prometheus sets this to something
       * like 5, but hides the redirect chain from the end user and any
       * eventual successful fetch results in a 200 OK.
       * NOTE: For historical reasons this must be set to false to permit
       * the use of HttpOverRpc back to App Engine. b/22785370
       * 
* * optional bool FollowRedirects = 7 [default = true]; * @return This builder for chaining. */ public Builder clearFollowRedirects() { bitField0_ = (bitField0_ & ~0x00000010); followRedirects_ = true; onChanged(); return this; } private double deadline_ ; /** *
       * The timeout for the request in seconds.
       * 
* * optional double Deadline = 8; * @return Whether the deadline field is set. */ @java.lang.Override public boolean hasDeadline() { return ((bitField0_ & 0x00000020) != 0); } /** *
       * The timeout for the request in seconds.
       * 
* * optional double Deadline = 8; * @return The deadline. */ @java.lang.Override public double getDeadline() { return deadline_; } /** *
       * The timeout for the request in seconds.
       * 
* * optional double Deadline = 8; * @param value The deadline to set. * @return This builder for chaining. */ public Builder setDeadline(double value) { deadline_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** *
       * The timeout for the request in seconds.
       * 
* * optional double Deadline = 8; * @return This builder for chaining. */ public Builder clearDeadline() { bitField0_ = (bitField0_ & ~0x00000020); deadline_ = 0D; onChanged(); return this; } private boolean mustValidateServerCertificate_ = true; /** *
       * If true, Harpoon will drop the connection and fail the request if it
       * encounters an invalid certificate.
       * WARNING: Do not rely on the default value of this field for certificate
       * validation. There is an appserver flag that applies if the default value
       * is used (urlfetch_harpoon_failonsslcertificateerror_default) which is
       * currently (as of August 2015) set to false. If you want certificate
       * validation then always set the value of this field to true. b/1829826
       * 
* * optional bool MustValidateServerCertificate = 9 [default = true]; * @return Whether the mustValidateServerCertificate field is set. */ @java.lang.Override public boolean hasMustValidateServerCertificate() { return ((bitField0_ & 0x00000040) != 0); } /** *
       * If true, Harpoon will drop the connection and fail the request if it
       * encounters an invalid certificate.
       * WARNING: Do not rely on the default value of this field for certificate
       * validation. There is an appserver flag that applies if the default value
       * is used (urlfetch_harpoon_failonsslcertificateerror_default) which is
       * currently (as of August 2015) set to false. If you want certificate
       * validation then always set the value of this field to true. b/1829826
       * 
* * optional bool MustValidateServerCertificate = 9 [default = true]; * @return The mustValidateServerCertificate. */ @java.lang.Override public boolean getMustValidateServerCertificate() { return mustValidateServerCertificate_; } /** *
       * If true, Harpoon will drop the connection and fail the request if it
       * encounters an invalid certificate.
       * WARNING: Do not rely on the default value of this field for certificate
       * validation. There is an appserver flag that applies if the default value
       * is used (urlfetch_harpoon_failonsslcertificateerror_default) which is
       * currently (as of August 2015) set to false. If you want certificate
       * validation then always set the value of this field to true. b/1829826
       * 
* * optional bool MustValidateServerCertificate = 9 [default = true]; * @param value The mustValidateServerCertificate to set. * @return This builder for chaining. */ public Builder setMustValidateServerCertificate(boolean value) { mustValidateServerCertificate_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** *
       * If true, Harpoon will drop the connection and fail the request if it
       * encounters an invalid certificate.
       * WARNING: Do not rely on the default value of this field for certificate
       * validation. There is an appserver flag that applies if the default value
       * is used (urlfetch_harpoon_failonsslcertificateerror_default) which is
       * currently (as of August 2015) set to false. If you want certificate
       * validation then always set the value of this field to true. b/1829826
       * 
* * optional bool MustValidateServerCertificate = 9 [default = true]; * @return This builder for chaining. */ public Builder clearMustValidateServerCertificate() { bitField0_ = (bitField0_ & ~0x00000040); mustValidateServerCertificate_ = true; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:java.apphosting.URLFetchRequest) } // @@protoc_insertion_point(class_scope:java.apphosting.URLFetchRequest) private static final com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest(); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public URLFetchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface URLFetchResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:java.apphosting.URLFetchResponse) com.google.protobuf.MessageOrBuilder { /** * optional bytes Content = 1; * @return Whether the content field is set. */ boolean hasContent(); /** * optional bytes Content = 1; * @return The content. */ com.google.protobuf.ByteString getContent(); /** * required int32 StatusCode = 2; * @return Whether the statusCode field is set. */ boolean hasStatusCode(); /** * required int32 StatusCode = 2; * @return The statusCode. */ int getStatusCode(); /** * repeated group Header = 3 { ... } */ java.util.List getHeaderList(); /** * repeated group Header = 3 { ... } */ com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header getHeader(int index); /** * repeated group Header = 3 { ... } */ int getHeaderCount(); /** * repeated group Header = 3 { ... } */ java.util.List getHeaderOrBuilderList(); /** * repeated group Header = 3 { ... } */ com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.HeaderOrBuilder getHeaderOrBuilder( int index); /** * optional bool ContentWasTruncated = 6 [default = false]; * @return Whether the contentWasTruncated field is set. */ boolean hasContentWasTruncated(); /** * optional bool ContentWasTruncated = 6 [default = false]; * @return The contentWasTruncated. */ boolean getContentWasTruncated(); /** * optional int64 ExternalBytesSent = 7; * @return Whether the externalBytesSent field is set. */ boolean hasExternalBytesSent(); /** * optional int64 ExternalBytesSent = 7; * @return The externalBytesSent. */ long getExternalBytesSent(); /** * optional int64 ExternalBytesReceived = 8; * @return Whether the externalBytesReceived field is set. */ boolean hasExternalBytesReceived(); /** * optional int64 ExternalBytesReceived = 8; * @return The externalBytesReceived. */ long getExternalBytesReceived(); /** *
     * The final URL retrieved, if any redirects were followed. Will not
     * be present if the retrieved URL matches the requested URL (or redirects
     * are not followed).
     * 
* * optional string FinalUrl = 9; * @return Whether the finalUrl field is set. */ boolean hasFinalUrl(); /** *
     * The final URL retrieved, if any redirects were followed. Will not
     * be present if the retrieved URL matches the requested URL (or redirects
     * are not followed).
     * 
* * optional string FinalUrl = 9; * @return The finalUrl. */ java.lang.String getFinalUrl(); /** *
     * The final URL retrieved, if any redirects were followed. Will not
     * be present if the retrieved URL matches the requested URL (or redirects
     * are not followed).
     * 
* * optional string FinalUrl = 9; * @return The bytes for finalUrl. */ com.google.protobuf.ByteString getFinalUrlBytes(); /** *
     * Quota used by the recipient app in fulfilling an api request.
     * 
* * optional int64 ApiCpuMilliseconds = 10 [default = 0]; * @return Whether the apiCpuMilliseconds field is set. */ boolean hasApiCpuMilliseconds(); /** *
     * Quota used by the recipient app in fulfilling an api request.
     * 
* * optional int64 ApiCpuMilliseconds = 10 [default = 0]; * @return The apiCpuMilliseconds. */ long getApiCpuMilliseconds(); /** * optional int64 ApiBytesSent = 11 [default = 0]; * @return Whether the apiBytesSent field is set. */ boolean hasApiBytesSent(); /** * optional int64 ApiBytesSent = 11 [default = 0]; * @return The apiBytesSent. */ long getApiBytesSent(); /** * optional int64 ApiBytesReceived = 12 [default = 0]; * @return Whether the apiBytesReceived field is set. */ boolean hasApiBytesReceived(); /** * optional int64 ApiBytesReceived = 12 [default = 0]; * @return The apiBytesReceived. */ long getApiBytesReceived(); } /** * Protobuf type {@code java.apphosting.URLFetchResponse} */ public static final class URLFetchResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:java.apphosting.URLFetchResponse) URLFetchResponseOrBuilder { private static final long serialVersionUID = 0L; // Use URLFetchResponse.newBuilder() to construct. private URLFetchResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private URLFetchResponse() { content_ = com.google.protobuf.ByteString.EMPTY; header_ = java.util.Collections.emptyList(); finalUrl_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new URLFetchResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Builder.class); } public interface HeaderOrBuilder extends // @@protoc_insertion_point(interface_extends:java.apphosting.URLFetchResponse.Header) com.google.protobuf.MessageOrBuilder { /** *
       * Keys are not guaranteed to be unique across all Headers belonging
       * to a single URLFetchResponse. There could be multiple Headers with
       * the same name.
       * 
* * required string Key = 4; * @return Whether the key field is set. */ boolean hasKey(); /** *
       * Keys are not guaranteed to be unique across all Headers belonging
       * to a single URLFetchResponse. There could be multiple Headers with
       * the same name.
       * 
* * required string Key = 4; * @return The key. */ java.lang.String getKey(); /** *
       * Keys are not guaranteed to be unique across all Headers belonging
       * to a single URLFetchResponse. There could be multiple Headers with
       * the same name.
       * 
* * required string Key = 4; * @return The bytes for key. */ com.google.protobuf.ByteString getKeyBytes(); /** * required string Value = 5; * @return Whether the value field is set. */ boolean hasValue(); /** * required string Value = 5; * @return The value. */ java.lang.String getValue(); /** * required string Value = 5; * @return The bytes for value. */ com.google.protobuf.ByteString getValueBytes(); } /** * Protobuf type {@code java.apphosting.URLFetchResponse.Header} */ public static final class Header extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:java.apphosting.URLFetchResponse.Header) HeaderOrBuilder { private static final long serialVersionUID = 0L; // Use Header.newBuilder() to construct. private Header(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Header() { key_ = ""; value_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Header(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_Header_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_Header_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder.class); } private int bitField0_; public static final int KEY_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object key_ = ""; /** *
       * Keys are not guaranteed to be unique across all Headers belonging
       * to a single URLFetchResponse. There could be multiple Headers with
       * the same name.
       * 
* * required string Key = 4; * @return Whether the key field is set. */ @java.lang.Override public boolean hasKey() { return ((bitField0_ & 0x00000001) != 0); } /** *
       * Keys are not guaranteed to be unique across all Headers belonging
       * to a single URLFetchResponse. There could be multiple Headers with
       * the same name.
       * 
* * required string Key = 4; * @return The key. */ @java.lang.Override public java.lang.String getKey() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { key_ = s; } return s; } } /** *
       * Keys are not guaranteed to be unique across all Headers belonging
       * to a single URLFetchResponse. There could be multiple Headers with
       * the same name.
       * 
* * required string Key = 4; * @return The bytes for key. */ @java.lang.Override public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VALUE_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object value_ = ""; /** * required string Value = 5; * @return Whether the value field is set. */ @java.lang.Override public boolean hasValue() { return ((bitField0_ & 0x00000002) != 0); } /** * required string Value = 5; * @return The value. */ @java.lang.Override public java.lang.String getValue() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { value_ = s; } return s; } } /** * required string Value = 5; * @return The bytes for value. */ @java.lang.Override public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasKey()) { memoizedIsInitialized = 0; return false; } if (!hasValue()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, key_); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, value_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, key_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, value_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header)) { return super.equals(obj); } com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header other = (com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header) obj; if (hasKey() != other.hasKey()) return false; if (hasKey()) { if (!getKey() .equals(other.getKey())) return false; } if (hasValue() != other.hasValue()) return false; if (hasValue()) { if (!getValue() .equals(other.getValue())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasKey()) { hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); } if (hasValue()) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code java.apphosting.URLFetchResponse.Header} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:java.apphosting.URLFetchResponse.Header) com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.HeaderOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_Header_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_Header_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder.class); } // Construct using com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; key_ = ""; value_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_Header_descriptor; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header getDefaultInstanceForType() { return com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.getDefaultInstance(); } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header build() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header buildPartial() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header result = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.key_ = key_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.value_ = value_; to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header) { return mergeFrom((com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header other) { if (other == com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.getDefaultInstance()) return this; if (other.hasKey()) { key_ = other.key_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasValue()) { value_ = other.value_; bitField0_ |= 0x00000002; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { if (!hasKey()) { return false; } if (!hasValue()) { return false; } return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 34: { key_ = input.readBytes(); bitField0_ |= 0x00000001; break; } // case 34 case 42: { value_ = input.readBytes(); bitField0_ |= 0x00000002; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object key_ = ""; /** *
         * Keys are not guaranteed to be unique across all Headers belonging
         * to a single URLFetchResponse. There could be multiple Headers with
         * the same name.
         * 
* * required string Key = 4; * @return Whether the key field is set. */ public boolean hasKey() { return ((bitField0_ & 0x00000001) != 0); } /** *
         * Keys are not guaranteed to be unique across all Headers belonging
         * to a single URLFetchResponse. There could be multiple Headers with
         * the same name.
         * 
* * required string Key = 4; * @return The key. */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { key_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
         * Keys are not guaranteed to be unique across all Headers belonging
         * to a single URLFetchResponse. There could be multiple Headers with
         * the same name.
         * 
* * required string Key = 4; * @return The bytes for key. */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Keys are not guaranteed to be unique across all Headers belonging
         * to a single URLFetchResponse. There could be multiple Headers with
         * the same name.
         * 
* * required string Key = 4; * @param value The key to set. * @return This builder for chaining. */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } key_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
         * Keys are not guaranteed to be unique across all Headers belonging
         * to a single URLFetchResponse. There could be multiple Headers with
         * the same name.
         * 
* * required string Key = 4; * @return This builder for chaining. */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
         * Keys are not guaranteed to be unique across all Headers belonging
         * to a single URLFetchResponse. There could be multiple Headers with
         * the same name.
         * 
* * required string Key = 4; * @param value The bytes for key to set. * @return This builder for chaining. */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } key_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object value_ = ""; /** * required string Value = 5; * @return Whether the value field is set. */ public boolean hasValue() { return ((bitField0_ & 0x00000002) != 0); } /** * required string Value = 5; * @return The value. */ public java.lang.String getValue() { java.lang.Object ref = value_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { value_ = s; } return s; } else { return (java.lang.String) ref; } } /** * required string Value = 5; * @return The bytes for value. */ public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * required string Value = 5; * @param value The value to set. * @return This builder for chaining. */ public Builder setValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } value_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * required string Value = 5; * @return This builder for chaining. */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * required string Value = 5; * @param value The bytes for value to set. * @return This builder for chaining. */ public Builder setValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } value_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:java.apphosting.URLFetchResponse.Header) } // @@protoc_insertion_point(class_scope:java.apphosting.URLFetchResponse.Header) private static final com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header(); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser
() { @java.lang.Override public Header parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser
parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser
getParserForType() { return PARSER; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int CONTENT_FIELD_NUMBER = 1; private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes Content = 1; * @return Whether the content field is set. */ @java.lang.Override public boolean hasContent() { return ((bitField0_ & 0x00000001) != 0); } /** * optional bytes Content = 1; * @return The content. */ @java.lang.Override public com.google.protobuf.ByteString getContent() { return content_; } public static final int STATUSCODE_FIELD_NUMBER = 2; private int statusCode_ = 0; /** * required int32 StatusCode = 2; * @return Whether the statusCode field is set. */ @java.lang.Override public boolean hasStatusCode() { return ((bitField0_ & 0x00000002) != 0); } /** * required int32 StatusCode = 2; * @return The statusCode. */ @java.lang.Override public int getStatusCode() { return statusCode_; } public static final int HEADER_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List header_; /** * repeated group Header = 3 { ... } */ @java.lang.Override public java.util.List getHeaderList() { return header_; } /** * repeated group Header = 3 { ... } */ @java.lang.Override public java.util.List getHeaderOrBuilderList() { return header_; } /** * repeated group Header = 3 { ... } */ @java.lang.Override public int getHeaderCount() { return header_.size(); } /** * repeated group Header = 3 { ... } */ @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header getHeader(int index) { return header_.get(index); } /** * repeated group Header = 3 { ... } */ @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.HeaderOrBuilder getHeaderOrBuilder( int index) { return header_.get(index); } public static final int CONTENTWASTRUNCATED_FIELD_NUMBER = 6; private boolean contentWasTruncated_ = false; /** * optional bool ContentWasTruncated = 6 [default = false]; * @return Whether the contentWasTruncated field is set. */ @java.lang.Override public boolean hasContentWasTruncated() { return ((bitField0_ & 0x00000004) != 0); } /** * optional bool ContentWasTruncated = 6 [default = false]; * @return The contentWasTruncated. */ @java.lang.Override public boolean getContentWasTruncated() { return contentWasTruncated_; } public static final int EXTERNALBYTESSENT_FIELD_NUMBER = 7; private long externalBytesSent_ = 0L; /** * optional int64 ExternalBytesSent = 7; * @return Whether the externalBytesSent field is set. */ @java.lang.Override public boolean hasExternalBytesSent() { return ((bitField0_ & 0x00000008) != 0); } /** * optional int64 ExternalBytesSent = 7; * @return The externalBytesSent. */ @java.lang.Override public long getExternalBytesSent() { return externalBytesSent_; } public static final int EXTERNALBYTESRECEIVED_FIELD_NUMBER = 8; private long externalBytesReceived_ = 0L; /** * optional int64 ExternalBytesReceived = 8; * @return Whether the externalBytesReceived field is set. */ @java.lang.Override public boolean hasExternalBytesReceived() { return ((bitField0_ & 0x00000010) != 0); } /** * optional int64 ExternalBytesReceived = 8; * @return The externalBytesReceived. */ @java.lang.Override public long getExternalBytesReceived() { return externalBytesReceived_; } public static final int FINALURL_FIELD_NUMBER = 9; @SuppressWarnings("serial") private volatile java.lang.Object finalUrl_ = ""; /** *
     * The final URL retrieved, if any redirects were followed. Will not
     * be present if the retrieved URL matches the requested URL (or redirects
     * are not followed).
     * 
* * optional string FinalUrl = 9; * @return Whether the finalUrl field is set. */ @java.lang.Override public boolean hasFinalUrl() { return ((bitField0_ & 0x00000020) != 0); } /** *
     * The final URL retrieved, if any redirects were followed. Will not
     * be present if the retrieved URL matches the requested URL (or redirects
     * are not followed).
     * 
* * optional string FinalUrl = 9; * @return The finalUrl. */ @java.lang.Override public java.lang.String getFinalUrl() { java.lang.Object ref = finalUrl_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { finalUrl_ = s; } return s; } } /** *
     * The final URL retrieved, if any redirects were followed. Will not
     * be present if the retrieved URL matches the requested URL (or redirects
     * are not followed).
     * 
* * optional string FinalUrl = 9; * @return The bytes for finalUrl. */ @java.lang.Override public com.google.protobuf.ByteString getFinalUrlBytes() { java.lang.Object ref = finalUrl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); finalUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int APICPUMILLISECONDS_FIELD_NUMBER = 10; private long apiCpuMilliseconds_ = 0L; /** *
     * Quota used by the recipient app in fulfilling an api request.
     * 
* * optional int64 ApiCpuMilliseconds = 10 [default = 0]; * @return Whether the apiCpuMilliseconds field is set. */ @java.lang.Override public boolean hasApiCpuMilliseconds() { return ((bitField0_ & 0x00000040) != 0); } /** *
     * Quota used by the recipient app in fulfilling an api request.
     * 
* * optional int64 ApiCpuMilliseconds = 10 [default = 0]; * @return The apiCpuMilliseconds. */ @java.lang.Override public long getApiCpuMilliseconds() { return apiCpuMilliseconds_; } public static final int APIBYTESSENT_FIELD_NUMBER = 11; private long apiBytesSent_ = 0L; /** * optional int64 ApiBytesSent = 11 [default = 0]; * @return Whether the apiBytesSent field is set. */ @java.lang.Override public boolean hasApiBytesSent() { return ((bitField0_ & 0x00000080) != 0); } /** * optional int64 ApiBytesSent = 11 [default = 0]; * @return The apiBytesSent. */ @java.lang.Override public long getApiBytesSent() { return apiBytesSent_; } public static final int APIBYTESRECEIVED_FIELD_NUMBER = 12; private long apiBytesReceived_ = 0L; /** * optional int64 ApiBytesReceived = 12 [default = 0]; * @return Whether the apiBytesReceived field is set. */ @java.lang.Override public boolean hasApiBytesReceived() { return ((bitField0_ & 0x00000100) != 0); } /** * optional int64 ApiBytesReceived = 12 [default = 0]; * @return The apiBytesReceived. */ @java.lang.Override public long getApiBytesReceived() { return apiBytesReceived_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasStatusCode()) { memoizedIsInitialized = 0; return false; } for (int i = 0; i < getHeaderCount(); i++) { if (!getHeader(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeBytes(1, content_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(2, statusCode_); } for (int i = 0; i < header_.size(); i++) { output.writeGroup(3, header_.get(i)); } if (((bitField0_ & 0x00000004) != 0)) { output.writeBool(6, contentWasTruncated_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeInt64(7, externalBytesSent_); } if (((bitField0_ & 0x00000010) != 0)) { output.writeInt64(8, externalBytesReceived_); } if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, finalUrl_); } if (((bitField0_ & 0x00000040) != 0)) { output.writeInt64(10, apiCpuMilliseconds_); } if (((bitField0_ & 0x00000080) != 0)) { output.writeInt64(11, apiBytesSent_); } if (((bitField0_ & 0x00000100) != 0)) { output.writeInt64(12, apiBytesReceived_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, content_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, statusCode_); } for (int i = 0; i < header_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeGroupSize(3, header_.get(i)); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, contentWasTruncated_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(7, externalBytesSent_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(8, externalBytesReceived_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, finalUrl_); } if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(10, apiCpuMilliseconds_); } if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(11, apiBytesSent_); } if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(12, apiBytesReceived_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse)) { return super.equals(obj); } com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse other = (com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse) obj; if (hasContent() != other.hasContent()) return false; if (hasContent()) { if (!getContent() .equals(other.getContent())) return false; } if (hasStatusCode() != other.hasStatusCode()) return false; if (hasStatusCode()) { if (getStatusCode() != other.getStatusCode()) return false; } if (!getHeaderList() .equals(other.getHeaderList())) return false; if (hasContentWasTruncated() != other.hasContentWasTruncated()) return false; if (hasContentWasTruncated()) { if (getContentWasTruncated() != other.getContentWasTruncated()) return false; } if (hasExternalBytesSent() != other.hasExternalBytesSent()) return false; if (hasExternalBytesSent()) { if (getExternalBytesSent() != other.getExternalBytesSent()) return false; } if (hasExternalBytesReceived() != other.hasExternalBytesReceived()) return false; if (hasExternalBytesReceived()) { if (getExternalBytesReceived() != other.getExternalBytesReceived()) return false; } if (hasFinalUrl() != other.hasFinalUrl()) return false; if (hasFinalUrl()) { if (!getFinalUrl() .equals(other.getFinalUrl())) return false; } if (hasApiCpuMilliseconds() != other.hasApiCpuMilliseconds()) return false; if (hasApiCpuMilliseconds()) { if (getApiCpuMilliseconds() != other.getApiCpuMilliseconds()) return false; } if (hasApiBytesSent() != other.hasApiBytesSent()) return false; if (hasApiBytesSent()) { if (getApiBytesSent() != other.getApiBytesSent()) return false; } if (hasApiBytesReceived() != other.hasApiBytesReceived()) return false; if (hasApiBytesReceived()) { if (getApiBytesReceived() != other.getApiBytesReceived()) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasContent()) { hash = (37 * hash) + CONTENT_FIELD_NUMBER; hash = (53 * hash) + getContent().hashCode(); } if (hasStatusCode()) { hash = (37 * hash) + STATUSCODE_FIELD_NUMBER; hash = (53 * hash) + getStatusCode(); } if (getHeaderCount() > 0) { hash = (37 * hash) + HEADER_FIELD_NUMBER; hash = (53 * hash) + getHeaderList().hashCode(); } if (hasContentWasTruncated()) { hash = (37 * hash) + CONTENTWASTRUNCATED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getContentWasTruncated()); } if (hasExternalBytesSent()) { hash = (37 * hash) + EXTERNALBYTESSENT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getExternalBytesSent()); } if (hasExternalBytesReceived()) { hash = (37 * hash) + EXTERNALBYTESRECEIVED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getExternalBytesReceived()); } if (hasFinalUrl()) { hash = (37 * hash) + FINALURL_FIELD_NUMBER; hash = (53 * hash) + getFinalUrl().hashCode(); } if (hasApiCpuMilliseconds()) { hash = (37 * hash) + APICPUMILLISECONDS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getApiCpuMilliseconds()); } if (hasApiBytesSent()) { hash = (37 * hash) + APIBYTESSENT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getApiBytesSent()); } if (hasApiBytesReceived()) { hash = (37 * hash) + APIBYTESRECEIVED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getApiBytesReceived()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code java.apphosting.URLFetchResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:java.apphosting.URLFetchResponse) com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.class, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Builder.class); } // Construct using com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; content_ = com.google.protobuf.ByteString.EMPTY; statusCode_ = 0; if (headerBuilder_ == null) { header_ = java.util.Collections.emptyList(); } else { header_ = null; headerBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); contentWasTruncated_ = false; externalBytesSent_ = 0L; externalBytesReceived_ = 0L; finalUrl_ = ""; apiCpuMilliseconds_ = 0L; apiBytesSent_ = 0L; apiBytesReceived_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.appengine.api.urlfetch.URLFetchServicePb.internal_static_java_apphosting_URLFetchResponse_descriptor; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse getDefaultInstanceForType() { return com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.getDefaultInstance(); } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse build() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse buildPartial() { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse result = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse result) { if (headerBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { header_ = java.util.Collections.unmodifiableList(header_); bitField0_ = (bitField0_ & ~0x00000004); } result.header_ = header_; } else { result.header_ = headerBuilder_.build(); } } private void buildPartial0(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.content_ = content_; to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.statusCode_ = statusCode_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { result.contentWasTruncated_ = contentWasTruncated_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000010) != 0)) { result.externalBytesSent_ = externalBytesSent_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000020) != 0)) { result.externalBytesReceived_ = externalBytesReceived_; to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000040) != 0)) { result.finalUrl_ = finalUrl_; to_bitField0_ |= 0x00000020; } if (((from_bitField0_ & 0x00000080) != 0)) { result.apiCpuMilliseconds_ = apiCpuMilliseconds_; to_bitField0_ |= 0x00000040; } if (((from_bitField0_ & 0x00000100) != 0)) { result.apiBytesSent_ = apiBytesSent_; to_bitField0_ |= 0x00000080; } if (((from_bitField0_ & 0x00000200) != 0)) { result.apiBytesReceived_ = apiBytesReceived_; to_bitField0_ |= 0x00000100; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse) { return mergeFrom((com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse other) { if (other == com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.getDefaultInstance()) return this; if (other.hasContent()) { setContent(other.getContent()); } if (other.hasStatusCode()) { setStatusCode(other.getStatusCode()); } if (headerBuilder_ == null) { if (!other.header_.isEmpty()) { if (header_.isEmpty()) { header_ = other.header_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureHeaderIsMutable(); header_.addAll(other.header_); } onChanged(); } } else { if (!other.header_.isEmpty()) { if (headerBuilder_.isEmpty()) { headerBuilder_.dispose(); headerBuilder_ = null; header_ = other.header_; bitField0_ = (bitField0_ & ~0x00000004); headerBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getHeaderFieldBuilder() : null; } else { headerBuilder_.addAllMessages(other.header_); } } } if (other.hasContentWasTruncated()) { setContentWasTruncated(other.getContentWasTruncated()); } if (other.hasExternalBytesSent()) { setExternalBytesSent(other.getExternalBytesSent()); } if (other.hasExternalBytesReceived()) { setExternalBytesReceived(other.getExternalBytesReceived()); } if (other.hasFinalUrl()) { finalUrl_ = other.finalUrl_; bitField0_ |= 0x00000040; onChanged(); } if (other.hasApiCpuMilliseconds()) { setApiCpuMilliseconds(other.getApiCpuMilliseconds()); } if (other.hasApiBytesSent()) { setApiBytesSent(other.getApiBytesSent()); } if (other.hasApiBytesReceived()) { setApiBytesReceived(other.getApiBytesReceived()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { if (!hasStatusCode()) { return false; } for (int i = 0; i < getHeaderCount(); i++) { if (!getHeader(i).isInitialized()) { return false; } } return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { content_ = input.readBytes(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { statusCode_ = input.readInt32(); bitField0_ |= 0x00000002; break; } // case 16 case 27: { com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header m = input.readGroup(3, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.PARSER, extensionRegistry); if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.add(m); } else { headerBuilder_.addMessage(m); } break; } // case 27 case 48: { contentWasTruncated_ = input.readBool(); bitField0_ |= 0x00000008; break; } // case 48 case 56: { externalBytesSent_ = input.readInt64(); bitField0_ |= 0x00000010; break; } // case 56 case 64: { externalBytesReceived_ = input.readInt64(); bitField0_ |= 0x00000020; break; } // case 64 case 74: { finalUrl_ = input.readBytes(); bitField0_ |= 0x00000040; break; } // case 74 case 80: { apiCpuMilliseconds_ = input.readInt64(); bitField0_ |= 0x00000080; break; } // case 80 case 88: { apiBytesSent_ = input.readInt64(); bitField0_ |= 0x00000100; break; } // case 88 case 96: { apiBytesReceived_ = input.readInt64(); bitField0_ |= 0x00000200; break; } // case 96 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.protobuf.ByteString content_ = com.google.protobuf.ByteString.EMPTY; /** * optional bytes Content = 1; * @return Whether the content field is set. */ @java.lang.Override public boolean hasContent() { return ((bitField0_ & 0x00000001) != 0); } /** * optional bytes Content = 1; * @return The content. */ @java.lang.Override public com.google.protobuf.ByteString getContent() { return content_; } /** * optional bytes Content = 1; * @param value The content to set. * @return This builder for chaining. */ public Builder setContent(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } content_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * optional bytes Content = 1; * @return This builder for chaining. */ public Builder clearContent() { bitField0_ = (bitField0_ & ~0x00000001); content_ = getDefaultInstance().getContent(); onChanged(); return this; } private int statusCode_ ; /** * required int32 StatusCode = 2; * @return Whether the statusCode field is set. */ @java.lang.Override public boolean hasStatusCode() { return ((bitField0_ & 0x00000002) != 0); } /** * required int32 StatusCode = 2; * @return The statusCode. */ @java.lang.Override public int getStatusCode() { return statusCode_; } /** * required int32 StatusCode = 2; * @param value The statusCode to set. * @return This builder for chaining. */ public Builder setStatusCode(int value) { statusCode_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * required int32 StatusCode = 2; * @return This builder for chaining. */ public Builder clearStatusCode() { bitField0_ = (bitField0_ & ~0x00000002); statusCode_ = 0; onChanged(); return this; } private java.util.List header_ = java.util.Collections.emptyList(); private void ensureHeaderIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { header_ = new java.util.ArrayList(header_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.HeaderOrBuilder> headerBuilder_; /** * repeated group Header = 3 { ... } */ public java.util.List getHeaderList() { if (headerBuilder_ == null) { return java.util.Collections.unmodifiableList(header_); } else { return headerBuilder_.getMessageList(); } } /** * repeated group Header = 3 { ... } */ public int getHeaderCount() { if (headerBuilder_ == null) { return header_.size(); } else { return headerBuilder_.getCount(); } } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header getHeader(int index) { if (headerBuilder_ == null) { return header_.get(index); } else { return headerBuilder_.getMessage(index); } } /** * repeated group Header = 3 { ... } */ public Builder setHeader( int index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header value) { if (headerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureHeaderIsMutable(); header_.set(index, value); onChanged(); } else { headerBuilder_.setMessage(index, value); } return this; } /** * repeated group Header = 3 { ... } */ public Builder setHeader( int index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder builderForValue) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.set(index, builderForValue.build()); onChanged(); } else { headerBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addHeader(com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header value) { if (headerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureHeaderIsMutable(); header_.add(value); onChanged(); } else { headerBuilder_.addMessage(value); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addHeader( int index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header value) { if (headerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureHeaderIsMutable(); header_.add(index, value); onChanged(); } else { headerBuilder_.addMessage(index, value); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addHeader( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder builderForValue) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.add(builderForValue.build()); onChanged(); } else { headerBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addHeader( int index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder builderForValue) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.add(index, builderForValue.build()); onChanged(); } else { headerBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated group Header = 3 { ... } */ public Builder addAllHeader( java.lang.Iterable values) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, header_); onChanged(); } else { headerBuilder_.addAllMessages(values); } return this; } /** * repeated group Header = 3 { ... } */ public Builder clearHeader() { if (headerBuilder_ == null) { header_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { headerBuilder_.clear(); } return this; } /** * repeated group Header = 3 { ... } */ public Builder removeHeader(int index) { if (headerBuilder_ == null) { ensureHeaderIsMutable(); header_.remove(index); onChanged(); } else { headerBuilder_.remove(index); } return this; } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder getHeaderBuilder( int index) { return getHeaderFieldBuilder().getBuilder(index); } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.HeaderOrBuilder getHeaderOrBuilder( int index) { if (headerBuilder_ == null) { return header_.get(index); } else { return headerBuilder_.getMessageOrBuilder(index); } } /** * repeated group Header = 3 { ... } */ public java.util.List getHeaderOrBuilderList() { if (headerBuilder_ != null) { return headerBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(header_); } } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder addHeaderBuilder() { return getHeaderFieldBuilder().addBuilder( com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.getDefaultInstance()); } /** * repeated group Header = 3 { ... } */ public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder addHeaderBuilder( int index) { return getHeaderFieldBuilder().addBuilder( index, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.getDefaultInstance()); } /** * repeated group Header = 3 { ... } */ public java.util.List getHeaderBuilderList() { return getHeaderFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.HeaderOrBuilder> getHeaderFieldBuilder() { if (headerBuilder_ == null) { headerBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.Header.Builder, com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse.HeaderOrBuilder>( header_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); header_ = null; } return headerBuilder_; } private boolean contentWasTruncated_ ; /** * optional bool ContentWasTruncated = 6 [default = false]; * @return Whether the contentWasTruncated field is set. */ @java.lang.Override public boolean hasContentWasTruncated() { return ((bitField0_ & 0x00000008) != 0); } /** * optional bool ContentWasTruncated = 6 [default = false]; * @return The contentWasTruncated. */ @java.lang.Override public boolean getContentWasTruncated() { return contentWasTruncated_; } /** * optional bool ContentWasTruncated = 6 [default = false]; * @param value The contentWasTruncated to set. * @return This builder for chaining. */ public Builder setContentWasTruncated(boolean value) { contentWasTruncated_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * optional bool ContentWasTruncated = 6 [default = false]; * @return This builder for chaining. */ public Builder clearContentWasTruncated() { bitField0_ = (bitField0_ & ~0x00000008); contentWasTruncated_ = false; onChanged(); return this; } private long externalBytesSent_ ; /** * optional int64 ExternalBytesSent = 7; * @return Whether the externalBytesSent field is set. */ @java.lang.Override public boolean hasExternalBytesSent() { return ((bitField0_ & 0x00000010) != 0); } /** * optional int64 ExternalBytesSent = 7; * @return The externalBytesSent. */ @java.lang.Override public long getExternalBytesSent() { return externalBytesSent_; } /** * optional int64 ExternalBytesSent = 7; * @param value The externalBytesSent to set. * @return This builder for chaining. */ public Builder setExternalBytesSent(long value) { externalBytesSent_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * optional int64 ExternalBytesSent = 7; * @return This builder for chaining. */ public Builder clearExternalBytesSent() { bitField0_ = (bitField0_ & ~0x00000010); externalBytesSent_ = 0L; onChanged(); return this; } private long externalBytesReceived_ ; /** * optional int64 ExternalBytesReceived = 8; * @return Whether the externalBytesReceived field is set. */ @java.lang.Override public boolean hasExternalBytesReceived() { return ((bitField0_ & 0x00000020) != 0); } /** * optional int64 ExternalBytesReceived = 8; * @return The externalBytesReceived. */ @java.lang.Override public long getExternalBytesReceived() { return externalBytesReceived_; } /** * optional int64 ExternalBytesReceived = 8; * @param value The externalBytesReceived to set. * @return This builder for chaining. */ public Builder setExternalBytesReceived(long value) { externalBytesReceived_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * optional int64 ExternalBytesReceived = 8; * @return This builder for chaining. */ public Builder clearExternalBytesReceived() { bitField0_ = (bitField0_ & ~0x00000020); externalBytesReceived_ = 0L; onChanged(); return this; } private java.lang.Object finalUrl_ = ""; /** *
       * The final URL retrieved, if any redirects were followed. Will not
       * be present if the retrieved URL matches the requested URL (or redirects
       * are not followed).
       * 
* * optional string FinalUrl = 9; * @return Whether the finalUrl field is set. */ public boolean hasFinalUrl() { return ((bitField0_ & 0x00000040) != 0); } /** *
       * The final URL retrieved, if any redirects were followed. Will not
       * be present if the retrieved URL matches the requested URL (or redirects
       * are not followed).
       * 
* * optional string FinalUrl = 9; * @return The finalUrl. */ public java.lang.String getFinalUrl() { java.lang.Object ref = finalUrl_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { finalUrl_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
       * The final URL retrieved, if any redirects were followed. Will not
       * be present if the retrieved URL matches the requested URL (or redirects
       * are not followed).
       * 
* * optional string FinalUrl = 9; * @return The bytes for finalUrl. */ public com.google.protobuf.ByteString getFinalUrlBytes() { java.lang.Object ref = finalUrl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); finalUrl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The final URL retrieved, if any redirects were followed. Will not
       * be present if the retrieved URL matches the requested URL (or redirects
       * are not followed).
       * 
* * optional string FinalUrl = 9; * @param value The finalUrl to set. * @return This builder for chaining. */ public Builder setFinalUrl( java.lang.String value) { if (value == null) { throw new NullPointerException(); } finalUrl_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** *
       * The final URL retrieved, if any redirects were followed. Will not
       * be present if the retrieved URL matches the requested URL (or redirects
       * are not followed).
       * 
* * optional string FinalUrl = 9; * @return This builder for chaining. */ public Builder clearFinalUrl() { finalUrl_ = getDefaultInstance().getFinalUrl(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** *
       * The final URL retrieved, if any redirects were followed. Will not
       * be present if the retrieved URL matches the requested URL (or redirects
       * are not followed).
       * 
* * optional string FinalUrl = 9; * @param value The bytes for finalUrl to set. * @return This builder for chaining. */ public Builder setFinalUrlBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } finalUrl_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } private long apiCpuMilliseconds_ ; /** *
       * Quota used by the recipient app in fulfilling an api request.
       * 
* * optional int64 ApiCpuMilliseconds = 10 [default = 0]; * @return Whether the apiCpuMilliseconds field is set. */ @java.lang.Override public boolean hasApiCpuMilliseconds() { return ((bitField0_ & 0x00000080) != 0); } /** *
       * Quota used by the recipient app in fulfilling an api request.
       * 
* * optional int64 ApiCpuMilliseconds = 10 [default = 0]; * @return The apiCpuMilliseconds. */ @java.lang.Override public long getApiCpuMilliseconds() { return apiCpuMilliseconds_; } /** *
       * Quota used by the recipient app in fulfilling an api request.
       * 
* * optional int64 ApiCpuMilliseconds = 10 [default = 0]; * @param value The apiCpuMilliseconds to set. * @return This builder for chaining. */ public Builder setApiCpuMilliseconds(long value) { apiCpuMilliseconds_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** *
       * Quota used by the recipient app in fulfilling an api request.
       * 
* * optional int64 ApiCpuMilliseconds = 10 [default = 0]; * @return This builder for chaining. */ public Builder clearApiCpuMilliseconds() { bitField0_ = (bitField0_ & ~0x00000080); apiCpuMilliseconds_ = 0L; onChanged(); return this; } private long apiBytesSent_ ; /** * optional int64 ApiBytesSent = 11 [default = 0]; * @return Whether the apiBytesSent field is set. */ @java.lang.Override public boolean hasApiBytesSent() { return ((bitField0_ & 0x00000100) != 0); } /** * optional int64 ApiBytesSent = 11 [default = 0]; * @return The apiBytesSent. */ @java.lang.Override public long getApiBytesSent() { return apiBytesSent_; } /** * optional int64 ApiBytesSent = 11 [default = 0]; * @param value The apiBytesSent to set. * @return This builder for chaining. */ public Builder setApiBytesSent(long value) { apiBytesSent_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * optional int64 ApiBytesSent = 11 [default = 0]; * @return This builder for chaining. */ public Builder clearApiBytesSent() { bitField0_ = (bitField0_ & ~0x00000100); apiBytesSent_ = 0L; onChanged(); return this; } private long apiBytesReceived_ ; /** * optional int64 ApiBytesReceived = 12 [default = 0]; * @return Whether the apiBytesReceived field is set. */ @java.lang.Override public boolean hasApiBytesReceived() { return ((bitField0_ & 0x00000200) != 0); } /** * optional int64 ApiBytesReceived = 12 [default = 0]; * @return The apiBytesReceived. */ @java.lang.Override public long getApiBytesReceived() { return apiBytesReceived_; } /** * optional int64 ApiBytesReceived = 12 [default = 0]; * @param value The apiBytesReceived to set. * @return This builder for chaining. */ public Builder setApiBytesReceived(long value) { apiBytesReceived_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** * optional int64 ApiBytesReceived = 12 [default = 0]; * @return This builder for chaining. */ public Builder clearApiBytesReceived() { bitField0_ = (bitField0_ & ~0x00000200); apiBytesReceived_ = 0L; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:java.apphosting.URLFetchResponse) } // @@protoc_insertion_point(class_scope:java.apphosting.URLFetchResponse) private static final com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse(); } public static com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public URLFetchResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.appengine.api.urlfetch.URLFetchServicePb.URLFetchResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_java_apphosting_URLFetchServiceError_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_java_apphosting_URLFetchServiceError_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_java_apphosting_URLFetchRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_java_apphosting_URLFetchRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_java_apphosting_URLFetchRequest_Header_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_java_apphosting_URLFetchRequest_Header_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_java_apphosting_URLFetchResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_java_apphosting_URLFetchResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_java_apphosting_URLFetchResponse_Header_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_java_apphosting_URLFetchResponse_Header_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\026urlfetch_service.proto\022\017java.apphostin" + "g\"\302\002\n\024URLFetchServiceError\"\251\002\n\tErrorCode" + "\022\006\n\002OK\020\000\022\017\n\013INVALID_URL\020\001\022\017\n\013FETCH_ERROR" + "\020\002\022\025\n\021UNSPECIFIED_ERROR\020\003\022\026\n\022RESPONSE_TO" + "O_LARGE\020\004\022\025\n\021DEADLINE_EXCEEDED\020\005\022\031\n\025SSL_" + "CERTIFICATE_ERROR\020\006\022\r\n\tDNS_ERROR\020\007\022\n\n\006CL" + "OSED\020\010\022\034\n\030INTERNAL_TRANSIENT_ERROR\020\t\022\026\n\022" + "TOO_MANY_REDIRECTS\020\n\022\023\n\017MALFORMED_REPLY\020" + "\013\022\024\n\020CONNECTION_ERROR\020\014\022\025\n\021PAYLOAD_TOO_L" + "ARGE\020\r\"\376\002\n\017URLFetchRequest\022>\n\006Method\030\001 \002" + "(\0162..java.apphosting.URLFetchRequest.Req" + "uestMethod\022\013\n\003Url\030\002 \002(\t\0227\n\006header\030\003 \003(\n2" + "\'.java.apphosting.URLFetchRequest.Header" + "\022\023\n\007Payload\030\006 \001(\014B\002\010\001\022\035\n\017FollowRedirects" + "\030\007 \001(\010:\004true\022\020\n\010Deadline\030\010 \001(\001\022+\n\035MustVa" + "lidateServerCertificate\030\t \001(\010:\004true\032$\n\006H" + "eader\022\013\n\003Key\030\004 \002(\t\022\r\n\005Value\030\005 \002(\t\"L\n\rReq" + "uestMethod\022\007\n\003GET\020\001\022\010\n\004POST\020\002\022\010\n\004HEAD\020\003\022" + "\007\n\003PUT\020\004\022\n\n\006DELETE\020\005\022\t\n\005PATCH\020\006\"\334\002\n\020URLF" + "etchResponse\022\017\n\007Content\030\001 \001(\014\022\022\n\nStatusC" + "ode\030\002 \002(\005\0228\n\006header\030\003 \003(\n2(.java.apphost" + "ing.URLFetchResponse.Header\022\"\n\023ContentWa" + "sTruncated\030\006 \001(\010:\005false\022\031\n\021ExternalBytes" + "Sent\030\007 \001(\003\022\035\n\025ExternalBytesReceived\030\010 \001(" + "\003\022\020\n\010FinalUrl\030\t \001(\t\022\035\n\022ApiCpuMillisecond" + "s\030\n \001(\003:\0010\022\027\n\014ApiBytesSent\030\013 \001(\003:\0010\022\033\n\020A" + "piBytesReceived\030\014 \001(\003:\0010\032$\n\006Header\022\013\n\003Ke" + "y\030\004 \002(\t\022\r\n\005Value\030\005 \002(\tB9\n!com.google.app" + "engine.api.urlfetchB\021URLFetchServicePb\210\001" + "\001" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }); internal_static_java_apphosting_URLFetchServiceError_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_java_apphosting_URLFetchServiceError_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_java_apphosting_URLFetchServiceError_descriptor, new java.lang.String[] { }); internal_static_java_apphosting_URLFetchRequest_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_java_apphosting_URLFetchRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_java_apphosting_URLFetchRequest_descriptor, new java.lang.String[] { "Method", "Url", "Header", "Payload", "FollowRedirects", "Deadline", "MustValidateServerCertificate", }); internal_static_java_apphosting_URLFetchRequest_Header_descriptor = internal_static_java_apphosting_URLFetchRequest_descriptor.getNestedTypes().get(0); internal_static_java_apphosting_URLFetchRequest_Header_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_java_apphosting_URLFetchRequest_Header_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_java_apphosting_URLFetchResponse_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_java_apphosting_URLFetchResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_java_apphosting_URLFetchResponse_descriptor, new java.lang.String[] { "Content", "StatusCode", "Header", "ContentWasTruncated", "ExternalBytesSent", "ExternalBytesReceived", "FinalUrl", "ApiCpuMilliseconds", "ApiBytesSent", "ApiBytesReceived", }); internal_static_java_apphosting_URLFetchResponse_Header_descriptor = internal_static_java_apphosting_URLFetchResponse_descriptor.getNestedTypes().get(0); internal_static_java_apphosting_URLFetchResponse_Header_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_java_apphosting_URLFetchResponse_Header_descriptor, new java.lang.String[] { "Key", "Value", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy