// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/monitoring/v3/uptime.proto

package com.google.monitoring.v3;

/**
 * <pre>
 * This message configures which resources and services to monitor for
 * availability.
 * </pre>
 *
 * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig}
 */
public  final class UptimeCheckConfig extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.monitoring.v3.UptimeCheckConfig)
    UptimeCheckConfigOrBuilder {
private static final long serialVersionUID = 0L;
  // Use UptimeCheckConfig.newBuilder() to construct.
  private UptimeCheckConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private UptimeCheckConfig() {
    name_ = "";
    displayName_ = "";
    contentMatchers_ = java.util.Collections.emptyList();
    selectedRegions_ = java.util.Collections.emptyList();
    internalCheckers_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private UptimeCheckConfig(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            name_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            displayName_ = s;
            break;
          }
          case 26: {
            com.google.api.MonitoredResource.Builder subBuilder = null;
            if (resourceCase_ == 3) {
              subBuilder = ((com.google.api.MonitoredResource) resource_).toBuilder();
            }
            resource_ =
                input.readMessage(com.google.api.MonitoredResource.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.api.MonitoredResource) resource_);
              resource_ = subBuilder.buildPartial();
            }
            resourceCase_ = 3;
            break;
          }
          case 34: {
            com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.Builder subBuilder = null;
            if (resourceCase_ == 4) {
              subBuilder = ((com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_).toBuilder();
            }
            resource_ =
                input.readMessage(com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_);
              resource_ = subBuilder.buildPartial();
            }
            resourceCase_ = 4;
            break;
          }
          case 42: {
            com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.Builder subBuilder = null;
            if (checkRequestTypeCase_ == 5) {
              subBuilder = ((com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_).toBuilder();
            }
            checkRequestType_ =
                input.readMessage(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_);
              checkRequestType_ = subBuilder.buildPartial();
            }
            checkRequestTypeCase_ = 5;
            break;
          }
          case 50: {
            com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.Builder subBuilder = null;
            if (checkRequestTypeCase_ == 6) {
              subBuilder = ((com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_).toBuilder();
            }
            checkRequestType_ =
                input.readMessage(com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_);
              checkRequestType_ = subBuilder.buildPartial();
            }
            checkRequestTypeCase_ = 6;
            break;
          }
          case 58: {
            com.google.protobuf.Duration.Builder subBuilder = null;
            if (period_ != null) {
              subBuilder = period_.toBuilder();
            }
            period_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(period_);
              period_ = subBuilder.buildPartial();
            }

            break;
          }
          case 66: {
            com.google.protobuf.Duration.Builder subBuilder = null;
            if (timeout_ != null) {
              subBuilder = timeout_.toBuilder();
            }
            timeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(timeout_);
              timeout_ = subBuilder.buildPartial();
            }

            break;
          }
          case 74: {
            if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
              contentMatchers_ = new java.util.ArrayList<com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher>();
              mutable_bitField0_ |= 0x00000100;
            }
            contentMatchers_.add(
                input.readMessage(com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.parser(), extensionRegistry));
            break;
          }
          case 80: {
            int rawValue = input.readEnum();
            if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
              selectedRegions_ = new java.util.ArrayList<java.lang.Integer>();
              mutable_bitField0_ |= 0x00000200;
            }
            selectedRegions_.add(rawValue);
            break;
          }
          case 82: {
            int length = input.readRawVarint32();
            int oldLimit = input.pushLimit(length);
            while(input.getBytesUntilLimit() > 0) {
              int rawValue = input.readEnum();
              if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
                selectedRegions_ = new java.util.ArrayList<java.lang.Integer>();
                mutable_bitField0_ |= 0x00000200;
              }
              selectedRegions_.add(rawValue);
            }
            input.popLimit(oldLimit);
            break;
          }
          case 114: {
            if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
              internalCheckers_ = new java.util.ArrayList<com.google.monitoring.v3.UptimeCheckConfig.InternalChecker>();
              mutable_bitField0_ |= 0x00000400;
            }
            internalCheckers_.add(
                input.readMessage(com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.parser(), extensionRegistry));
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
        contentMatchers_ = java.util.Collections.unmodifiableList(contentMatchers_);
      }
      if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
        selectedRegions_ = java.util.Collections.unmodifiableList(selectedRegions_);
      }
      if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
        internalCheckers_ = java.util.Collections.unmodifiableList(internalCheckers_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.monitoring.v3.UptimeCheckConfig.class, com.google.monitoring.v3.UptimeCheckConfig.Builder.class);
  }

  public interface ResourceGroupOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.monitoring.v3.UptimeCheckConfig.ResourceGroup)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The group of resources being monitored. Should be only the
     * group_id, not projects/&lt;project_id&gt;/groups/&lt;group_id&gt;.
     * </pre>
     *
     * <code>string group_id = 1;</code>
     */
    java.lang.String getGroupId();
    /**
     * <pre>
     * The group of resources being monitored. Should be only the
     * group_id, not projects/&lt;project_id&gt;/groups/&lt;group_id&gt;.
     * </pre>
     *
     * <code>string group_id = 1;</code>
     */
    com.google.protobuf.ByteString
        getGroupIdBytes();

    /**
     * <pre>
     * The resource type of the group members.
     * </pre>
     *
     * <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
     */
    int getResourceTypeValue();
    /**
     * <pre>
     * The resource type of the group members.
     * </pre>
     *
     * <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
     */
    com.google.monitoring.v3.GroupResourceType getResourceType();
  }
  /**
   * <pre>
   * The resource submessage for group checks. It can be used instead of a
   * monitored resource, when multiple resources are being monitored.
   * </pre>
   *
   * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.ResourceGroup}
   */
  public  static final class ResourceGroup extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.monitoring.v3.UptimeCheckConfig.ResourceGroup)
      ResourceGroupOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ResourceGroup.newBuilder() to construct.
    private ResourceGroup(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ResourceGroup() {
      groupId_ = "";
      resourceType_ = 0;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ResourceGroup(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              java.lang.String s = input.readStringRequireUtf8();

              groupId_ = s;
              break;
            }
            case 16: {
              int rawValue = input.readEnum();

              resourceType_ = rawValue;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ResourceGroup_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ResourceGroup_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.class, com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.Builder.class);
    }

    public static final int GROUP_ID_FIELD_NUMBER = 1;
    private volatile java.lang.Object groupId_;
    /**
     * <pre>
     * The group of resources being monitored. Should be only the
     * group_id, not projects/&lt;project_id&gt;/groups/&lt;group_id&gt;.
     * </pre>
     *
     * <code>string group_id = 1;</code>
     */
    public java.lang.String getGroupId() {
      java.lang.Object ref = groupId_;
      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();
        groupId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The group of resources being monitored. Should be only the
     * group_id, not projects/&lt;project_id&gt;/groups/&lt;group_id&gt;.
     * </pre>
     *
     * <code>string group_id = 1;</code>
     */
    public com.google.protobuf.ByteString
        getGroupIdBytes() {
      java.lang.Object ref = groupId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        groupId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int RESOURCE_TYPE_FIELD_NUMBER = 2;
    private int resourceType_;
    /**
     * <pre>
     * The resource type of the group members.
     * </pre>
     *
     * <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
     */
    public int getResourceTypeValue() {
      return resourceType_;
    }
    /**
     * <pre>
     * The resource type of the group members.
     * </pre>
     *
     * <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
     */
    public com.google.monitoring.v3.GroupResourceType getResourceType() {
      com.google.monitoring.v3.GroupResourceType result = com.google.monitoring.v3.GroupResourceType.valueOf(resourceType_);
      return result == null ? com.google.monitoring.v3.GroupResourceType.UNRECOGNIZED : result;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!getGroupIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, groupId_);
      }
      if (resourceType_ != com.google.monitoring.v3.GroupResourceType.RESOURCE_TYPE_UNSPECIFIED.getNumber()) {
        output.writeEnum(2, resourceType_);
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!getGroupIdBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, groupId_);
      }
      if (resourceType_ != com.google.monitoring.v3.GroupResourceType.RESOURCE_TYPE_UNSPECIFIED.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(2, resourceType_);
      }
      size += unknownFields.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.monitoring.v3.UptimeCheckConfig.ResourceGroup)) {
        return super.equals(obj);
      }
      com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup other = (com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) obj;

      boolean result = true;
      result = result && getGroupId()
          .equals(other.getGroupId());
      result = result && resourceType_ == other.resourceType_;
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
      hash = (53 * hash) + getGroupId().hashCode();
      hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER;
      hash = (53 * hash) + resourceType_;
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup 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.monitoring.v3.UptimeCheckConfig.ResourceGroup parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup 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.monitoring.v3.UptimeCheckConfig.ResourceGroup parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup 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.monitoring.v3.UptimeCheckConfig.ResourceGroup parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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;
    }
    /**
     * <pre>
     * The resource submessage for group checks. It can be used instead of a
     * monitored resource, when multiple resources are being monitored.
     * </pre>
     *
     * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.ResourceGroup}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.monitoring.v3.UptimeCheckConfig.ResourceGroup)
        com.google.monitoring.v3.UptimeCheckConfig.ResourceGroupOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ResourceGroup_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ResourceGroup_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.class, com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.Builder.class);
      }

      // Construct using com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        groupId_ = "";

        resourceType_ = 0;

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ResourceGroup_descriptor;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup getDefaultInstanceForType() {
        return com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.getDefaultInstance();
      }

      public com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup build() {
        com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup buildPartial() {
        com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup result = new com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup(this);
        result.groupId_ = groupId_;
        result.resourceType_ = resourceType_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) {
          return mergeFrom((com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup other) {
        if (other == com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.getDefaultInstance()) return this;
        if (!other.getGroupId().isEmpty()) {
          groupId_ = other.groupId_;
          onChanged();
        }
        if (other.resourceType_ != 0) {
          setResourceTypeValue(other.getResourceTypeValue());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object groupId_ = "";
      /**
       * <pre>
       * The group of resources being monitored. Should be only the
       * group_id, not projects/&lt;project_id&gt;/groups/&lt;group_id&gt;.
       * </pre>
       *
       * <code>string group_id = 1;</code>
       */
      public java.lang.String getGroupId() {
        java.lang.Object ref = groupId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          groupId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The group of resources being monitored. Should be only the
       * group_id, not projects/&lt;project_id&gt;/groups/&lt;group_id&gt;.
       * </pre>
       *
       * <code>string group_id = 1;</code>
       */
      public com.google.protobuf.ByteString
          getGroupIdBytes() {
        java.lang.Object ref = groupId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          groupId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The group of resources being monitored. Should be only the
       * group_id, not projects/&lt;project_id&gt;/groups/&lt;group_id&gt;.
       * </pre>
       *
       * <code>string group_id = 1;</code>
       */
      public Builder setGroupId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        groupId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The group of resources being monitored. Should be only the
       * group_id, not projects/&lt;project_id&gt;/groups/&lt;group_id&gt;.
       * </pre>
       *
       * <code>string group_id = 1;</code>
       */
      public Builder clearGroupId() {
        
        groupId_ = getDefaultInstance().getGroupId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The group of resources being monitored. Should be only the
       * group_id, not projects/&lt;project_id&gt;/groups/&lt;group_id&gt;.
       * </pre>
       *
       * <code>string group_id = 1;</code>
       */
      public Builder setGroupIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        groupId_ = value;
        onChanged();
        return this;
      }

      private int resourceType_ = 0;
      /**
       * <pre>
       * The resource type of the group members.
       * </pre>
       *
       * <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
       */
      public int getResourceTypeValue() {
        return resourceType_;
      }
      /**
       * <pre>
       * The resource type of the group members.
       * </pre>
       *
       * <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
       */
      public Builder setResourceTypeValue(int value) {
        resourceType_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The resource type of the group members.
       * </pre>
       *
       * <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
       */
      public com.google.monitoring.v3.GroupResourceType getResourceType() {
        com.google.monitoring.v3.GroupResourceType result = com.google.monitoring.v3.GroupResourceType.valueOf(resourceType_);
        return result == null ? com.google.monitoring.v3.GroupResourceType.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * The resource type of the group members.
       * </pre>
       *
       * <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
       */
      public Builder setResourceType(com.google.monitoring.v3.GroupResourceType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        resourceType_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The resource type of the group members.
       * </pre>
       *
       * <code>.google.monitoring.v3.GroupResourceType resource_type = 2;</code>
       */
      public Builder clearResourceType() {
        
        resourceType_ = 0;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:google.monitoring.v3.UptimeCheckConfig.ResourceGroup)
    }

    // @@protoc_insertion_point(class_scope:google.monitoring.v3.UptimeCheckConfig.ResourceGroup)
    private static final com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup();
    }

    public static com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<ResourceGroup>
        PARSER = new com.google.protobuf.AbstractParser<ResourceGroup>() {
      public ResourceGroup parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new ResourceGroup(input, extensionRegistry);
      }
    };

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

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

    public com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface HttpCheckOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.monitoring.v3.UptimeCheckConfig.HttpCheck)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * If true, use HTTPS instead of HTTP to run the check.
     * </pre>
     *
     * <code>bool use_ssl = 1;</code>
     */
    boolean getUseSsl();

    /**
     * <pre>
     * The path to the page to run the check against. Will be combined with the
     * host (specified within the MonitoredResource) and port to construct the
     * full URL. Optional (defaults to "/").
     * </pre>
     *
     * <code>string path = 2;</code>
     */
    java.lang.String getPath();
    /**
     * <pre>
     * The path to the page to run the check against. Will be combined with the
     * host (specified within the MonitoredResource) and port to construct the
     * full URL. Optional (defaults to "/").
     * </pre>
     *
     * <code>string path = 2;</code>
     */
    com.google.protobuf.ByteString
        getPathBytes();

    /**
     * <pre>
     * The port to the page to run the check against. Will be combined with host
     * (specified within the MonitoredResource) and path to construct the full
     * URL. Optional (defaults to 80 without SSL, or 443 with SSL).
     * </pre>
     *
     * <code>int32 port = 3;</code>
     */
    int getPort();

    /**
     * <pre>
     * The authentication information. Optional when creating an HTTP check;
     * defaults to empty.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
     */
    boolean hasAuthInfo();
    /**
     * <pre>
     * The authentication information. Optional when creating an HTTP check;
     * defaults to empty.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
     */
    com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication getAuthInfo();
    /**
     * <pre>
     * The authentication information. Optional when creating an HTTP check;
     * defaults to empty.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
     */
    com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthenticationOrBuilder getAuthInfoOrBuilder();

    /**
     * <pre>
     * Boolean specifiying whether to encrypt the header information.
     * Encryption should be specified for any headers related to authentication
     * that you do not wish to be seen when retrieving the configuration. The
     * server will be responsible for encrypting the headers.
     * On Get/List calls, if mask_headers is set to True then the headers
     * will be obscured with ******.
     * </pre>
     *
     * <code>bool mask_headers = 5;</code>
     */
    boolean getMaskHeaders();

    /**
     * <pre>
     * The list of headers to send as part of the uptime check request.
     * If two headers have the same key and different values, they should
     * be entered as a single header, with the value being a comma-separated
     * list of all the desired values as described at
     * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
     * Entering two separate headers with the same key in a Create call will
     * cause the first to be overwritten by the second.
     * </pre>
     *
     * <code>map&lt;string, string&gt; headers = 6;</code>
     */
    int getHeadersCount();
    /**
     * <pre>
     * The list of headers to send as part of the uptime check request.
     * If two headers have the same key and different values, they should
     * be entered as a single header, with the value being a comma-separated
     * list of all the desired values as described at
     * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
     * Entering two separate headers with the same key in a Create call will
     * cause the first to be overwritten by the second.
     * </pre>
     *
     * <code>map&lt;string, string&gt; headers = 6;</code>
     */
    boolean containsHeaders(
        java.lang.String key);
    /**
     * Use {@link #getHeadersMap()} instead.
     */
    @java.lang.Deprecated
    java.util.Map<java.lang.String, java.lang.String>
    getHeaders();
    /**
     * <pre>
     * The list of headers to send as part of the uptime check request.
     * If two headers have the same key and different values, they should
     * be entered as a single header, with the value being a comma-separated
     * list of all the desired values as described at
     * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
     * Entering two separate headers with the same key in a Create call will
     * cause the first to be overwritten by the second.
     * </pre>
     *
     * <code>map&lt;string, string&gt; headers = 6;</code>
     */
    java.util.Map<java.lang.String, java.lang.String>
    getHeadersMap();
    /**
     * <pre>
     * The list of headers to send as part of the uptime check request.
     * If two headers have the same key and different values, they should
     * be entered as a single header, with the value being a comma-separated
     * list of all the desired values as described at
     * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
     * Entering two separate headers with the same key in a Create call will
     * cause the first to be overwritten by the second.
     * </pre>
     *
     * <code>map&lt;string, string&gt; headers = 6;</code>
     */

    java.lang.String getHeadersOrDefault(
        java.lang.String key,
        java.lang.String defaultValue);
    /**
     * <pre>
     * The list of headers to send as part of the uptime check request.
     * If two headers have the same key and different values, they should
     * be entered as a single header, with the value being a comma-separated
     * list of all the desired values as described at
     * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
     * Entering two separate headers with the same key in a Create call will
     * cause the first to be overwritten by the second.
     * </pre>
     *
     * <code>map&lt;string, string&gt; headers = 6;</code>
     */

    java.lang.String getHeadersOrThrow(
        java.lang.String key);
  }
  /**
   * <pre>
   * Information involved in an HTTP/HTTPS uptime check request.
   * </pre>
   *
   * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.HttpCheck}
   */
  public  static final class HttpCheck extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.monitoring.v3.UptimeCheckConfig.HttpCheck)
      HttpCheckOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use HttpCheck.newBuilder() to construct.
    private HttpCheck(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private HttpCheck() {
      useSsl_ = false;
      path_ = "";
      port_ = 0;
      maskHeaders_ = false;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private HttpCheck(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 8: {

              useSsl_ = input.readBool();
              break;
            }
            case 18: {
              java.lang.String s = input.readStringRequireUtf8();

              path_ = s;
              break;
            }
            case 24: {

              port_ = input.readInt32();
              break;
            }
            case 34: {
              com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.Builder subBuilder = null;
              if (authInfo_ != null) {
                subBuilder = authInfo_.toBuilder();
              }
              authInfo_ = input.readMessage(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(authInfo_);
                authInfo_ = subBuilder.buildPartial();
              }

              break;
            }
            case 40: {

              maskHeaders_ = input.readBool();
              break;
            }
            case 50: {
              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
                headers_ = com.google.protobuf.MapField.newMapField(
                    HeadersDefaultEntryHolder.defaultEntry);
                mutable_bitField0_ |= 0x00000020;
              }
              com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
              headers__ = input.readMessage(
                  HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              headers_.getMutableMap().put(
                  headers__.getKey(), headers__.getValue());
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(
        int number) {
      switch (number) {
        case 6:
          return internalGetHeaders();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.class, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.Builder.class);
    }

    public interface BasicAuthenticationOrBuilder extends
        // @@protoc_insertion_point(interface_extends:google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <pre>
       * The username to authenticate.
       * </pre>
       *
       * <code>string username = 1;</code>
       */
      java.lang.String getUsername();
      /**
       * <pre>
       * The username to authenticate.
       * </pre>
       *
       * <code>string username = 1;</code>
       */
      com.google.protobuf.ByteString
          getUsernameBytes();

      /**
       * <pre>
       * The password to authenticate.
       * </pre>
       *
       * <code>string password = 2;</code>
       */
      java.lang.String getPassword();
      /**
       * <pre>
       * The password to authenticate.
       * </pre>
       *
       * <code>string password = 2;</code>
       */
      com.google.protobuf.ByteString
          getPasswordBytes();
    }
    /**
     * <pre>
     * A type of authentication to perform against the specified resource or URL
     * that uses username and password.
     * Currently, only Basic authentication is supported in Uptime Monitoring.
     * </pre>
     *
     * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication}
     */
    public  static final class BasicAuthentication extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication)
        BasicAuthenticationOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use BasicAuthentication.newBuilder() to construct.
      private BasicAuthentication(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private BasicAuthentication() {
        username_ = "";
        password_ = "";
      }

      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private BasicAuthentication(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              default: {
                if (!parseUnknownFieldProto3(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
              case 10: {
                java.lang.String s = input.readStringRequireUtf8();

                username_ = s;
                break;
              }
              case 18: {
                java.lang.String s = input.readStringRequireUtf8();

                password_ = s;
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_BasicAuthentication_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_BasicAuthentication_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.class, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.Builder.class);
      }

      public static final int USERNAME_FIELD_NUMBER = 1;
      private volatile java.lang.Object username_;
      /**
       * <pre>
       * The username to authenticate.
       * </pre>
       *
       * <code>string username = 1;</code>
       */
      public java.lang.String getUsername() {
        java.lang.Object ref = username_;
        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();
          username_ = s;
          return s;
        }
      }
      /**
       * <pre>
       * The username to authenticate.
       * </pre>
       *
       * <code>string username = 1;</code>
       */
      public com.google.protobuf.ByteString
          getUsernameBytes() {
        java.lang.Object ref = username_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          username_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      public static final int PASSWORD_FIELD_NUMBER = 2;
      private volatile java.lang.Object password_;
      /**
       * <pre>
       * The password to authenticate.
       * </pre>
       *
       * <code>string password = 2;</code>
       */
      public java.lang.String getPassword() {
        java.lang.Object ref = password_;
        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();
          password_ = s;
          return s;
        }
      }
      /**
       * <pre>
       * The password to authenticate.
       * </pre>
       *
       * <code>string password = 2;</code>
       */
      public com.google.protobuf.ByteString
          getPasswordBytes() {
        java.lang.Object ref = password_;
        if (ref instanceof java.lang.String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          password_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      private byte memoizedIsInitialized = -1;
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        memoizedIsInitialized = 1;
        return true;
      }

      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (!getUsernameBytes().isEmpty()) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_);
        }
        if (!getPasswordBytes().isEmpty()) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 2, password_);
        }
        unknownFields.writeTo(output);
      }

      public int getSerializedSize() {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (!getUsernameBytes().isEmpty()) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_);
        }
        if (!getPasswordBytes().isEmpty()) {
          size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, password_);
        }
        size += unknownFields.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.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication)) {
          return super.equals(obj);
        }
        com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication other = (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication) obj;

        boolean result = true;
        result = result && getUsername()
            .equals(other.getUsername());
        result = result && getPassword()
            .equals(other.getPassword());
        result = result && unknownFields.equals(other.unknownFields);
        return result;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + USERNAME_FIELD_NUMBER;
        hash = (53 * hash) + getUsername().hashCode();
        hash = (37 * hash) + PASSWORD_FIELD_NUMBER;
        hash = (53 * hash) + getPassword().hashCode();
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication 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.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication 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.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication 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.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input, extensionRegistry);
      }

      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder() {
        return DEFAULT_INSTANCE.toBuilder();
      }
      public static Builder newBuilder(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication prototype) {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
      }
      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;
      }
      /**
       * <pre>
       * A type of authentication to perform against the specified resource or URL
       * that uses username and password.
       * Currently, only Basic authentication is supported in Uptime Monitoring.
       * </pre>
       *
       * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication)
          com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthenticationOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_BasicAuthentication_descriptor;
        }

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_BasicAuthentication_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.class, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.Builder.class);
        }

        // Construct using com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }

        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
          }
        }
        public Builder clear() {
          super.clear();
          username_ = "";

          password_ = "";

          return this;
        }

        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_BasicAuthentication_descriptor;
        }

        public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication getDefaultInstanceForType() {
          return com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.getDefaultInstance();
        }

        public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication build() {
          com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication buildPartial() {
          com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication result = new com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication(this);
          result.username_ = username_;
          result.password_ = password_;
          onBuilt();
          return result;
        }

        public Builder clone() {
          return (Builder) super.clone();
        }
        public Builder setField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return (Builder) super.setField(field, value);
        }
        public Builder clearField(
            com.google.protobuf.Descriptors.FieldDescriptor field) {
          return (Builder) super.clearField(field);
        }
        public Builder clearOneof(
            com.google.protobuf.Descriptors.OneofDescriptor oneof) {
          return (Builder) super.clearOneof(oneof);
        }
        public Builder setRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            int index, java.lang.Object value) {
          return (Builder) super.setRepeatedField(field, index, value);
        }
        public Builder addRepeatedField(
            com.google.protobuf.Descriptors.FieldDescriptor field,
            java.lang.Object value) {
          return (Builder) super.addRepeatedField(field, value);
        }
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication) {
            return mergeFrom((com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication other) {
          if (other == com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.getDefaultInstance()) return this;
          if (!other.getUsername().isEmpty()) {
            username_ = other.username_;
            onChanged();
          }
          if (!other.getPassword().isEmpty()) {
            password_ = other.password_;
            onChanged();
          }
          this.mergeUnknownFields(other.unknownFields);
          onChanged();
          return this;
        }

        public final boolean isInitialized() {
          return true;
        }

        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }

        private java.lang.Object username_ = "";
        /**
         * <pre>
         * The username to authenticate.
         * </pre>
         *
         * <code>string username = 1;</code>
         */
        public java.lang.String getUsername() {
          java.lang.Object ref = username_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs =
                (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            username_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         * <pre>
         * The username to authenticate.
         * </pre>
         *
         * <code>string username = 1;</code>
         */
        public com.google.protobuf.ByteString
            getUsernameBytes() {
          java.lang.Object ref = username_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b = 
                com.google.protobuf.ByteString.copyFromUtf8(
                    (java.lang.String) ref);
            username_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         * <pre>
         * The username to authenticate.
         * </pre>
         *
         * <code>string username = 1;</code>
         */
        public Builder setUsername(
            java.lang.String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  
          username_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The username to authenticate.
         * </pre>
         *
         * <code>string username = 1;</code>
         */
        public Builder clearUsername() {
          
          username_ = getDefaultInstance().getUsername();
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The username to authenticate.
         * </pre>
         *
         * <code>string username = 1;</code>
         */
        public Builder setUsernameBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
          
          username_ = value;
          onChanged();
          return this;
        }

        private java.lang.Object password_ = "";
        /**
         * <pre>
         * The password to authenticate.
         * </pre>
         *
         * <code>string password = 2;</code>
         */
        public java.lang.String getPassword() {
          java.lang.Object ref = password_;
          if (!(ref instanceof java.lang.String)) {
            com.google.protobuf.ByteString bs =
                (com.google.protobuf.ByteString) ref;
            java.lang.String s = bs.toStringUtf8();
            password_ = s;
            return s;
          } else {
            return (java.lang.String) ref;
          }
        }
        /**
         * <pre>
         * The password to authenticate.
         * </pre>
         *
         * <code>string password = 2;</code>
         */
        public com.google.protobuf.ByteString
            getPasswordBytes() {
          java.lang.Object ref = password_;
          if (ref instanceof String) {
            com.google.protobuf.ByteString b = 
                com.google.protobuf.ByteString.copyFromUtf8(
                    (java.lang.String) ref);
            password_ = b;
            return b;
          } else {
            return (com.google.protobuf.ByteString) ref;
          }
        }
        /**
         * <pre>
         * The password to authenticate.
         * </pre>
         *
         * <code>string password = 2;</code>
         */
        public Builder setPassword(
            java.lang.String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  
          password_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The password to authenticate.
         * </pre>
         *
         * <code>string password = 2;</code>
         */
        public Builder clearPassword() {
          
          password_ = getDefaultInstance().getPassword();
          onChanged();
          return this;
        }
        /**
         * <pre>
         * The password to authenticate.
         * </pre>
         *
         * <code>string password = 2;</code>
         */
        public Builder setPasswordBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
          
          password_ = value;
          onChanged();
          return this;
        }
        public final Builder setUnknownFields(
            final com.google.protobuf.UnknownFieldSet unknownFields) {
          return super.setUnknownFieldsProto3(unknownFields);
        }

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


        // @@protoc_insertion_point(builder_scope:google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication)
      }

      // @@protoc_insertion_point(class_scope:google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication)
      private static final com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication();
      }

      public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      private static final com.google.protobuf.Parser<BasicAuthentication>
          PARSER = new com.google.protobuf.AbstractParser<BasicAuthentication>() {
        public BasicAuthentication parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new BasicAuthentication(input, extensionRegistry);
        }
      };

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

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

      public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }

    }

    private int bitField0_;
    public static final int USE_SSL_FIELD_NUMBER = 1;
    private boolean useSsl_;
    /**
     * <pre>
     * If true, use HTTPS instead of HTTP to run the check.
     * </pre>
     *
     * <code>bool use_ssl = 1;</code>
     */
    public boolean getUseSsl() {
      return useSsl_;
    }

    public static final int PATH_FIELD_NUMBER = 2;
    private volatile java.lang.Object path_;
    /**
     * <pre>
     * The path to the page to run the check against. Will be combined with the
     * host (specified within the MonitoredResource) and port to construct the
     * full URL. Optional (defaults to "/").
     * </pre>
     *
     * <code>string path = 2;</code>
     */
    public java.lang.String getPath() {
      java.lang.Object ref = path_;
      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();
        path_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The path to the page to run the check against. Will be combined with the
     * host (specified within the MonitoredResource) and port to construct the
     * full URL. Optional (defaults to "/").
     * </pre>
     *
     * <code>string path = 2;</code>
     */
    public com.google.protobuf.ByteString
        getPathBytes() {
      java.lang.Object ref = path_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        path_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int PORT_FIELD_NUMBER = 3;
    private int port_;
    /**
     * <pre>
     * The port to the page to run the check against. Will be combined with host
     * (specified within the MonitoredResource) and path to construct the full
     * URL. Optional (defaults to 80 without SSL, or 443 with SSL).
     * </pre>
     *
     * <code>int32 port = 3;</code>
     */
    public int getPort() {
      return port_;
    }

    public static final int AUTH_INFO_FIELD_NUMBER = 4;
    private com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication authInfo_;
    /**
     * <pre>
     * The authentication information. Optional when creating an HTTP check;
     * defaults to empty.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
     */
    public boolean hasAuthInfo() {
      return authInfo_ != null;
    }
    /**
     * <pre>
     * The authentication information. Optional when creating an HTTP check;
     * defaults to empty.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication getAuthInfo() {
      return authInfo_ == null ? com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.getDefaultInstance() : authInfo_;
    }
    /**
     * <pre>
     * The authentication information. Optional when creating an HTTP check;
     * defaults to empty.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthenticationOrBuilder getAuthInfoOrBuilder() {
      return getAuthInfo();
    }

    public static final int MASK_HEADERS_FIELD_NUMBER = 5;
    private boolean maskHeaders_;
    /**
     * <pre>
     * Boolean specifiying whether to encrypt the header information.
     * Encryption should be specified for any headers related to authentication
     * that you do not wish to be seen when retrieving the configuration. The
     * server will be responsible for encrypting the headers.
     * On Get/List calls, if mask_headers is set to True then the headers
     * will be obscured with ******.
     * </pre>
     *
     * <code>bool mask_headers = 5;</code>
     */
    public boolean getMaskHeaders() {
      return maskHeaders_;
    }

    public static final int HEADERS_FIELD_NUMBER = 6;
    private static final class HeadersDefaultEntryHolder {
      static final com.google.protobuf.MapEntry<
          java.lang.String, java.lang.String> defaultEntry =
              com.google.protobuf.MapEntry
              .<java.lang.String, java.lang.String>newDefaultInstance(
                  com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_HeadersEntry_descriptor, 
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "",
                  com.google.protobuf.WireFormat.FieldType.STRING,
                  "");
    }
    private com.google.protobuf.MapField<
        java.lang.String, java.lang.String> headers_;
    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
    internalGetHeaders() {
      if (headers_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            HeadersDefaultEntryHolder.defaultEntry);
      }
      return headers_;
    }

    public int getHeadersCount() {
      return internalGetHeaders().getMap().size();
    }
    /**
     * <pre>
     * The list of headers to send as part of the uptime check request.
     * If two headers have the same key and different values, they should
     * be entered as a single header, with the value being a comma-separated
     * list of all the desired values as described at
     * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
     * Entering two separate headers with the same key in a Create call will
     * cause the first to be overwritten by the second.
     * </pre>
     *
     * <code>map&lt;string, string&gt; headers = 6;</code>
     */

    public boolean containsHeaders(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      return internalGetHeaders().getMap().containsKey(key);
    }
    /**
     * Use {@link #getHeadersMap()} instead.
     */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getHeaders() {
      return getHeadersMap();
    }
    /**
     * <pre>
     * The list of headers to send as part of the uptime check request.
     * If two headers have the same key and different values, they should
     * be entered as a single header, with the value being a comma-separated
     * list of all the desired values as described at
     * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
     * Entering two separate headers with the same key in a Create call will
     * cause the first to be overwritten by the second.
     * </pre>
     *
     * <code>map&lt;string, string&gt; headers = 6;</code>
     */

    public java.util.Map<java.lang.String, java.lang.String> getHeadersMap() {
      return internalGetHeaders().getMap();
    }
    /**
     * <pre>
     * The list of headers to send as part of the uptime check request.
     * If two headers have the same key and different values, they should
     * be entered as a single header, with the value being a comma-separated
     * list of all the desired values as described at
     * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
     * Entering two separate headers with the same key in a Create call will
     * cause the first to be overwritten by the second.
     * </pre>
     *
     * <code>map&lt;string, string&gt; headers = 6;</code>
     */

    public java.lang.String getHeadersOrDefault(
        java.lang.String key,
        java.lang.String defaultValue) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetHeaders().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <pre>
     * The list of headers to send as part of the uptime check request.
     * If two headers have the same key and different values, they should
     * be entered as a single header, with the value being a comma-separated
     * list of all the desired values as described at
     * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
     * Entering two separate headers with the same key in a Create call will
     * cause the first to be overwritten by the second.
     * </pre>
     *
     * <code>map&lt;string, string&gt; headers = 6;</code>
     */

    public java.lang.String getHeadersOrThrow(
        java.lang.String key) {
      if (key == null) { throw new java.lang.NullPointerException(); }
      java.util.Map<java.lang.String, java.lang.String> map =
          internalGetHeaders().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (useSsl_ != false) {
        output.writeBool(1, useSsl_);
      }
      if (!getPathBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, path_);
      }
      if (port_ != 0) {
        output.writeInt32(3, port_);
      }
      if (authInfo_ != null) {
        output.writeMessage(4, getAuthInfo());
      }
      if (maskHeaders_ != false) {
        output.writeBool(5, maskHeaders_);
      }
      com.google.protobuf.GeneratedMessageV3
        .serializeStringMapTo(
          output,
          internalGetHeaders(),
          HeadersDefaultEntryHolder.defaultEntry,
          6);
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (useSsl_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(1, useSsl_);
      }
      if (!getPathBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, path_);
      }
      if (port_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(3, port_);
      }
      if (authInfo_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, getAuthInfo());
      }
      if (maskHeaders_ != false) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(5, maskHeaders_);
      }
      for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
           : internalGetHeaders().getMap().entrySet()) {
        com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
        headers__ = HeadersDefaultEntryHolder.defaultEntry.newBuilderForType()
            .setKey(entry.getKey())
            .setValue(entry.getValue())
            .build();
        size += com.google.protobuf.CodedOutputStream
            .computeMessageSize(6, headers__);
      }
      size += unknownFields.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.monitoring.v3.UptimeCheckConfig.HttpCheck)) {
        return super.equals(obj);
      }
      com.google.monitoring.v3.UptimeCheckConfig.HttpCheck other = (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) obj;

      boolean result = true;
      result = result && (getUseSsl()
          == other.getUseSsl());
      result = result && getPath()
          .equals(other.getPath());
      result = result && (getPort()
          == other.getPort());
      result = result && (hasAuthInfo() == other.hasAuthInfo());
      if (hasAuthInfo()) {
        result = result && getAuthInfo()
            .equals(other.getAuthInfo());
      }
      result = result && (getMaskHeaders()
          == other.getMaskHeaders());
      result = result && internalGetHeaders().equals(
          other.internalGetHeaders());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + USE_SSL_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getUseSsl());
      hash = (37 * hash) + PATH_FIELD_NUMBER;
      hash = (53 * hash) + getPath().hashCode();
      hash = (37 * hash) + PORT_FIELD_NUMBER;
      hash = (53 * hash) + getPort();
      if (hasAuthInfo()) {
        hash = (37 * hash) + AUTH_INFO_FIELD_NUMBER;
        hash = (53 * hash) + getAuthInfo().hashCode();
      }
      hash = (37 * hash) + MASK_HEADERS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
          getMaskHeaders());
      if (!internalGetHeaders().getMap().isEmpty()) {
        hash = (37 * hash) + HEADERS_FIELD_NUMBER;
        hash = (53 * hash) + internalGetHeaders().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck 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.monitoring.v3.UptimeCheckConfig.HttpCheck parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck 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.monitoring.v3.UptimeCheckConfig.HttpCheck parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck 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.monitoring.v3.UptimeCheckConfig.HttpCheck parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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;
    }
    /**
     * <pre>
     * Information involved in an HTTP/HTTPS uptime check request.
     * </pre>
     *
     * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.HttpCheck}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.monitoring.v3.UptimeCheckConfig.HttpCheck)
        com.google.monitoring.v3.UptimeCheckConfig.HttpCheckOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_descriptor;
      }

      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMapField(
          int number) {
        switch (number) {
          case 6:
            return internalGetHeaders();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      @SuppressWarnings({"rawtypes"})
      protected com.google.protobuf.MapField internalGetMutableMapField(
          int number) {
        switch (number) {
          case 6:
            return internalGetMutableHeaders();
          default:
            throw new RuntimeException(
                "Invalid map field number: " + number);
        }
      }
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.class, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.Builder.class);
      }

      // Construct using com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        useSsl_ = false;

        path_ = "";

        port_ = 0;

        if (authInfoBuilder_ == null) {
          authInfo_ = null;
        } else {
          authInfo_ = null;
          authInfoBuilder_ = null;
        }
        maskHeaders_ = false;

        internalGetMutableHeaders().clear();
        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_HttpCheck_descriptor;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck getDefaultInstanceForType() {
        return com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.getDefaultInstance();
      }

      public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck build() {
        com.google.monitoring.v3.UptimeCheckConfig.HttpCheck result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck buildPartial() {
        com.google.monitoring.v3.UptimeCheckConfig.HttpCheck result = new com.google.monitoring.v3.UptimeCheckConfig.HttpCheck(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        result.useSsl_ = useSsl_;
        result.path_ = path_;
        result.port_ = port_;
        if (authInfoBuilder_ == null) {
          result.authInfo_ = authInfo_;
        } else {
          result.authInfo_ = authInfoBuilder_.build();
        }
        result.maskHeaders_ = maskHeaders_;
        result.headers_ = internalGetHeaders();
        result.headers_.makeImmutable();
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) {
          return mergeFrom((com.google.monitoring.v3.UptimeCheckConfig.HttpCheck)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck other) {
        if (other == com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.getDefaultInstance()) return this;
        if (other.getUseSsl() != false) {
          setUseSsl(other.getUseSsl());
        }
        if (!other.getPath().isEmpty()) {
          path_ = other.path_;
          onChanged();
        }
        if (other.getPort() != 0) {
          setPort(other.getPort());
        }
        if (other.hasAuthInfo()) {
          mergeAuthInfo(other.getAuthInfo());
        }
        if (other.getMaskHeaders() != false) {
          setMaskHeaders(other.getMaskHeaders());
        }
        internalGetMutableHeaders().mergeFrom(
            other.internalGetHeaders());
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.monitoring.v3.UptimeCheckConfig.HttpCheck parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private boolean useSsl_ ;
      /**
       * <pre>
       * If true, use HTTPS instead of HTTP to run the check.
       * </pre>
       *
       * <code>bool use_ssl = 1;</code>
       */
      public boolean getUseSsl() {
        return useSsl_;
      }
      /**
       * <pre>
       * If true, use HTTPS instead of HTTP to run the check.
       * </pre>
       *
       * <code>bool use_ssl = 1;</code>
       */
      public Builder setUseSsl(boolean value) {
        
        useSsl_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * If true, use HTTPS instead of HTTP to run the check.
       * </pre>
       *
       * <code>bool use_ssl = 1;</code>
       */
      public Builder clearUseSsl() {
        
        useSsl_ = false;
        onChanged();
        return this;
      }

      private java.lang.Object path_ = "";
      /**
       * <pre>
       * The path to the page to run the check against. Will be combined with the
       * host (specified within the MonitoredResource) and port to construct the
       * full URL. Optional (defaults to "/").
       * </pre>
       *
       * <code>string path = 2;</code>
       */
      public java.lang.String getPath() {
        java.lang.Object ref = path_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          path_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The path to the page to run the check against. Will be combined with the
       * host (specified within the MonitoredResource) and port to construct the
       * full URL. Optional (defaults to "/").
       * </pre>
       *
       * <code>string path = 2;</code>
       */
      public com.google.protobuf.ByteString
          getPathBytes() {
        java.lang.Object ref = path_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          path_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The path to the page to run the check against. Will be combined with the
       * host (specified within the MonitoredResource) and port to construct the
       * full URL. Optional (defaults to "/").
       * </pre>
       *
       * <code>string path = 2;</code>
       */
      public Builder setPath(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        path_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The path to the page to run the check against. Will be combined with the
       * host (specified within the MonitoredResource) and port to construct the
       * full URL. Optional (defaults to "/").
       * </pre>
       *
       * <code>string path = 2;</code>
       */
      public Builder clearPath() {
        
        path_ = getDefaultInstance().getPath();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The path to the page to run the check against. Will be combined with the
       * host (specified within the MonitoredResource) and port to construct the
       * full URL. Optional (defaults to "/").
       * </pre>
       *
       * <code>string path = 2;</code>
       */
      public Builder setPathBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        path_ = value;
        onChanged();
        return this;
      }

      private int port_ ;
      /**
       * <pre>
       * The port to the page to run the check against. Will be combined with host
       * (specified within the MonitoredResource) and path to construct the full
       * URL. Optional (defaults to 80 without SSL, or 443 with SSL).
       * </pre>
       *
       * <code>int32 port = 3;</code>
       */
      public int getPort() {
        return port_;
      }
      /**
       * <pre>
       * The port to the page to run the check against. Will be combined with host
       * (specified within the MonitoredResource) and path to construct the full
       * URL. Optional (defaults to 80 without SSL, or 443 with SSL).
       * </pre>
       *
       * <code>int32 port = 3;</code>
       */
      public Builder setPort(int value) {
        
        port_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The port to the page to run the check against. Will be combined with host
       * (specified within the MonitoredResource) and path to construct the full
       * URL. Optional (defaults to 80 without SSL, or 443 with SSL).
       * </pre>
       *
       * <code>int32 port = 3;</code>
       */
      public Builder clearPort() {
        
        port_ = 0;
        onChanged();
        return this;
      }

      private com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication authInfo_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.Builder, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthenticationOrBuilder> authInfoBuilder_;
      /**
       * <pre>
       * The authentication information. Optional when creating an HTTP check;
       * defaults to empty.
       * </pre>
       *
       * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
       */
      public boolean hasAuthInfo() {
        return authInfoBuilder_ != null || authInfo_ != null;
      }
      /**
       * <pre>
       * The authentication information. Optional when creating an HTTP check;
       * defaults to empty.
       * </pre>
       *
       * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
       */
      public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication getAuthInfo() {
        if (authInfoBuilder_ == null) {
          return authInfo_ == null ? com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.getDefaultInstance() : authInfo_;
        } else {
          return authInfoBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * The authentication information. Optional when creating an HTTP check;
       * defaults to empty.
       * </pre>
       *
       * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
       */
      public Builder setAuthInfo(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication value) {
        if (authInfoBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          authInfo_ = value;
          onChanged();
        } else {
          authInfoBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * The authentication information. Optional when creating an HTTP check;
       * defaults to empty.
       * </pre>
       *
       * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
       */
      public Builder setAuthInfo(
          com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.Builder builderForValue) {
        if (authInfoBuilder_ == null) {
          authInfo_ = builderForValue.build();
          onChanged();
        } else {
          authInfoBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * The authentication information. Optional when creating an HTTP check;
       * defaults to empty.
       * </pre>
       *
       * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
       */
      public Builder mergeAuthInfo(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication value) {
        if (authInfoBuilder_ == null) {
          if (authInfo_ != null) {
            authInfo_ =
              com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.newBuilder(authInfo_).mergeFrom(value).buildPartial();
          } else {
            authInfo_ = value;
          }
          onChanged();
        } else {
          authInfoBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * The authentication information. Optional when creating an HTTP check;
       * defaults to empty.
       * </pre>
       *
       * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
       */
      public Builder clearAuthInfo() {
        if (authInfoBuilder_ == null) {
          authInfo_ = null;
          onChanged();
        } else {
          authInfo_ = null;
          authInfoBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * The authentication information. Optional when creating an HTTP check;
       * defaults to empty.
       * </pre>
       *
       * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
       */
      public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.Builder getAuthInfoBuilder() {
        
        onChanged();
        return getAuthInfoFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * The authentication information. Optional when creating an HTTP check;
       * defaults to empty.
       * </pre>
       *
       * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
       */
      public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthenticationOrBuilder getAuthInfoOrBuilder() {
        if (authInfoBuilder_ != null) {
          return authInfoBuilder_.getMessageOrBuilder();
        } else {
          return authInfo_ == null ?
              com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.getDefaultInstance() : authInfo_;
        }
      }
      /**
       * <pre>
       * The authentication information. Optional when creating an HTTP check;
       * defaults to empty.
       * </pre>
       *
       * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.Builder, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthenticationOrBuilder> 
          getAuthInfoFieldBuilder() {
        if (authInfoBuilder_ == null) {
          authInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication.Builder, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthenticationOrBuilder>(
                  getAuthInfo(),
                  getParentForChildren(),
                  isClean());
          authInfo_ = null;
        }
        return authInfoBuilder_;
      }

      private boolean maskHeaders_ ;
      /**
       * <pre>
       * Boolean specifiying whether to encrypt the header information.
       * Encryption should be specified for any headers related to authentication
       * that you do not wish to be seen when retrieving the configuration. The
       * server will be responsible for encrypting the headers.
       * On Get/List calls, if mask_headers is set to True then the headers
       * will be obscured with ******.
       * </pre>
       *
       * <code>bool mask_headers = 5;</code>
       */
      public boolean getMaskHeaders() {
        return maskHeaders_;
      }
      /**
       * <pre>
       * Boolean specifiying whether to encrypt the header information.
       * Encryption should be specified for any headers related to authentication
       * that you do not wish to be seen when retrieving the configuration. The
       * server will be responsible for encrypting the headers.
       * On Get/List calls, if mask_headers is set to True then the headers
       * will be obscured with ******.
       * </pre>
       *
       * <code>bool mask_headers = 5;</code>
       */
      public Builder setMaskHeaders(boolean value) {
        
        maskHeaders_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Boolean specifiying whether to encrypt the header information.
       * Encryption should be specified for any headers related to authentication
       * that you do not wish to be seen when retrieving the configuration. The
       * server will be responsible for encrypting the headers.
       * On Get/List calls, if mask_headers is set to True then the headers
       * will be obscured with ******.
       * </pre>
       *
       * <code>bool mask_headers = 5;</code>
       */
      public Builder clearMaskHeaders() {
        
        maskHeaders_ = false;
        onChanged();
        return this;
      }

      private com.google.protobuf.MapField<
          java.lang.String, java.lang.String> headers_;
      private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetHeaders() {
        if (headers_ == null) {
          return com.google.protobuf.MapField.emptyMapField(
              HeadersDefaultEntryHolder.defaultEntry);
        }
        return headers_;
      }
      private com.google.protobuf.MapField<java.lang.String, java.lang.String>
      internalGetMutableHeaders() {
        onChanged();;
        if (headers_ == null) {
          headers_ = com.google.protobuf.MapField.newMapField(
              HeadersDefaultEntryHolder.defaultEntry);
        }
        if (!headers_.isMutable()) {
          headers_ = headers_.copy();
        }
        return headers_;
      }

      public int getHeadersCount() {
        return internalGetHeaders().getMap().size();
      }
      /**
       * <pre>
       * The list of headers to send as part of the uptime check request.
       * If two headers have the same key and different values, they should
       * be entered as a single header, with the value being a comma-separated
       * list of all the desired values as described at
       * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
       * Entering two separate headers with the same key in a Create call will
       * cause the first to be overwritten by the second.
       * </pre>
       *
       * <code>map&lt;string, string&gt; headers = 6;</code>
       */

      public boolean containsHeaders(
          java.lang.String key) {
        if (key == null) { throw new java.lang.NullPointerException(); }
        return internalGetHeaders().getMap().containsKey(key);
      }
      /**
       * Use {@link #getHeadersMap()} instead.
       */
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, java.lang.String> getHeaders() {
        return getHeadersMap();
      }
      /**
       * <pre>
       * The list of headers to send as part of the uptime check request.
       * If two headers have the same key and different values, they should
       * be entered as a single header, with the value being a comma-separated
       * list of all the desired values as described at
       * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
       * Entering two separate headers with the same key in a Create call will
       * cause the first to be overwritten by the second.
       * </pre>
       *
       * <code>map&lt;string, string&gt; headers = 6;</code>
       */

      public java.util.Map<java.lang.String, java.lang.String> getHeadersMap() {
        return internalGetHeaders().getMap();
      }
      /**
       * <pre>
       * The list of headers to send as part of the uptime check request.
       * If two headers have the same key and different values, they should
       * be entered as a single header, with the value being a comma-separated
       * list of all the desired values as described at
       * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
       * Entering two separate headers with the same key in a Create call will
       * cause the first to be overwritten by the second.
       * </pre>
       *
       * <code>map&lt;string, string&gt; headers = 6;</code>
       */

      public java.lang.String getHeadersOrDefault(
          java.lang.String key,
          java.lang.String defaultValue) {
        if (key == null) { throw new java.lang.NullPointerException(); }
        java.util.Map<java.lang.String, java.lang.String> map =
            internalGetHeaders().getMap();
        return map.containsKey(key) ? map.get(key) : defaultValue;
      }
      /**
       * <pre>
       * The list of headers to send as part of the uptime check request.
       * If two headers have the same key and different values, they should
       * be entered as a single header, with the value being a comma-separated
       * list of all the desired values as described at
       * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
       * Entering two separate headers with the same key in a Create call will
       * cause the first to be overwritten by the second.
       * </pre>
       *
       * <code>map&lt;string, string&gt; headers = 6;</code>
       */

      public java.lang.String getHeadersOrThrow(
          java.lang.String key) {
        if (key == null) { throw new java.lang.NullPointerException(); }
        java.util.Map<java.lang.String, java.lang.String> map =
            internalGetHeaders().getMap();
        if (!map.containsKey(key)) {
          throw new java.lang.IllegalArgumentException();
        }
        return map.get(key);
      }

      public Builder clearHeaders() {
        internalGetMutableHeaders().getMutableMap()
            .clear();
        return this;
      }
      /**
       * <pre>
       * The list of headers to send as part of the uptime check request.
       * If two headers have the same key and different values, they should
       * be entered as a single header, with the value being a comma-separated
       * list of all the desired values as described at
       * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
       * Entering two separate headers with the same key in a Create call will
       * cause the first to be overwritten by the second.
       * </pre>
       *
       * <code>map&lt;string, string&gt; headers = 6;</code>
       */

      public Builder removeHeaders(
          java.lang.String key) {
        if (key == null) { throw new java.lang.NullPointerException(); }
        internalGetMutableHeaders().getMutableMap()
            .remove(key);
        return this;
      }
      /**
       * Use alternate mutation accessors instead.
       */
      @java.lang.Deprecated
      public java.util.Map<java.lang.String, java.lang.String>
      getMutableHeaders() {
        return internalGetMutableHeaders().getMutableMap();
      }
      /**
       * <pre>
       * The list of headers to send as part of the uptime check request.
       * If two headers have the same key and different values, they should
       * be entered as a single header, with the value being a comma-separated
       * list of all the desired values as described at
       * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
       * Entering two separate headers with the same key in a Create call will
       * cause the first to be overwritten by the second.
       * </pre>
       *
       * <code>map&lt;string, string&gt; headers = 6;</code>
       */
      public Builder putHeaders(
          java.lang.String key,
          java.lang.String value) {
        if (key == null) { throw new java.lang.NullPointerException(); }
        if (value == null) { throw new java.lang.NullPointerException(); }
        internalGetMutableHeaders().getMutableMap()
            .put(key, value);
        return this;
      }
      /**
       * <pre>
       * The list of headers to send as part of the uptime check request.
       * If two headers have the same key and different values, they should
       * be entered as a single header, with the value being a comma-separated
       * list of all the desired values as described at
       * https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31).
       * Entering two separate headers with the same key in a Create call will
       * cause the first to be overwritten by the second.
       * </pre>
       *
       * <code>map&lt;string, string&gt; headers = 6;</code>
       */

      public Builder putAllHeaders(
          java.util.Map<java.lang.String, java.lang.String> values) {
        internalGetMutableHeaders().getMutableMap()
            .putAll(values);
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:google.monitoring.v3.UptimeCheckConfig.HttpCheck)
    }

    // @@protoc_insertion_point(class_scope:google.monitoring.v3.UptimeCheckConfig.HttpCheck)
    private static final com.google.monitoring.v3.UptimeCheckConfig.HttpCheck DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.monitoring.v3.UptimeCheckConfig.HttpCheck();
    }

    public static com.google.monitoring.v3.UptimeCheckConfig.HttpCheck getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<HttpCheck>
        PARSER = new com.google.protobuf.AbstractParser<HttpCheck>() {
      public HttpCheck parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new HttpCheck(input, extensionRegistry);
      }
    };

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

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

    public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface TcpCheckOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.monitoring.v3.UptimeCheckConfig.TcpCheck)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The port to the page to run the check against. Will be combined with host
     * (specified within the MonitoredResource) to construct the full URL.
     * Required.
     * </pre>
     *
     * <code>int32 port = 1;</code>
     */
    int getPort();
  }
  /**
   * <pre>
   * Information required for a TCP uptime check request.
   * </pre>
   *
   * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.TcpCheck}
   */
  public  static final class TcpCheck extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.monitoring.v3.UptimeCheckConfig.TcpCheck)
      TcpCheckOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use TcpCheck.newBuilder() to construct.
    private TcpCheck(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private TcpCheck() {
      port_ = 0;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private TcpCheck(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 8: {

              port_ = input.readInt32();
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_TcpCheck_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_TcpCheck_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.class, com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.Builder.class);
    }

    public static final int PORT_FIELD_NUMBER = 1;
    private int port_;
    /**
     * <pre>
     * The port to the page to run the check against. Will be combined with host
     * (specified within the MonitoredResource) to construct the full URL.
     * Required.
     * </pre>
     *
     * <code>int32 port = 1;</code>
     */
    public int getPort() {
      return port_;
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (port_ != 0) {
        output.writeInt32(1, port_);
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (port_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, port_);
      }
      size += unknownFields.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.monitoring.v3.UptimeCheckConfig.TcpCheck)) {
        return super.equals(obj);
      }
      com.google.monitoring.v3.UptimeCheckConfig.TcpCheck other = (com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) obj;

      boolean result = true;
      result = result && (getPort()
          == other.getPort());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

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

    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck 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.monitoring.v3.UptimeCheckConfig.TcpCheck parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck 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.monitoring.v3.UptimeCheckConfig.TcpCheck parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck 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.monitoring.v3.UptimeCheckConfig.TcpCheck parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.google.monitoring.v3.UptimeCheckConfig.TcpCheck prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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;
    }
    /**
     * <pre>
     * Information required for a TCP uptime check request.
     * </pre>
     *
     * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.TcpCheck}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.monitoring.v3.UptimeCheckConfig.TcpCheck)
        com.google.monitoring.v3.UptimeCheckConfig.TcpCheckOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_TcpCheck_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_TcpCheck_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.class, com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.Builder.class);
      }

      // Construct using com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        port_ = 0;

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_TcpCheck_descriptor;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.TcpCheck getDefaultInstanceForType() {
        return com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.getDefaultInstance();
      }

      public com.google.monitoring.v3.UptimeCheckConfig.TcpCheck build() {
        com.google.monitoring.v3.UptimeCheckConfig.TcpCheck result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.TcpCheck buildPartial() {
        com.google.monitoring.v3.UptimeCheckConfig.TcpCheck result = new com.google.monitoring.v3.UptimeCheckConfig.TcpCheck(this);
        result.port_ = port_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) {
          return mergeFrom((com.google.monitoring.v3.UptimeCheckConfig.TcpCheck)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.monitoring.v3.UptimeCheckConfig.TcpCheck other) {
        if (other == com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.getDefaultInstance()) return this;
        if (other.getPort() != 0) {
          setPort(other.getPort());
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.monitoring.v3.UptimeCheckConfig.TcpCheck parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int port_ ;
      /**
       * <pre>
       * The port to the page to run the check against. Will be combined with host
       * (specified within the MonitoredResource) to construct the full URL.
       * Required.
       * </pre>
       *
       * <code>int32 port = 1;</code>
       */
      public int getPort() {
        return port_;
      }
      /**
       * <pre>
       * The port to the page to run the check against. Will be combined with host
       * (specified within the MonitoredResource) to construct the full URL.
       * Required.
       * </pre>
       *
       * <code>int32 port = 1;</code>
       */
      public Builder setPort(int value) {
        
        port_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The port to the page to run the check against. Will be combined with host
       * (specified within the MonitoredResource) to construct the full URL.
       * Required.
       * </pre>
       *
       * <code>int32 port = 1;</code>
       */
      public Builder clearPort() {
        
        port_ = 0;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:google.monitoring.v3.UptimeCheckConfig.TcpCheck)
    }

    // @@protoc_insertion_point(class_scope:google.monitoring.v3.UptimeCheckConfig.TcpCheck)
    private static final com.google.monitoring.v3.UptimeCheckConfig.TcpCheck DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.monitoring.v3.UptimeCheckConfig.TcpCheck();
    }

    public static com.google.monitoring.v3.UptimeCheckConfig.TcpCheck getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<TcpCheck>
        PARSER = new com.google.protobuf.AbstractParser<TcpCheck>() {
      public TcpCheck parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new TcpCheck(input, extensionRegistry);
      }
    };

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

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

    public com.google.monitoring.v3.UptimeCheckConfig.TcpCheck getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface ContentMatcherOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.monitoring.v3.UptimeCheckConfig.ContentMatcher)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * String content to match
     * </pre>
     *
     * <code>string content = 1;</code>
     */
    java.lang.String getContent();
    /**
     * <pre>
     * String content to match
     * </pre>
     *
     * <code>string content = 1;</code>
     */
    com.google.protobuf.ByteString
        getContentBytes();
  }
  /**
   * <pre>
   * Used to perform string matching. Currently, this matches on the exact
   * content. In the future, it can be expanded to allow for regular expressions
   * and more complex matching.
   * </pre>
   *
   * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.ContentMatcher}
   */
  public  static final class ContentMatcher extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.monitoring.v3.UptimeCheckConfig.ContentMatcher)
      ContentMatcherOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ContentMatcher.newBuilder() to construct.
    private ContentMatcher(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ContentMatcher() {
      content_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ContentMatcher(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              java.lang.String s = input.readStringRequireUtf8();

              content_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ContentMatcher_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ContentMatcher_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.class, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder.class);
    }

    public static final int CONTENT_FIELD_NUMBER = 1;
    private volatile java.lang.Object content_;
    /**
     * <pre>
     * String content to match
     * </pre>
     *
     * <code>string content = 1;</code>
     */
    public java.lang.String getContent() {
      java.lang.Object ref = content_;
      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();
        content_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * String content to match
     * </pre>
     *
     * <code>string content = 1;</code>
     */
    public com.google.protobuf.ByteString
        getContentBytes() {
      java.lang.Object ref = content_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        content_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!getContentBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, content_);
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!getContentBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, content_);
      }
      size += unknownFields.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.monitoring.v3.UptimeCheckConfig.ContentMatcher)) {
        return super.equals(obj);
      }
      com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher other = (com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher) obj;

      boolean result = true;
      result = result && getContent()
          .equals(other.getContent());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

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

    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher 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.monitoring.v3.UptimeCheckConfig.ContentMatcher parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher 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.monitoring.v3.UptimeCheckConfig.ContentMatcher parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher 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.monitoring.v3.UptimeCheckConfig.ContentMatcher parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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;
    }
    /**
     * <pre>
     * Used to perform string matching. Currently, this matches on the exact
     * content. In the future, it can be expanded to allow for regular expressions
     * and more complex matching.
     * </pre>
     *
     * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.ContentMatcher}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.monitoring.v3.UptimeCheckConfig.ContentMatcher)
        com.google.monitoring.v3.UptimeCheckConfig.ContentMatcherOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ContentMatcher_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ContentMatcher_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.class, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder.class);
      }

      // Construct using com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        content_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_ContentMatcher_descriptor;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher getDefaultInstanceForType() {
        return com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.getDefaultInstance();
      }

      public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher build() {
        com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher buildPartial() {
        com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher result = new com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher(this);
        result.content_ = content_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher) {
          return mergeFrom((com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher other) {
        if (other == com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.getDefaultInstance()) return this;
        if (!other.getContent().isEmpty()) {
          content_ = other.content_;
          onChanged();
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object content_ = "";
      /**
       * <pre>
       * String content to match
       * </pre>
       *
       * <code>string content = 1;</code>
       */
      public java.lang.String getContent() {
        java.lang.Object ref = content_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          content_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * String content to match
       * </pre>
       *
       * <code>string content = 1;</code>
       */
      public com.google.protobuf.ByteString
          getContentBytes() {
        java.lang.Object ref = content_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          content_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * String content to match
       * </pre>
       *
       * <code>string content = 1;</code>
       */
      public Builder setContent(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        content_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * String content to match
       * </pre>
       *
       * <code>string content = 1;</code>
       */
      public Builder clearContent() {
        
        content_ = getDefaultInstance().getContent();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * String content to match
       * </pre>
       *
       * <code>string content = 1;</code>
       */
      public Builder setContentBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        content_ = value;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:google.monitoring.v3.UptimeCheckConfig.ContentMatcher)
    }

    // @@protoc_insertion_point(class_scope:google.monitoring.v3.UptimeCheckConfig.ContentMatcher)
    private static final com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher();
    }

    public static com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<ContentMatcher>
        PARSER = new com.google.protobuf.AbstractParser<ContentMatcher>() {
      public ContentMatcher parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new ContentMatcher(input, extensionRegistry);
      }
    };

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

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

    public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface InternalCheckerOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.monitoring.v3.UptimeCheckConfig.InternalChecker)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The GCP project ID. Not necessarily the same as the project_id for the config.
     * </pre>
     *
     * <code>string project_id = 1;</code>
     */
    java.lang.String getProjectId();
    /**
     * <pre>
     * The GCP project ID. Not necessarily the same as the project_id for the config.
     * </pre>
     *
     * <code>string project_id = 1;</code>
     */
    com.google.protobuf.ByteString
        getProjectIdBytes();

    /**
     * <pre>
     * The internal network to perform this uptime check on.
     * </pre>
     *
     * <code>string network = 2;</code>
     */
    java.lang.String getNetwork();
    /**
     * <pre>
     * The internal network to perform this uptime check on.
     * </pre>
     *
     * <code>string network = 2;</code>
     */
    com.google.protobuf.ByteString
        getNetworkBytes();

    /**
     * <pre>
     * The GCP zone the uptime check should egress from. Only respected for
     * internal uptime checks, where internal_network is specified.
     * </pre>
     *
     * <code>string gcp_zone = 3;</code>
     */
    java.lang.String getGcpZone();
    /**
     * <pre>
     * The GCP zone the uptime check should egress from. Only respected for
     * internal uptime checks, where internal_network is specified.
     * </pre>
     *
     * <code>string gcp_zone = 3;</code>
     */
    com.google.protobuf.ByteString
        getGcpZoneBytes();

    /**
     * <pre>
     * The checker ID.
     * </pre>
     *
     * <code>string checker_id = 4;</code>
     */
    java.lang.String getCheckerId();
    /**
     * <pre>
     * The checker ID.
     * </pre>
     *
     * <code>string checker_id = 4;</code>
     */
    com.google.protobuf.ByteString
        getCheckerIdBytes();

    /**
     * <pre>
     * The checker's human-readable name.
     * </pre>
     *
     * <code>string display_name = 5;</code>
     */
    java.lang.String getDisplayName();
    /**
     * <pre>
     * The checker's human-readable name.
     * </pre>
     *
     * <code>string display_name = 5;</code>
     */
    com.google.protobuf.ByteString
        getDisplayNameBytes();
  }
  /**
   * <pre>
   * Nimbus InternalCheckers.
   * </pre>
   *
   * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.InternalChecker}
   */
  public  static final class InternalChecker extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.monitoring.v3.UptimeCheckConfig.InternalChecker)
      InternalCheckerOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use InternalChecker.newBuilder() to construct.
    private InternalChecker(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private InternalChecker() {
      projectId_ = "";
      network_ = "";
      gcpZone_ = "";
      checkerId_ = "";
      displayName_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private InternalChecker(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownFieldProto3(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              java.lang.String s = input.readStringRequireUtf8();

              projectId_ = s;
              break;
            }
            case 18: {
              java.lang.String s = input.readStringRequireUtf8();

              network_ = s;
              break;
            }
            case 26: {
              java.lang.String s = input.readStringRequireUtf8();

              gcpZone_ = s;
              break;
            }
            case 34: {
              java.lang.String s = input.readStringRequireUtf8();

              checkerId_ = s;
              break;
            }
            case 42: {
              java.lang.String s = input.readStringRequireUtf8();

              displayName_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_InternalChecker_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_InternalChecker_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.class, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder.class);
    }

    public static final int PROJECT_ID_FIELD_NUMBER = 1;
    private volatile java.lang.Object projectId_;
    /**
     * <pre>
     * The GCP project ID. Not necessarily the same as the project_id for the config.
     * </pre>
     *
     * <code>string project_id = 1;</code>
     */
    public java.lang.String getProjectId() {
      java.lang.Object ref = projectId_;
      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();
        projectId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The GCP project ID. Not necessarily the same as the project_id for the config.
     * </pre>
     *
     * <code>string project_id = 1;</code>
     */
    public com.google.protobuf.ByteString
        getProjectIdBytes() {
      java.lang.Object ref = projectId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        projectId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int NETWORK_FIELD_NUMBER = 2;
    private volatile java.lang.Object network_;
    /**
     * <pre>
     * The internal network to perform this uptime check on.
     * </pre>
     *
     * <code>string network = 2;</code>
     */
    public java.lang.String getNetwork() {
      java.lang.Object ref = network_;
      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();
        network_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The internal network to perform this uptime check on.
     * </pre>
     *
     * <code>string network = 2;</code>
     */
    public com.google.protobuf.ByteString
        getNetworkBytes() {
      java.lang.Object ref = network_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        network_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int GCP_ZONE_FIELD_NUMBER = 3;
    private volatile java.lang.Object gcpZone_;
    /**
     * <pre>
     * The GCP zone the uptime check should egress from. Only respected for
     * internal uptime checks, where internal_network is specified.
     * </pre>
     *
     * <code>string gcp_zone = 3;</code>
     */
    public java.lang.String getGcpZone() {
      java.lang.Object ref = gcpZone_;
      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();
        gcpZone_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The GCP zone the uptime check should egress from. Only respected for
     * internal uptime checks, where internal_network is specified.
     * </pre>
     *
     * <code>string gcp_zone = 3;</code>
     */
    public com.google.protobuf.ByteString
        getGcpZoneBytes() {
      java.lang.Object ref = gcpZone_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        gcpZone_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int CHECKER_ID_FIELD_NUMBER = 4;
    private volatile java.lang.Object checkerId_;
    /**
     * <pre>
     * The checker ID.
     * </pre>
     *
     * <code>string checker_id = 4;</code>
     */
    public java.lang.String getCheckerId() {
      java.lang.Object ref = checkerId_;
      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();
        checkerId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The checker ID.
     * </pre>
     *
     * <code>string checker_id = 4;</code>
     */
    public com.google.protobuf.ByteString
        getCheckerIdBytes() {
      java.lang.Object ref = checkerId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        checkerId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int DISPLAY_NAME_FIELD_NUMBER = 5;
    private volatile java.lang.Object displayName_;
    /**
     * <pre>
     * The checker's human-readable name.
     * </pre>
     *
     * <code>string display_name = 5;</code>
     */
    public java.lang.String getDisplayName() {
      java.lang.Object ref = displayName_;
      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();
        displayName_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The checker's human-readable name.
     * </pre>
     *
     * <code>string display_name = 5;</code>
     */
    public com.google.protobuf.ByteString
        getDisplayNameBytes() {
      java.lang.Object ref = displayName_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        displayName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!getProjectIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_);
      }
      if (!getNetworkBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, network_);
      }
      if (!getGcpZoneBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, gcpZone_);
      }
      if (!getCheckerIdBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 4, checkerId_);
      }
      if (!getDisplayNameBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_);
      }
      unknownFields.writeTo(output);
    }

    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!getProjectIdBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_);
      }
      if (!getNetworkBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, network_);
      }
      if (!getGcpZoneBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, gcpZone_);
      }
      if (!getCheckerIdBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, checkerId_);
      }
      if (!getDisplayNameBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_);
      }
      size += unknownFields.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.monitoring.v3.UptimeCheckConfig.InternalChecker)) {
        return super.equals(obj);
      }
      com.google.monitoring.v3.UptimeCheckConfig.InternalChecker other = (com.google.monitoring.v3.UptimeCheckConfig.InternalChecker) obj;

      boolean result = true;
      result = result && getProjectId()
          .equals(other.getProjectId());
      result = result && getNetwork()
          .equals(other.getNetwork());
      result = result && getGcpZone()
          .equals(other.getGcpZone());
      result = result && getCheckerId()
          .equals(other.getCheckerId());
      result = result && getDisplayName()
          .equals(other.getDisplayName());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER;
      hash = (53 * hash) + getProjectId().hashCode();
      hash = (37 * hash) + NETWORK_FIELD_NUMBER;
      hash = (53 * hash) + getNetwork().hashCode();
      hash = (37 * hash) + GCP_ZONE_FIELD_NUMBER;
      hash = (53 * hash) + getGcpZone().hashCode();
      hash = (37 * hash) + CHECKER_ID_FIELD_NUMBER;
      hash = (53 * hash) + getCheckerId().hashCode();
      hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
      hash = (53 * hash) + getDisplayName().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker 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.monitoring.v3.UptimeCheckConfig.InternalChecker parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker 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.monitoring.v3.UptimeCheckConfig.InternalChecker parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker 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.monitoring.v3.UptimeCheckConfig.InternalChecker parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.google.monitoring.v3.UptimeCheckConfig.InternalChecker prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    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;
    }
    /**
     * <pre>
     * Nimbus InternalCheckers.
     * </pre>
     *
     * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig.InternalChecker}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.monitoring.v3.UptimeCheckConfig.InternalChecker)
        com.google.monitoring.v3.UptimeCheckConfig.InternalCheckerOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_InternalChecker_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_InternalChecker_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.class, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder.class);
      }

      // Construct using com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      public Builder clear() {
        super.clear();
        projectId_ = "";

        network_ = "";

        gcpZone_ = "";

        checkerId_ = "";

        displayName_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_InternalChecker_descriptor;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.InternalChecker getDefaultInstanceForType() {
        return com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.getDefaultInstance();
      }

      public com.google.monitoring.v3.UptimeCheckConfig.InternalChecker build() {
        com.google.monitoring.v3.UptimeCheckConfig.InternalChecker result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.google.monitoring.v3.UptimeCheckConfig.InternalChecker buildPartial() {
        com.google.monitoring.v3.UptimeCheckConfig.InternalChecker result = new com.google.monitoring.v3.UptimeCheckConfig.InternalChecker(this);
        result.projectId_ = projectId_;
        result.network_ = network_;
        result.gcpZone_ = gcpZone_;
        result.checkerId_ = checkerId_;
        result.displayName_ = displayName_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.setField(field, value);
      }
      public Builder clearField(
          com.google.protobuf.Descriptors.FieldDescriptor field) {
        return (Builder) super.clearField(field);
      }
      public Builder clearOneof(
          com.google.protobuf.Descriptors.OneofDescriptor oneof) {
        return (Builder) super.clearOneof(oneof);
      }
      public Builder setRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          int index, java.lang.Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          java.lang.Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.monitoring.v3.UptimeCheckConfig.InternalChecker) {
          return mergeFrom((com.google.monitoring.v3.UptimeCheckConfig.InternalChecker)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.monitoring.v3.UptimeCheckConfig.InternalChecker other) {
        if (other == com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.getDefaultInstance()) return this;
        if (!other.getProjectId().isEmpty()) {
          projectId_ = other.projectId_;
          onChanged();
        }
        if (!other.getNetwork().isEmpty()) {
          network_ = other.network_;
          onChanged();
        }
        if (!other.getGcpZone().isEmpty()) {
          gcpZone_ = other.gcpZone_;
          onChanged();
        }
        if (!other.getCheckerId().isEmpty()) {
          checkerId_ = other.checkerId_;
          onChanged();
        }
        if (!other.getDisplayName().isEmpty()) {
          displayName_ = other.displayName_;
          onChanged();
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

      public final boolean isInitialized() {
        return true;
      }

      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.monitoring.v3.UptimeCheckConfig.InternalChecker parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.monitoring.v3.UptimeCheckConfig.InternalChecker) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object projectId_ = "";
      /**
       * <pre>
       * The GCP project ID. Not necessarily the same as the project_id for the config.
       * </pre>
       *
       * <code>string project_id = 1;</code>
       */
      public java.lang.String getProjectId() {
        java.lang.Object ref = projectId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          projectId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The GCP project ID. Not necessarily the same as the project_id for the config.
       * </pre>
       *
       * <code>string project_id = 1;</code>
       */
      public com.google.protobuf.ByteString
          getProjectIdBytes() {
        java.lang.Object ref = projectId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          projectId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The GCP project ID. Not necessarily the same as the project_id for the config.
       * </pre>
       *
       * <code>string project_id = 1;</code>
       */
      public Builder setProjectId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        projectId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The GCP project ID. Not necessarily the same as the project_id for the config.
       * </pre>
       *
       * <code>string project_id = 1;</code>
       */
      public Builder clearProjectId() {
        
        projectId_ = getDefaultInstance().getProjectId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The GCP project ID. Not necessarily the same as the project_id for the config.
       * </pre>
       *
       * <code>string project_id = 1;</code>
       */
      public Builder setProjectIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        projectId_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object network_ = "";
      /**
       * <pre>
       * The internal network to perform this uptime check on.
       * </pre>
       *
       * <code>string network = 2;</code>
       */
      public java.lang.String getNetwork() {
        java.lang.Object ref = network_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          network_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The internal network to perform this uptime check on.
       * </pre>
       *
       * <code>string network = 2;</code>
       */
      public com.google.protobuf.ByteString
          getNetworkBytes() {
        java.lang.Object ref = network_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          network_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The internal network to perform this uptime check on.
       * </pre>
       *
       * <code>string network = 2;</code>
       */
      public Builder setNetwork(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        network_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The internal network to perform this uptime check on.
       * </pre>
       *
       * <code>string network = 2;</code>
       */
      public Builder clearNetwork() {
        
        network_ = getDefaultInstance().getNetwork();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The internal network to perform this uptime check on.
       * </pre>
       *
       * <code>string network = 2;</code>
       */
      public Builder setNetworkBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        network_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object gcpZone_ = "";
      /**
       * <pre>
       * The GCP zone the uptime check should egress from. Only respected for
       * internal uptime checks, where internal_network is specified.
       * </pre>
       *
       * <code>string gcp_zone = 3;</code>
       */
      public java.lang.String getGcpZone() {
        java.lang.Object ref = gcpZone_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          gcpZone_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The GCP zone the uptime check should egress from. Only respected for
       * internal uptime checks, where internal_network is specified.
       * </pre>
       *
       * <code>string gcp_zone = 3;</code>
       */
      public com.google.protobuf.ByteString
          getGcpZoneBytes() {
        java.lang.Object ref = gcpZone_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          gcpZone_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The GCP zone the uptime check should egress from. Only respected for
       * internal uptime checks, where internal_network is specified.
       * </pre>
       *
       * <code>string gcp_zone = 3;</code>
       */
      public Builder setGcpZone(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        gcpZone_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The GCP zone the uptime check should egress from. Only respected for
       * internal uptime checks, where internal_network is specified.
       * </pre>
       *
       * <code>string gcp_zone = 3;</code>
       */
      public Builder clearGcpZone() {
        
        gcpZone_ = getDefaultInstance().getGcpZone();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The GCP zone the uptime check should egress from. Only respected for
       * internal uptime checks, where internal_network is specified.
       * </pre>
       *
       * <code>string gcp_zone = 3;</code>
       */
      public Builder setGcpZoneBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        gcpZone_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object checkerId_ = "";
      /**
       * <pre>
       * The checker ID.
       * </pre>
       *
       * <code>string checker_id = 4;</code>
       */
      public java.lang.String getCheckerId() {
        java.lang.Object ref = checkerId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          checkerId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The checker ID.
       * </pre>
       *
       * <code>string checker_id = 4;</code>
       */
      public com.google.protobuf.ByteString
          getCheckerIdBytes() {
        java.lang.Object ref = checkerId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          checkerId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The checker ID.
       * </pre>
       *
       * <code>string checker_id = 4;</code>
       */
      public Builder setCheckerId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        checkerId_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The checker ID.
       * </pre>
       *
       * <code>string checker_id = 4;</code>
       */
      public Builder clearCheckerId() {
        
        checkerId_ = getDefaultInstance().getCheckerId();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The checker ID.
       * </pre>
       *
       * <code>string checker_id = 4;</code>
       */
      public Builder setCheckerIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        checkerId_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object displayName_ = "";
      /**
       * <pre>
       * The checker's human-readable name.
       * </pre>
       *
       * <code>string display_name = 5;</code>
       */
      public java.lang.String getDisplayName() {
        java.lang.Object ref = displayName_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          displayName_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The checker's human-readable name.
       * </pre>
       *
       * <code>string display_name = 5;</code>
       */
      public com.google.protobuf.ByteString
          getDisplayNameBytes() {
        java.lang.Object ref = displayName_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          displayName_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The checker's human-readable name.
       * </pre>
       *
       * <code>string display_name = 5;</code>
       */
      public Builder setDisplayName(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        displayName_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The checker's human-readable name.
       * </pre>
       *
       * <code>string display_name = 5;</code>
       */
      public Builder clearDisplayName() {
        
        displayName_ = getDefaultInstance().getDisplayName();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The checker's human-readable name.
       * </pre>
       *
       * <code>string display_name = 5;</code>
       */
      public Builder setDisplayNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        displayName_ = value;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFieldsProto3(unknownFields);
      }

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


      // @@protoc_insertion_point(builder_scope:google.monitoring.v3.UptimeCheckConfig.InternalChecker)
    }

    // @@protoc_insertion_point(class_scope:google.monitoring.v3.UptimeCheckConfig.InternalChecker)
    private static final com.google.monitoring.v3.UptimeCheckConfig.InternalChecker DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.monitoring.v3.UptimeCheckConfig.InternalChecker();
    }

    public static com.google.monitoring.v3.UptimeCheckConfig.InternalChecker getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<InternalChecker>
        PARSER = new com.google.protobuf.AbstractParser<InternalChecker>() {
      public InternalChecker parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new InternalChecker(input, extensionRegistry);
      }
    };

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

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

    public com.google.monitoring.v3.UptimeCheckConfig.InternalChecker getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int bitField0_;
  private int resourceCase_ = 0;
  private java.lang.Object resource_;
  public enum ResourceCase
      implements com.google.protobuf.Internal.EnumLite {
    MONITORED_RESOURCE(3),
    RESOURCE_GROUP(4),
    RESOURCE_NOT_SET(0);
    private final int value;
    private ResourceCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static ResourceCase valueOf(int value) {
      return forNumber(value);
    }

    public static ResourceCase forNumber(int value) {
      switch (value) {
        case 3: return MONITORED_RESOURCE;
        case 4: return RESOURCE_GROUP;
        case 0: return RESOURCE_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public ResourceCase
  getResourceCase() {
    return ResourceCase.forNumber(
        resourceCase_);
  }

  private int checkRequestTypeCase_ = 0;
  private java.lang.Object checkRequestType_;
  public enum CheckRequestTypeCase
      implements com.google.protobuf.Internal.EnumLite {
    HTTP_CHECK(5),
    TCP_CHECK(6),
    CHECKREQUESTTYPE_NOT_SET(0);
    private final int value;
    private CheckRequestTypeCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static CheckRequestTypeCase valueOf(int value) {
      return forNumber(value);
    }

    public static CheckRequestTypeCase forNumber(int value) {
      switch (value) {
        case 5: return HTTP_CHECK;
        case 6: return TCP_CHECK;
        case 0: return CHECKREQUESTTYPE_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public CheckRequestTypeCase
  getCheckRequestTypeCase() {
    return CheckRequestTypeCase.forNumber(
        checkRequestTypeCase_);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * <pre>
   * A unique resource name for this UptimeCheckConfig. The format is:
   *   `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
   * This field should be omitted when creating the uptime check configuration;
   * on create, the resource name is assigned by the server and included in the
   * response.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    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();
      name_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * A unique resource name for this UptimeCheckConfig. The format is:
   *   `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
   * This field should be omitted when creating the uptime check configuration;
   * on create, the resource name is assigned by the server and included in the
   * response.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
  private volatile java.lang.Object displayName_;
  /**
   * <pre>
   * A human-friendly name for the uptime check configuration. The display name
   * should be unique within a Stackdriver Account in order to make it easier
   * to identify; however, uniqueness is not enforced. Required.
   * </pre>
   *
   * <code>string display_name = 2;</code>
   */
  public java.lang.String getDisplayName() {
    java.lang.Object ref = displayName_;
    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();
      displayName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * A human-friendly name for the uptime check configuration. The display name
   * should be unique within a Stackdriver Account in order to make it easier
   * to identify; however, uniqueness is not enforced. Required.
   * </pre>
   *
   * <code>string display_name = 2;</code>
   */
  public com.google.protobuf.ByteString
      getDisplayNameBytes() {
    java.lang.Object ref = displayName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      displayName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MONITORED_RESOURCE_FIELD_NUMBER = 3;
  /**
   * <pre>
   * The monitored resource associated with the configuration.
   * </pre>
   *
   * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
   */
  public boolean hasMonitoredResource() {
    return resourceCase_ == 3;
  }
  /**
   * <pre>
   * The monitored resource associated with the configuration.
   * </pre>
   *
   * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
   */
  public com.google.api.MonitoredResource getMonitoredResource() {
    if (resourceCase_ == 3) {
       return (com.google.api.MonitoredResource) resource_;
    }
    return com.google.api.MonitoredResource.getDefaultInstance();
  }
  /**
   * <pre>
   * The monitored resource associated with the configuration.
   * </pre>
   *
   * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
   */
  public com.google.api.MonitoredResourceOrBuilder getMonitoredResourceOrBuilder() {
    if (resourceCase_ == 3) {
       return (com.google.api.MonitoredResource) resource_;
    }
    return com.google.api.MonitoredResource.getDefaultInstance();
  }

  public static final int RESOURCE_GROUP_FIELD_NUMBER = 4;
  /**
   * <pre>
   * The group resource associated with the configuration.
   * </pre>
   *
   * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
   */
  public boolean hasResourceGroup() {
    return resourceCase_ == 4;
  }
  /**
   * <pre>
   * The group resource associated with the configuration.
   * </pre>
   *
   * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup getResourceGroup() {
    if (resourceCase_ == 4) {
       return (com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_;
    }
    return com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.getDefaultInstance();
  }
  /**
   * <pre>
   * The group resource associated with the configuration.
   * </pre>
   *
   * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.ResourceGroupOrBuilder getResourceGroupOrBuilder() {
    if (resourceCase_ == 4) {
       return (com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_;
    }
    return com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.getDefaultInstance();
  }

  public static final int HTTP_CHECK_FIELD_NUMBER = 5;
  /**
   * <pre>
   * Contains information needed to make an HTTP or HTTPS check.
   * </pre>
   *
   * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
   */
  public boolean hasHttpCheck() {
    return checkRequestTypeCase_ == 5;
  }
  /**
   * <pre>
   * Contains information needed to make an HTTP or HTTPS check.
   * </pre>
   *
   * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck getHttpCheck() {
    if (checkRequestTypeCase_ == 5) {
       return (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_;
    }
    return com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.getDefaultInstance();
  }
  /**
   * <pre>
   * Contains information needed to make an HTTP or HTTPS check.
   * </pre>
   *
   * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.HttpCheckOrBuilder getHttpCheckOrBuilder() {
    if (checkRequestTypeCase_ == 5) {
       return (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_;
    }
    return com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.getDefaultInstance();
  }

  public static final int TCP_CHECK_FIELD_NUMBER = 6;
  /**
   * <pre>
   * Contains information needed to make a TCP check.
   * </pre>
   *
   * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
   */
  public boolean hasTcpCheck() {
    return checkRequestTypeCase_ == 6;
  }
  /**
   * <pre>
   * Contains information needed to make a TCP check.
   * </pre>
   *
   * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.TcpCheck getTcpCheck() {
    if (checkRequestTypeCase_ == 6) {
       return (com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_;
    }
    return com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.getDefaultInstance();
  }
  /**
   * <pre>
   * Contains information needed to make a TCP check.
   * </pre>
   *
   * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.TcpCheckOrBuilder getTcpCheckOrBuilder() {
    if (checkRequestTypeCase_ == 6) {
       return (com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_;
    }
    return com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.getDefaultInstance();
  }

  public static final int PERIOD_FIELD_NUMBER = 7;
  private com.google.protobuf.Duration period_;
  /**
   * <pre>
   * How often the uptime check is performed.
   * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
   * </pre>
   *
   * <code>.google.protobuf.Duration period = 7;</code>
   */
  public boolean hasPeriod() {
    return period_ != null;
  }
  /**
   * <pre>
   * How often the uptime check is performed.
   * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
   * </pre>
   *
   * <code>.google.protobuf.Duration period = 7;</code>
   */
  public com.google.protobuf.Duration getPeriod() {
    return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
  }
  /**
   * <pre>
   * How often the uptime check is performed.
   * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
   * </pre>
   *
   * <code>.google.protobuf.Duration period = 7;</code>
   */
  public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() {
    return getPeriod();
  }

  public static final int TIMEOUT_FIELD_NUMBER = 8;
  private com.google.protobuf.Duration timeout_;
  /**
   * <pre>
   * The maximum amount of time to wait for the request to complete (must be
   * between 1 and 60 seconds). Required.
   * </pre>
   *
   * <code>.google.protobuf.Duration timeout = 8;</code>
   */
  public boolean hasTimeout() {
    return timeout_ != null;
  }
  /**
   * <pre>
   * The maximum amount of time to wait for the request to complete (must be
   * between 1 and 60 seconds). Required.
   * </pre>
   *
   * <code>.google.protobuf.Duration timeout = 8;</code>
   */
  public com.google.protobuf.Duration getTimeout() {
    return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
  }
  /**
   * <pre>
   * The maximum amount of time to wait for the request to complete (must be
   * between 1 and 60 seconds). Required.
   * </pre>
   *
   * <code>.google.protobuf.Duration timeout = 8;</code>
   */
  public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
    return getTimeout();
  }

  public static final int CONTENT_MATCHERS_FIELD_NUMBER = 9;
  private java.util.List<com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher> contentMatchers_;
  /**
   * <pre>
   * The expected content on the page the check is run against.
   * Currently, only the first entry in the list is supported, and other entries
   * will be ignored. The server will look for an exact match of the string in
   * the page response's content. This field is optional and should only be
   * specified if a content match is required.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
   */
  public java.util.List<com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher> getContentMatchersList() {
    return contentMatchers_;
  }
  /**
   * <pre>
   * The expected content on the page the check is run against.
   * Currently, only the first entry in the list is supported, and other entries
   * will be ignored. The server will look for an exact match of the string in
   * the page response's content. This field is optional and should only be
   * specified if a content match is required.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
   */
  public java.util.List<? extends com.google.monitoring.v3.UptimeCheckConfig.ContentMatcherOrBuilder> 
      getContentMatchersOrBuilderList() {
    return contentMatchers_;
  }
  /**
   * <pre>
   * The expected content on the page the check is run against.
   * Currently, only the first entry in the list is supported, and other entries
   * will be ignored. The server will look for an exact match of the string in
   * the page response's content. This field is optional and should only be
   * specified if a content match is required.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
   */
  public int getContentMatchersCount() {
    return contentMatchers_.size();
  }
  /**
   * <pre>
   * The expected content on the page the check is run against.
   * Currently, only the first entry in the list is supported, and other entries
   * will be ignored. The server will look for an exact match of the string in
   * the page response's content. This field is optional and should only be
   * specified if a content match is required.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher getContentMatchers(int index) {
    return contentMatchers_.get(index);
  }
  /**
   * <pre>
   * The expected content on the page the check is run against.
   * Currently, only the first entry in the list is supported, and other entries
   * will be ignored. The server will look for an exact match of the string in
   * the page response's content. This field is optional and should only be
   * specified if a content match is required.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcherOrBuilder getContentMatchersOrBuilder(
      int index) {
    return contentMatchers_.get(index);
  }

  public static final int SELECTED_REGIONS_FIELD_NUMBER = 10;
  private java.util.List<java.lang.Integer> selectedRegions_;
  private static final com.google.protobuf.Internal.ListAdapter.Converter<
      java.lang.Integer, com.google.monitoring.v3.UptimeCheckRegion> selectedRegions_converter_ =
          new com.google.protobuf.Internal.ListAdapter.Converter<
              java.lang.Integer, com.google.monitoring.v3.UptimeCheckRegion>() {
            public com.google.monitoring.v3.UptimeCheckRegion convert(java.lang.Integer from) {
              com.google.monitoring.v3.UptimeCheckRegion result = com.google.monitoring.v3.UptimeCheckRegion.valueOf(from);
              return result == null ? com.google.monitoring.v3.UptimeCheckRegion.UNRECOGNIZED : result;
            }
          };
  /**
   * <pre>
   * The list of regions from which the check will be run.
   * If this field is specified, enough regions to include a minimum of
   * 3 locations must be provided, or an error message is returned.
   * Not specifying this field will result in uptime checks running from all
   * regions.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
   */
  public java.util.List<com.google.monitoring.v3.UptimeCheckRegion> getSelectedRegionsList() {
    return new com.google.protobuf.Internal.ListAdapter<
        java.lang.Integer, com.google.monitoring.v3.UptimeCheckRegion>(selectedRegions_, selectedRegions_converter_);
  }
  /**
   * <pre>
   * The list of regions from which the check will be run.
   * If this field is specified, enough regions to include a minimum of
   * 3 locations must be provided, or an error message is returned.
   * Not specifying this field will result in uptime checks running from all
   * regions.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
   */
  public int getSelectedRegionsCount() {
    return selectedRegions_.size();
  }
  /**
   * <pre>
   * The list of regions from which the check will be run.
   * If this field is specified, enough regions to include a minimum of
   * 3 locations must be provided, or an error message is returned.
   * Not specifying this field will result in uptime checks running from all
   * regions.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
   */
  public com.google.monitoring.v3.UptimeCheckRegion getSelectedRegions(int index) {
    return selectedRegions_converter_.convert(selectedRegions_.get(index));
  }
  /**
   * <pre>
   * The list of regions from which the check will be run.
   * If this field is specified, enough regions to include a minimum of
   * 3 locations must be provided, or an error message is returned.
   * Not specifying this field will result in uptime checks running from all
   * regions.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
   */
  public java.util.List<java.lang.Integer>
  getSelectedRegionsValueList() {
    return selectedRegions_;
  }
  /**
   * <pre>
   * The list of regions from which the check will be run.
   * If this field is specified, enough regions to include a minimum of
   * 3 locations must be provided, or an error message is returned.
   * Not specifying this field will result in uptime checks running from all
   * regions.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
   */
  public int getSelectedRegionsValue(int index) {
    return selectedRegions_.get(index);
  }
  private int selectedRegionsMemoizedSerializedSize;

  public static final int INTERNAL_CHECKERS_FIELD_NUMBER = 14;
  private java.util.List<com.google.monitoring.v3.UptimeCheckConfig.InternalChecker> internalCheckers_;
  /**
   * <pre>
   * The internal checkers that this check will egress from.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
   */
  public java.util.List<com.google.monitoring.v3.UptimeCheckConfig.InternalChecker> getInternalCheckersList() {
    return internalCheckers_;
  }
  /**
   * <pre>
   * The internal checkers that this check will egress from.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
   */
  public java.util.List<? extends com.google.monitoring.v3.UptimeCheckConfig.InternalCheckerOrBuilder> 
      getInternalCheckersOrBuilderList() {
    return internalCheckers_;
  }
  /**
   * <pre>
   * The internal checkers that this check will egress from.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
   */
  public int getInternalCheckersCount() {
    return internalCheckers_.size();
  }
  /**
   * <pre>
   * The internal checkers that this check will egress from.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.InternalChecker getInternalCheckers(int index) {
    return internalCheckers_.get(index);
  }
  /**
   * <pre>
   * The internal checkers that this check will egress from.
   * </pre>
   *
   * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
   */
  public com.google.monitoring.v3.UptimeCheckConfig.InternalCheckerOrBuilder getInternalCheckersOrBuilder(
      int index) {
    return internalCheckers_.get(index);
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    getSerializedSize();
    if (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!getDisplayNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
    }
    if (resourceCase_ == 3) {
      output.writeMessage(3, (com.google.api.MonitoredResource) resource_);
    }
    if (resourceCase_ == 4) {
      output.writeMessage(4, (com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_);
    }
    if (checkRequestTypeCase_ == 5) {
      output.writeMessage(5, (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_);
    }
    if (checkRequestTypeCase_ == 6) {
      output.writeMessage(6, (com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_);
    }
    if (period_ != null) {
      output.writeMessage(7, getPeriod());
    }
    if (timeout_ != null) {
      output.writeMessage(8, getTimeout());
    }
    for (int i = 0; i < contentMatchers_.size(); i++) {
      output.writeMessage(9, contentMatchers_.get(i));
    }
    if (getSelectedRegionsList().size() > 0) {
      output.writeUInt32NoTag(82);
      output.writeUInt32NoTag(selectedRegionsMemoizedSerializedSize);
    }
    for (int i = 0; i < selectedRegions_.size(); i++) {
      output.writeEnumNoTag(selectedRegions_.get(i));
    }
    for (int i = 0; i < internalCheckers_.size(); i++) {
      output.writeMessage(14, internalCheckers_.get(i));
    }
    unknownFields.writeTo(output);
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!getDisplayNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
    }
    if (resourceCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (com.google.api.MonitoredResource) resource_);
    }
    if (resourceCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, (com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_);
    }
    if (checkRequestTypeCase_ == 5) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_);
    }
    if (checkRequestTypeCase_ == 6) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, (com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_);
    }
    if (period_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, getPeriod());
    }
    if (timeout_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, getTimeout());
    }
    for (int i = 0; i < contentMatchers_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, contentMatchers_.get(i));
    }
    {
      int dataSize = 0;
      for (int i = 0; i < selectedRegions_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeEnumSizeNoTag(selectedRegions_.get(i));
      }
      size += dataSize;
      if (!getSelectedRegionsList().isEmpty()) {  size += 1;
        size += com.google.protobuf.CodedOutputStream
          .computeUInt32SizeNoTag(dataSize);
      }selectedRegionsMemoizedSerializedSize = dataSize;
    }
    for (int i = 0; i < internalCheckers_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(14, internalCheckers_.get(i));
    }
    size += unknownFields.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.monitoring.v3.UptimeCheckConfig)) {
      return super.equals(obj);
    }
    com.google.monitoring.v3.UptimeCheckConfig other = (com.google.monitoring.v3.UptimeCheckConfig) obj;

    boolean result = true;
    result = result && getName()
        .equals(other.getName());
    result = result && getDisplayName()
        .equals(other.getDisplayName());
    result = result && (hasPeriod() == other.hasPeriod());
    if (hasPeriod()) {
      result = result && getPeriod()
          .equals(other.getPeriod());
    }
    result = result && (hasTimeout() == other.hasTimeout());
    if (hasTimeout()) {
      result = result && getTimeout()
          .equals(other.getTimeout());
    }
    result = result && getContentMatchersList()
        .equals(other.getContentMatchersList());
    result = result && selectedRegions_.equals(other.selectedRegions_);
    result = result && getInternalCheckersList()
        .equals(other.getInternalCheckersList());
    result = result && getResourceCase().equals(
        other.getResourceCase());
    if (!result) return false;
    switch (resourceCase_) {
      case 3:
        result = result && getMonitoredResource()
            .equals(other.getMonitoredResource());
        break;
      case 4:
        result = result && getResourceGroup()
            .equals(other.getResourceGroup());
        break;
      case 0:
      default:
    }
    result = result && getCheckRequestTypeCase().equals(
        other.getCheckRequestTypeCase());
    if (!result) return false;
    switch (checkRequestTypeCase_) {
      case 5:
        result = result && getHttpCheck()
            .equals(other.getHttpCheck());
        break;
      case 6:
        result = result && getTcpCheck()
            .equals(other.getTcpCheck());
        break;
      case 0:
      default:
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getDisplayName().hashCode();
    if (hasPeriod()) {
      hash = (37 * hash) + PERIOD_FIELD_NUMBER;
      hash = (53 * hash) + getPeriod().hashCode();
    }
    if (hasTimeout()) {
      hash = (37 * hash) + TIMEOUT_FIELD_NUMBER;
      hash = (53 * hash) + getTimeout().hashCode();
    }
    if (getContentMatchersCount() > 0) {
      hash = (37 * hash) + CONTENT_MATCHERS_FIELD_NUMBER;
      hash = (53 * hash) + getContentMatchersList().hashCode();
    }
    if (getSelectedRegionsCount() > 0) {
      hash = (37 * hash) + SELECTED_REGIONS_FIELD_NUMBER;
      hash = (53 * hash) + selectedRegions_.hashCode();
    }
    if (getInternalCheckersCount() > 0) {
      hash = (37 * hash) + INTERNAL_CHECKERS_FIELD_NUMBER;
      hash = (53 * hash) + getInternalCheckersList().hashCode();
    }
    switch (resourceCase_) {
      case 3:
        hash = (37 * hash) + MONITORED_RESOURCE_FIELD_NUMBER;
        hash = (53 * hash) + getMonitoredResource().hashCode();
        break;
      case 4:
        hash = (37 * hash) + RESOURCE_GROUP_FIELD_NUMBER;
        hash = (53 * hash) + getResourceGroup().hashCode();
        break;
      case 0:
      default:
    }
    switch (checkRequestTypeCase_) {
      case 5:
        hash = (37 * hash) + HTTP_CHECK_FIELD_NUMBER;
        hash = (53 * hash) + getHttpCheck().hashCode();
        break;
      case 6:
        hash = (37 * hash) + TCP_CHECK_FIELD_NUMBER;
        hash = (53 * hash) + getTcpCheck().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.monitoring.v3.UptimeCheckConfig parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.monitoring.v3.UptimeCheckConfig parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.monitoring.v3.UptimeCheckConfig parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.monitoring.v3.UptimeCheckConfig 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.monitoring.v3.UptimeCheckConfig parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.monitoring.v3.UptimeCheckConfig parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.monitoring.v3.UptimeCheckConfig parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.monitoring.v3.UptimeCheckConfig 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.monitoring.v3.UptimeCheckConfig parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.monitoring.v3.UptimeCheckConfig 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.monitoring.v3.UptimeCheckConfig parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.monitoring.v3.UptimeCheckConfig parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.monitoring.v3.UptimeCheckConfig prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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;
  }
  /**
   * <pre>
   * This message configures which resources and services to monitor for
   * availability.
   * </pre>
   *
   * Protobuf type {@code google.monitoring.v3.UptimeCheckConfig}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.monitoring.v3.UptimeCheckConfig)
      com.google.monitoring.v3.UptimeCheckConfigOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.monitoring.v3.UptimeCheckConfig.class, com.google.monitoring.v3.UptimeCheckConfig.Builder.class);
    }

    // Construct using com.google.monitoring.v3.UptimeCheckConfig.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getContentMatchersFieldBuilder();
        getInternalCheckersFieldBuilder();
      }
    }
    public Builder clear() {
      super.clear();
      name_ = "";

      displayName_ = "";

      if (periodBuilder_ == null) {
        period_ = null;
      } else {
        period_ = null;
        periodBuilder_ = null;
      }
      if (timeoutBuilder_ == null) {
        timeout_ = null;
      } else {
        timeout_ = null;
        timeoutBuilder_ = null;
      }
      if (contentMatchersBuilder_ == null) {
        contentMatchers_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000100);
      } else {
        contentMatchersBuilder_.clear();
      }
      selectedRegions_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000200);
      if (internalCheckersBuilder_ == null) {
        internalCheckers_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000400);
      } else {
        internalCheckersBuilder_.clear();
      }
      resourceCase_ = 0;
      resource_ = null;
      checkRequestTypeCase_ = 0;
      checkRequestType_ = null;
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.monitoring.v3.UptimeProto.internal_static_google_monitoring_v3_UptimeCheckConfig_descriptor;
    }

    public com.google.monitoring.v3.UptimeCheckConfig getDefaultInstanceForType() {
      return com.google.monitoring.v3.UptimeCheckConfig.getDefaultInstance();
    }

    public com.google.monitoring.v3.UptimeCheckConfig build() {
      com.google.monitoring.v3.UptimeCheckConfig result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.monitoring.v3.UptimeCheckConfig buildPartial() {
      com.google.monitoring.v3.UptimeCheckConfig result = new com.google.monitoring.v3.UptimeCheckConfig(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.name_ = name_;
      result.displayName_ = displayName_;
      if (resourceCase_ == 3) {
        if (monitoredResourceBuilder_ == null) {
          result.resource_ = resource_;
        } else {
          result.resource_ = monitoredResourceBuilder_.build();
        }
      }
      if (resourceCase_ == 4) {
        if (resourceGroupBuilder_ == null) {
          result.resource_ = resource_;
        } else {
          result.resource_ = resourceGroupBuilder_.build();
        }
      }
      if (checkRequestTypeCase_ == 5) {
        if (httpCheckBuilder_ == null) {
          result.checkRequestType_ = checkRequestType_;
        } else {
          result.checkRequestType_ = httpCheckBuilder_.build();
        }
      }
      if (checkRequestTypeCase_ == 6) {
        if (tcpCheckBuilder_ == null) {
          result.checkRequestType_ = checkRequestType_;
        } else {
          result.checkRequestType_ = tcpCheckBuilder_.build();
        }
      }
      if (periodBuilder_ == null) {
        result.period_ = period_;
      } else {
        result.period_ = periodBuilder_.build();
      }
      if (timeoutBuilder_ == null) {
        result.timeout_ = timeout_;
      } else {
        result.timeout_ = timeoutBuilder_.build();
      }
      if (contentMatchersBuilder_ == null) {
        if (((bitField0_ & 0x00000100) == 0x00000100)) {
          contentMatchers_ = java.util.Collections.unmodifiableList(contentMatchers_);
          bitField0_ = (bitField0_ & ~0x00000100);
        }
        result.contentMatchers_ = contentMatchers_;
      } else {
        result.contentMatchers_ = contentMatchersBuilder_.build();
      }
      if (((bitField0_ & 0x00000200) == 0x00000200)) {
        selectedRegions_ = java.util.Collections.unmodifiableList(selectedRegions_);
        bitField0_ = (bitField0_ & ~0x00000200);
      }
      result.selectedRegions_ = selectedRegions_;
      if (internalCheckersBuilder_ == null) {
        if (((bitField0_ & 0x00000400) == 0x00000400)) {
          internalCheckers_ = java.util.Collections.unmodifiableList(internalCheckers_);
          bitField0_ = (bitField0_ & ~0x00000400);
        }
        result.internalCheckers_ = internalCheckers_;
      } else {
        result.internalCheckers_ = internalCheckersBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      result.resourceCase_ = resourceCase_;
      result.checkRequestTypeCase_ = checkRequestTypeCase_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.monitoring.v3.UptimeCheckConfig) {
        return mergeFrom((com.google.monitoring.v3.UptimeCheckConfig)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.monitoring.v3.UptimeCheckConfig other) {
      if (other == com.google.monitoring.v3.UptimeCheckConfig.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getDisplayName().isEmpty()) {
        displayName_ = other.displayName_;
        onChanged();
      }
      if (other.hasPeriod()) {
        mergePeriod(other.getPeriod());
      }
      if (other.hasTimeout()) {
        mergeTimeout(other.getTimeout());
      }
      if (contentMatchersBuilder_ == null) {
        if (!other.contentMatchers_.isEmpty()) {
          if (contentMatchers_.isEmpty()) {
            contentMatchers_ = other.contentMatchers_;
            bitField0_ = (bitField0_ & ~0x00000100);
          } else {
            ensureContentMatchersIsMutable();
            contentMatchers_.addAll(other.contentMatchers_);
          }
          onChanged();
        }
      } else {
        if (!other.contentMatchers_.isEmpty()) {
          if (contentMatchersBuilder_.isEmpty()) {
            contentMatchersBuilder_.dispose();
            contentMatchersBuilder_ = null;
            contentMatchers_ = other.contentMatchers_;
            bitField0_ = (bitField0_ & ~0x00000100);
            contentMatchersBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getContentMatchersFieldBuilder() : null;
          } else {
            contentMatchersBuilder_.addAllMessages(other.contentMatchers_);
          }
        }
      }
      if (!other.selectedRegions_.isEmpty()) {
        if (selectedRegions_.isEmpty()) {
          selectedRegions_ = other.selectedRegions_;
          bitField0_ = (bitField0_ & ~0x00000200);
        } else {
          ensureSelectedRegionsIsMutable();
          selectedRegions_.addAll(other.selectedRegions_);
        }
        onChanged();
      }
      if (internalCheckersBuilder_ == null) {
        if (!other.internalCheckers_.isEmpty()) {
          if (internalCheckers_.isEmpty()) {
            internalCheckers_ = other.internalCheckers_;
            bitField0_ = (bitField0_ & ~0x00000400);
          } else {
            ensureInternalCheckersIsMutable();
            internalCheckers_.addAll(other.internalCheckers_);
          }
          onChanged();
        }
      } else {
        if (!other.internalCheckers_.isEmpty()) {
          if (internalCheckersBuilder_.isEmpty()) {
            internalCheckersBuilder_.dispose();
            internalCheckersBuilder_ = null;
            internalCheckers_ = other.internalCheckers_;
            bitField0_ = (bitField0_ & ~0x00000400);
            internalCheckersBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getInternalCheckersFieldBuilder() : null;
          } else {
            internalCheckersBuilder_.addAllMessages(other.internalCheckers_);
          }
        }
      }
      switch (other.getResourceCase()) {
        case MONITORED_RESOURCE: {
          mergeMonitoredResource(other.getMonitoredResource());
          break;
        }
        case RESOURCE_GROUP: {
          mergeResourceGroup(other.getResourceGroup());
          break;
        }
        case RESOURCE_NOT_SET: {
          break;
        }
      }
      switch (other.getCheckRequestTypeCase()) {
        case HTTP_CHECK: {
          mergeHttpCheck(other.getHttpCheck());
          break;
        }
        case TCP_CHECK: {
          mergeTcpCheck(other.getTcpCheck());
          break;
        }
        case CHECKREQUESTTYPE_NOT_SET: {
          break;
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.monitoring.v3.UptimeCheckConfig parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.monitoring.v3.UptimeCheckConfig) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int resourceCase_ = 0;
    private java.lang.Object resource_;
    public ResourceCase
        getResourceCase() {
      return ResourceCase.forNumber(
          resourceCase_);
    }

    public Builder clearResource() {
      resourceCase_ = 0;
      resource_ = null;
      onChanged();
      return this;
    }

    private int checkRequestTypeCase_ = 0;
    private java.lang.Object checkRequestType_;
    public CheckRequestTypeCase
        getCheckRequestTypeCase() {
      return CheckRequestTypeCase.forNumber(
          checkRequestTypeCase_);
    }

    public Builder clearCheckRequestType() {
      checkRequestTypeCase_ = 0;
      checkRequestType_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     * <pre>
     * A unique resource name for this UptimeCheckConfig. The format is:
     *   `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
     * This field should be omitted when creating the uptime check configuration;
     * on create, the resource name is assigned by the server and included in the
     * response.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * A unique resource name for this UptimeCheckConfig. The format is:
     *   `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
     * This field should be omitted when creating the uptime check configuration;
     * on create, the resource name is assigned by the server and included in the
     * response.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * A unique resource name for this UptimeCheckConfig. The format is:
     *   `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
     * This field should be omitted when creating the uptime check configuration;
     * on create, the resource name is assigned by the server and included in the
     * response.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A unique resource name for this UptimeCheckConfig. The format is:
     *   `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
     * This field should be omitted when creating the uptime check configuration;
     * on create, the resource name is assigned by the server and included in the
     * response.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A unique resource name for this UptimeCheckConfig. The format is:
     *   `projects/[PROJECT_ID]/uptimeCheckConfigs/[UPTIME_CHECK_ID]`.
     * This field should be omitted when creating the uptime check configuration;
     * on create, the resource name is assigned by the server and included in the
     * response.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      name_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object displayName_ = "";
    /**
     * <pre>
     * A human-friendly name for the uptime check configuration. The display name
     * should be unique within a Stackdriver Account in order to make it easier
     * to identify; however, uniqueness is not enforced. Required.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     */
    public java.lang.String getDisplayName() {
      java.lang.Object ref = displayName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        displayName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * A human-friendly name for the uptime check configuration. The display name
     * should be unique within a Stackdriver Account in order to make it easier
     * to identify; however, uniqueness is not enforced. Required.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     */
    public com.google.protobuf.ByteString
        getDisplayNameBytes() {
      java.lang.Object ref = displayName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        displayName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * A human-friendly name for the uptime check configuration. The display name
     * should be unique within a Stackdriver Account in order to make it easier
     * to identify; however, uniqueness is not enforced. Required.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     */
    public Builder setDisplayName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      displayName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A human-friendly name for the uptime check configuration. The display name
     * should be unique within a Stackdriver Account in order to make it easier
     * to identify; however, uniqueness is not enforced. Required.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     */
    public Builder clearDisplayName() {
      
      displayName_ = getDefaultInstance().getDisplayName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * A human-friendly name for the uptime check configuration. The display name
     * should be unique within a Stackdriver Account in order to make it easier
     * to identify; however, uniqueness is not enforced. Required.
     * </pre>
     *
     * <code>string display_name = 2;</code>
     */
    public Builder setDisplayNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      displayName_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.api.MonitoredResource, com.google.api.MonitoredResource.Builder, com.google.api.MonitoredResourceOrBuilder> monitoredResourceBuilder_;
    /**
     * <pre>
     * The monitored resource associated with the configuration.
     * </pre>
     *
     * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
     */
    public boolean hasMonitoredResource() {
      return resourceCase_ == 3;
    }
    /**
     * <pre>
     * The monitored resource associated with the configuration.
     * </pre>
     *
     * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
     */
    public com.google.api.MonitoredResource getMonitoredResource() {
      if (monitoredResourceBuilder_ == null) {
        if (resourceCase_ == 3) {
          return (com.google.api.MonitoredResource) resource_;
        }
        return com.google.api.MonitoredResource.getDefaultInstance();
      } else {
        if (resourceCase_ == 3) {
          return monitoredResourceBuilder_.getMessage();
        }
        return com.google.api.MonitoredResource.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The monitored resource associated with the configuration.
     * </pre>
     *
     * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
     */
    public Builder setMonitoredResource(com.google.api.MonitoredResource value) {
      if (monitoredResourceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        resource_ = value;
        onChanged();
      } else {
        monitoredResourceBuilder_.setMessage(value);
      }
      resourceCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * The monitored resource associated with the configuration.
     * </pre>
     *
     * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
     */
    public Builder setMonitoredResource(
        com.google.api.MonitoredResource.Builder builderForValue) {
      if (monitoredResourceBuilder_ == null) {
        resource_ = builderForValue.build();
        onChanged();
      } else {
        monitoredResourceBuilder_.setMessage(builderForValue.build());
      }
      resourceCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * The monitored resource associated with the configuration.
     * </pre>
     *
     * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
     */
    public Builder mergeMonitoredResource(com.google.api.MonitoredResource value) {
      if (monitoredResourceBuilder_ == null) {
        if (resourceCase_ == 3 &&
            resource_ != com.google.api.MonitoredResource.getDefaultInstance()) {
          resource_ = com.google.api.MonitoredResource.newBuilder((com.google.api.MonitoredResource) resource_)
              .mergeFrom(value).buildPartial();
        } else {
          resource_ = value;
        }
        onChanged();
      } else {
        if (resourceCase_ == 3) {
          monitoredResourceBuilder_.mergeFrom(value);
        }
        monitoredResourceBuilder_.setMessage(value);
      }
      resourceCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * The monitored resource associated with the configuration.
     * </pre>
     *
     * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
     */
    public Builder clearMonitoredResource() {
      if (monitoredResourceBuilder_ == null) {
        if (resourceCase_ == 3) {
          resourceCase_ = 0;
          resource_ = null;
          onChanged();
        }
      } else {
        if (resourceCase_ == 3) {
          resourceCase_ = 0;
          resource_ = null;
        }
        monitoredResourceBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The monitored resource associated with the configuration.
     * </pre>
     *
     * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
     */
    public com.google.api.MonitoredResource.Builder getMonitoredResourceBuilder() {
      return getMonitoredResourceFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The monitored resource associated with the configuration.
     * </pre>
     *
     * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
     */
    public com.google.api.MonitoredResourceOrBuilder getMonitoredResourceOrBuilder() {
      if ((resourceCase_ == 3) && (monitoredResourceBuilder_ != null)) {
        return monitoredResourceBuilder_.getMessageOrBuilder();
      } else {
        if (resourceCase_ == 3) {
          return (com.google.api.MonitoredResource) resource_;
        }
        return com.google.api.MonitoredResource.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The monitored resource associated with the configuration.
     * </pre>
     *
     * <code>.google.api.MonitoredResource monitored_resource = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.api.MonitoredResource, com.google.api.MonitoredResource.Builder, com.google.api.MonitoredResourceOrBuilder> 
        getMonitoredResourceFieldBuilder() {
      if (monitoredResourceBuilder_ == null) {
        if (!(resourceCase_ == 3)) {
          resource_ = com.google.api.MonitoredResource.getDefaultInstance();
        }
        monitoredResourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.api.MonitoredResource, com.google.api.MonitoredResource.Builder, com.google.api.MonitoredResourceOrBuilder>(
                (com.google.api.MonitoredResource) resource_,
                getParentForChildren(),
                isClean());
        resource_ = null;
      }
      resourceCase_ = 3;
      onChanged();;
      return monitoredResourceBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup, com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.Builder, com.google.monitoring.v3.UptimeCheckConfig.ResourceGroupOrBuilder> resourceGroupBuilder_;
    /**
     * <pre>
     * The group resource associated with the configuration.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
     */
    public boolean hasResourceGroup() {
      return resourceCase_ == 4;
    }
    /**
     * <pre>
     * The group resource associated with the configuration.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup getResourceGroup() {
      if (resourceGroupBuilder_ == null) {
        if (resourceCase_ == 4) {
          return (com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_;
        }
        return com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.getDefaultInstance();
      } else {
        if (resourceCase_ == 4) {
          return resourceGroupBuilder_.getMessage();
        }
        return com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The group resource associated with the configuration.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
     */
    public Builder setResourceGroup(com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup value) {
      if (resourceGroupBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        resource_ = value;
        onChanged();
      } else {
        resourceGroupBuilder_.setMessage(value);
      }
      resourceCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * The group resource associated with the configuration.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
     */
    public Builder setResourceGroup(
        com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.Builder builderForValue) {
      if (resourceGroupBuilder_ == null) {
        resource_ = builderForValue.build();
        onChanged();
      } else {
        resourceGroupBuilder_.setMessage(builderForValue.build());
      }
      resourceCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * The group resource associated with the configuration.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
     */
    public Builder mergeResourceGroup(com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup value) {
      if (resourceGroupBuilder_ == null) {
        if (resourceCase_ == 4 &&
            resource_ != com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.getDefaultInstance()) {
          resource_ = com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.newBuilder((com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_)
              .mergeFrom(value).buildPartial();
        } else {
          resource_ = value;
        }
        onChanged();
      } else {
        if (resourceCase_ == 4) {
          resourceGroupBuilder_.mergeFrom(value);
        }
        resourceGroupBuilder_.setMessage(value);
      }
      resourceCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * The group resource associated with the configuration.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
     */
    public Builder clearResourceGroup() {
      if (resourceGroupBuilder_ == null) {
        if (resourceCase_ == 4) {
          resourceCase_ = 0;
          resource_ = null;
          onChanged();
        }
      } else {
        if (resourceCase_ == 4) {
          resourceCase_ = 0;
          resource_ = null;
        }
        resourceGroupBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The group resource associated with the configuration.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.Builder getResourceGroupBuilder() {
      return getResourceGroupFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The group resource associated with the configuration.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.ResourceGroupOrBuilder getResourceGroupOrBuilder() {
      if ((resourceCase_ == 4) && (resourceGroupBuilder_ != null)) {
        return resourceGroupBuilder_.getMessageOrBuilder();
      } else {
        if (resourceCase_ == 4) {
          return (com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_;
        }
        return com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The group resource associated with the configuration.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.ResourceGroup resource_group = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup, com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.Builder, com.google.monitoring.v3.UptimeCheckConfig.ResourceGroupOrBuilder> 
        getResourceGroupFieldBuilder() {
      if (resourceGroupBuilder_ == null) {
        if (!(resourceCase_ == 4)) {
          resource_ = com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.getDefaultInstance();
        }
        resourceGroupBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup, com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup.Builder, com.google.monitoring.v3.UptimeCheckConfig.ResourceGroupOrBuilder>(
                (com.google.monitoring.v3.UptimeCheckConfig.ResourceGroup) resource_,
                getParentForChildren(),
                isClean());
        resource_ = null;
      }
      resourceCase_ = 4;
      onChanged();;
      return resourceGroupBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.HttpCheck, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.Builder, com.google.monitoring.v3.UptimeCheckConfig.HttpCheckOrBuilder> httpCheckBuilder_;
    /**
     * <pre>
     * Contains information needed to make an HTTP or HTTPS check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
     */
    public boolean hasHttpCheck() {
      return checkRequestTypeCase_ == 5;
    }
    /**
     * <pre>
     * Contains information needed to make an HTTP or HTTPS check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck getHttpCheck() {
      if (httpCheckBuilder_ == null) {
        if (checkRequestTypeCase_ == 5) {
          return (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_;
        }
        return com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.getDefaultInstance();
      } else {
        if (checkRequestTypeCase_ == 5) {
          return httpCheckBuilder_.getMessage();
        }
        return com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Contains information needed to make an HTTP or HTTPS check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
     */
    public Builder setHttpCheck(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck value) {
      if (httpCheckBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkRequestType_ = value;
        onChanged();
      } else {
        httpCheckBuilder_.setMessage(value);
      }
      checkRequestTypeCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Contains information needed to make an HTTP or HTTPS check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
     */
    public Builder setHttpCheck(
        com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.Builder builderForValue) {
      if (httpCheckBuilder_ == null) {
        checkRequestType_ = builderForValue.build();
        onChanged();
      } else {
        httpCheckBuilder_.setMessage(builderForValue.build());
      }
      checkRequestTypeCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Contains information needed to make an HTTP or HTTPS check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
     */
    public Builder mergeHttpCheck(com.google.monitoring.v3.UptimeCheckConfig.HttpCheck value) {
      if (httpCheckBuilder_ == null) {
        if (checkRequestTypeCase_ == 5 &&
            checkRequestType_ != com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.getDefaultInstance()) {
          checkRequestType_ = com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.newBuilder((com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_)
              .mergeFrom(value).buildPartial();
        } else {
          checkRequestType_ = value;
        }
        onChanged();
      } else {
        if (checkRequestTypeCase_ == 5) {
          httpCheckBuilder_.mergeFrom(value);
        }
        httpCheckBuilder_.setMessage(value);
      }
      checkRequestTypeCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Contains information needed to make an HTTP or HTTPS check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
     */
    public Builder clearHttpCheck() {
      if (httpCheckBuilder_ == null) {
        if (checkRequestTypeCase_ == 5) {
          checkRequestTypeCase_ = 0;
          checkRequestType_ = null;
          onChanged();
        }
      } else {
        if (checkRequestTypeCase_ == 5) {
          checkRequestTypeCase_ = 0;
          checkRequestType_ = null;
        }
        httpCheckBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Contains information needed to make an HTTP or HTTPS check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.Builder getHttpCheckBuilder() {
      return getHttpCheckFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Contains information needed to make an HTTP or HTTPS check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.HttpCheckOrBuilder getHttpCheckOrBuilder() {
      if ((checkRequestTypeCase_ == 5) && (httpCheckBuilder_ != null)) {
        return httpCheckBuilder_.getMessageOrBuilder();
      } else {
        if (checkRequestTypeCase_ == 5) {
          return (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_;
        }
        return com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Contains information needed to make an HTTP or HTTPS check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck http_check = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.HttpCheck, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.Builder, com.google.monitoring.v3.UptimeCheckConfig.HttpCheckOrBuilder> 
        getHttpCheckFieldBuilder() {
      if (httpCheckBuilder_ == null) {
        if (!(checkRequestTypeCase_ == 5)) {
          checkRequestType_ = com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.getDefaultInstance();
        }
        httpCheckBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.v3.UptimeCheckConfig.HttpCheck, com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.Builder, com.google.monitoring.v3.UptimeCheckConfig.HttpCheckOrBuilder>(
                (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) checkRequestType_,
                getParentForChildren(),
                isClean());
        checkRequestType_ = null;
      }
      checkRequestTypeCase_ = 5;
      onChanged();;
      return httpCheckBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.TcpCheck, com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.Builder, com.google.monitoring.v3.UptimeCheckConfig.TcpCheckOrBuilder> tcpCheckBuilder_;
    /**
     * <pre>
     * Contains information needed to make a TCP check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
     */
    public boolean hasTcpCheck() {
      return checkRequestTypeCase_ == 6;
    }
    /**
     * <pre>
     * Contains information needed to make a TCP check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.TcpCheck getTcpCheck() {
      if (tcpCheckBuilder_ == null) {
        if (checkRequestTypeCase_ == 6) {
          return (com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_;
        }
        return com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.getDefaultInstance();
      } else {
        if (checkRequestTypeCase_ == 6) {
          return tcpCheckBuilder_.getMessage();
        }
        return com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Contains information needed to make a TCP check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
     */
    public Builder setTcpCheck(com.google.monitoring.v3.UptimeCheckConfig.TcpCheck value) {
      if (tcpCheckBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkRequestType_ = value;
        onChanged();
      } else {
        tcpCheckBuilder_.setMessage(value);
      }
      checkRequestTypeCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * Contains information needed to make a TCP check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
     */
    public Builder setTcpCheck(
        com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.Builder builderForValue) {
      if (tcpCheckBuilder_ == null) {
        checkRequestType_ = builderForValue.build();
        onChanged();
      } else {
        tcpCheckBuilder_.setMessage(builderForValue.build());
      }
      checkRequestTypeCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * Contains information needed to make a TCP check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
     */
    public Builder mergeTcpCheck(com.google.monitoring.v3.UptimeCheckConfig.TcpCheck value) {
      if (tcpCheckBuilder_ == null) {
        if (checkRequestTypeCase_ == 6 &&
            checkRequestType_ != com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.getDefaultInstance()) {
          checkRequestType_ = com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.newBuilder((com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_)
              .mergeFrom(value).buildPartial();
        } else {
          checkRequestType_ = value;
        }
        onChanged();
      } else {
        if (checkRequestTypeCase_ == 6) {
          tcpCheckBuilder_.mergeFrom(value);
        }
        tcpCheckBuilder_.setMessage(value);
      }
      checkRequestTypeCase_ = 6;
      return this;
    }
    /**
     * <pre>
     * Contains information needed to make a TCP check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
     */
    public Builder clearTcpCheck() {
      if (tcpCheckBuilder_ == null) {
        if (checkRequestTypeCase_ == 6) {
          checkRequestTypeCase_ = 0;
          checkRequestType_ = null;
          onChanged();
        }
      } else {
        if (checkRequestTypeCase_ == 6) {
          checkRequestTypeCase_ = 0;
          checkRequestType_ = null;
        }
        tcpCheckBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Contains information needed to make a TCP check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.Builder getTcpCheckBuilder() {
      return getTcpCheckFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Contains information needed to make a TCP check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.TcpCheckOrBuilder getTcpCheckOrBuilder() {
      if ((checkRequestTypeCase_ == 6) && (tcpCheckBuilder_ != null)) {
        return tcpCheckBuilder_.getMessageOrBuilder();
      } else {
        if (checkRequestTypeCase_ == 6) {
          return (com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_;
        }
        return com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Contains information needed to make a TCP check.
     * </pre>
     *
     * <code>.google.monitoring.v3.UptimeCheckConfig.TcpCheck tcp_check = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.TcpCheck, com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.Builder, com.google.monitoring.v3.UptimeCheckConfig.TcpCheckOrBuilder> 
        getTcpCheckFieldBuilder() {
      if (tcpCheckBuilder_ == null) {
        if (!(checkRequestTypeCase_ == 6)) {
          checkRequestType_ = com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.getDefaultInstance();
        }
        tcpCheckBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.v3.UptimeCheckConfig.TcpCheck, com.google.monitoring.v3.UptimeCheckConfig.TcpCheck.Builder, com.google.monitoring.v3.UptimeCheckConfig.TcpCheckOrBuilder>(
                (com.google.monitoring.v3.UptimeCheckConfig.TcpCheck) checkRequestType_,
                getParentForChildren(),
                isClean());
        checkRequestType_ = null;
      }
      checkRequestTypeCase_ = 6;
      onChanged();;
      return tcpCheckBuilder_;
    }

    private com.google.protobuf.Duration period_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> periodBuilder_;
    /**
     * <pre>
     * How often the uptime check is performed.
     * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration period = 7;</code>
     */
    public boolean hasPeriod() {
      return periodBuilder_ != null || period_ != null;
    }
    /**
     * <pre>
     * How often the uptime check is performed.
     * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration period = 7;</code>
     */
    public com.google.protobuf.Duration getPeriod() {
      if (periodBuilder_ == null) {
        return period_ == null ? com.google.protobuf.Duration.getDefaultInstance() : period_;
      } else {
        return periodBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * How often the uptime check is performed.
     * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration period = 7;</code>
     */
    public Builder setPeriod(com.google.protobuf.Duration value) {
      if (periodBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        period_ = value;
        onChanged();
      } else {
        periodBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * How often the uptime check is performed.
     * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration period = 7;</code>
     */
    public Builder setPeriod(
        com.google.protobuf.Duration.Builder builderForValue) {
      if (periodBuilder_ == null) {
        period_ = builderForValue.build();
        onChanged();
      } else {
        periodBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * How often the uptime check is performed.
     * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration period = 7;</code>
     */
    public Builder mergePeriod(com.google.protobuf.Duration value) {
      if (periodBuilder_ == null) {
        if (period_ != null) {
          period_ =
            com.google.protobuf.Duration.newBuilder(period_).mergeFrom(value).buildPartial();
        } else {
          period_ = value;
        }
        onChanged();
      } else {
        periodBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * How often the uptime check is performed.
     * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration period = 7;</code>
     */
    public Builder clearPeriod() {
      if (periodBuilder_ == null) {
        period_ = null;
        onChanged();
      } else {
        period_ = null;
        periodBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * How often the uptime check is performed.
     * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration period = 7;</code>
     */
    public com.google.protobuf.Duration.Builder getPeriodBuilder() {
      
      onChanged();
      return getPeriodFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * How often the uptime check is performed.
     * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration period = 7;</code>
     */
    public com.google.protobuf.DurationOrBuilder getPeriodOrBuilder() {
      if (periodBuilder_ != null) {
        return periodBuilder_.getMessageOrBuilder();
      } else {
        return period_ == null ?
            com.google.protobuf.Duration.getDefaultInstance() : period_;
      }
    }
    /**
     * <pre>
     * How often the uptime check is performed.
     * Currently, only 1, 5, 10, and 15 minutes are supported. Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration period = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> 
        getPeriodFieldBuilder() {
      if (periodBuilder_ == null) {
        periodBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
                getPeriod(),
                getParentForChildren(),
                isClean());
        period_ = null;
      }
      return periodBuilder_;
    }

    private com.google.protobuf.Duration timeout_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> timeoutBuilder_;
    /**
     * <pre>
     * The maximum amount of time to wait for the request to complete (must be
     * between 1 and 60 seconds). Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration timeout = 8;</code>
     */
    public boolean hasTimeout() {
      return timeoutBuilder_ != null || timeout_ != null;
    }
    /**
     * <pre>
     * The maximum amount of time to wait for the request to complete (must be
     * between 1 and 60 seconds). Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration timeout = 8;</code>
     */
    public com.google.protobuf.Duration getTimeout() {
      if (timeoutBuilder_ == null) {
        return timeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timeout_;
      } else {
        return timeoutBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The maximum amount of time to wait for the request to complete (must be
     * between 1 and 60 seconds). Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration timeout = 8;</code>
     */
    public Builder setTimeout(com.google.protobuf.Duration value) {
      if (timeoutBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        timeout_ = value;
        onChanged();
      } else {
        timeoutBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * The maximum amount of time to wait for the request to complete (must be
     * between 1 and 60 seconds). Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration timeout = 8;</code>
     */
    public Builder setTimeout(
        com.google.protobuf.Duration.Builder builderForValue) {
      if (timeoutBuilder_ == null) {
        timeout_ = builderForValue.build();
        onChanged();
      } else {
        timeoutBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * The maximum amount of time to wait for the request to complete (must be
     * between 1 and 60 seconds). Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration timeout = 8;</code>
     */
    public Builder mergeTimeout(com.google.protobuf.Duration value) {
      if (timeoutBuilder_ == null) {
        if (timeout_ != null) {
          timeout_ =
            com.google.protobuf.Duration.newBuilder(timeout_).mergeFrom(value).buildPartial();
        } else {
          timeout_ = value;
        }
        onChanged();
      } else {
        timeoutBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * The maximum amount of time to wait for the request to complete (must be
     * between 1 and 60 seconds). Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration timeout = 8;</code>
     */
    public Builder clearTimeout() {
      if (timeoutBuilder_ == null) {
        timeout_ = null;
        onChanged();
      } else {
        timeout_ = null;
        timeoutBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * The maximum amount of time to wait for the request to complete (must be
     * between 1 and 60 seconds). Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration timeout = 8;</code>
     */
    public com.google.protobuf.Duration.Builder getTimeoutBuilder() {
      
      onChanged();
      return getTimeoutFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The maximum amount of time to wait for the request to complete (must be
     * between 1 and 60 seconds). Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration timeout = 8;</code>
     */
    public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder() {
      if (timeoutBuilder_ != null) {
        return timeoutBuilder_.getMessageOrBuilder();
      } else {
        return timeout_ == null ?
            com.google.protobuf.Duration.getDefaultInstance() : timeout_;
      }
    }
    /**
     * <pre>
     * The maximum amount of time to wait for the request to complete (must be
     * between 1 and 60 seconds). Required.
     * </pre>
     *
     * <code>.google.protobuf.Duration timeout = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> 
        getTimeoutFieldBuilder() {
      if (timeoutBuilder_ == null) {
        timeoutBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
                getTimeout(),
                getParentForChildren(),
                isClean());
        timeout_ = null;
      }
      return timeoutBuilder_;
    }

    private java.util.List<com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher> contentMatchers_ =
      java.util.Collections.emptyList();
    private void ensureContentMatchersIsMutable() {
      if (!((bitField0_ & 0x00000100) == 0x00000100)) {
        contentMatchers_ = new java.util.ArrayList<com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher>(contentMatchers_);
        bitField0_ |= 0x00000100;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcherOrBuilder> contentMatchersBuilder_;

    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public java.util.List<com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher> getContentMatchersList() {
      if (contentMatchersBuilder_ == null) {
        return java.util.Collections.unmodifiableList(contentMatchers_);
      } else {
        return contentMatchersBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public int getContentMatchersCount() {
      if (contentMatchersBuilder_ == null) {
        return contentMatchers_.size();
      } else {
        return contentMatchersBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher getContentMatchers(int index) {
      if (contentMatchersBuilder_ == null) {
        return contentMatchers_.get(index);
      } else {
        return contentMatchersBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public Builder setContentMatchers(
        int index, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher value) {
      if (contentMatchersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureContentMatchersIsMutable();
        contentMatchers_.set(index, value);
        onChanged();
      } else {
        contentMatchersBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public Builder setContentMatchers(
        int index, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder builderForValue) {
      if (contentMatchersBuilder_ == null) {
        ensureContentMatchersIsMutable();
        contentMatchers_.set(index, builderForValue.build());
        onChanged();
      } else {
        contentMatchersBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public Builder addContentMatchers(com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher value) {
      if (contentMatchersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureContentMatchersIsMutable();
        contentMatchers_.add(value);
        onChanged();
      } else {
        contentMatchersBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public Builder addContentMatchers(
        int index, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher value) {
      if (contentMatchersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureContentMatchersIsMutable();
        contentMatchers_.add(index, value);
        onChanged();
      } else {
        contentMatchersBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public Builder addContentMatchers(
        com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder builderForValue) {
      if (contentMatchersBuilder_ == null) {
        ensureContentMatchersIsMutable();
        contentMatchers_.add(builderForValue.build());
        onChanged();
      } else {
        contentMatchersBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public Builder addContentMatchers(
        int index, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder builderForValue) {
      if (contentMatchersBuilder_ == null) {
        ensureContentMatchersIsMutable();
        contentMatchers_.add(index, builderForValue.build());
        onChanged();
      } else {
        contentMatchersBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public Builder addAllContentMatchers(
        java.lang.Iterable<? extends com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher> values) {
      if (contentMatchersBuilder_ == null) {
        ensureContentMatchersIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, contentMatchers_);
        onChanged();
      } else {
        contentMatchersBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public Builder clearContentMatchers() {
      if (contentMatchersBuilder_ == null) {
        contentMatchers_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000100);
        onChanged();
      } else {
        contentMatchersBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public Builder removeContentMatchers(int index) {
      if (contentMatchersBuilder_ == null) {
        ensureContentMatchersIsMutable();
        contentMatchers_.remove(index);
        onChanged();
      } else {
        contentMatchersBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder getContentMatchersBuilder(
        int index) {
      return getContentMatchersFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcherOrBuilder getContentMatchersOrBuilder(
        int index) {
      if (contentMatchersBuilder_ == null) {
        return contentMatchers_.get(index);  } else {
        return contentMatchersBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public java.util.List<? extends com.google.monitoring.v3.UptimeCheckConfig.ContentMatcherOrBuilder> 
         getContentMatchersOrBuilderList() {
      if (contentMatchersBuilder_ != null) {
        return contentMatchersBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(contentMatchers_);
      }
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder addContentMatchersBuilder() {
      return getContentMatchersFieldBuilder().addBuilder(
          com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.getDefaultInstance());
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder addContentMatchersBuilder(
        int index) {
      return getContentMatchersFieldBuilder().addBuilder(
          index, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.getDefaultInstance());
    }
    /**
     * <pre>
     * The expected content on the page the check is run against.
     * Currently, only the first entry in the list is supported, and other entries
     * will be ignored. The server will look for an exact match of the string in
     * the page response's content. This field is optional and should only be
     * specified if a content match is required.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.ContentMatcher content_matchers = 9;</code>
     */
    public java.util.List<com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder> 
         getContentMatchersBuilderList() {
      return getContentMatchersFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcherOrBuilder> 
        getContentMatchersFieldBuilder() {
      if (contentMatchersBuilder_ == null) {
        contentMatchersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcher.Builder, com.google.monitoring.v3.UptimeCheckConfig.ContentMatcherOrBuilder>(
                contentMatchers_,
                ((bitField0_ & 0x00000100) == 0x00000100),
                getParentForChildren(),
                isClean());
        contentMatchers_ = null;
      }
      return contentMatchersBuilder_;
    }

    private java.util.List<java.lang.Integer> selectedRegions_ =
      java.util.Collections.emptyList();
    private void ensureSelectedRegionsIsMutable() {
      if (!((bitField0_ & 0x00000200) == 0x00000200)) {
        selectedRegions_ = new java.util.ArrayList<java.lang.Integer>(selectedRegions_);
        bitField0_ |= 0x00000200;
      }
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public java.util.List<com.google.monitoring.v3.UptimeCheckRegion> getSelectedRegionsList() {
      return new com.google.protobuf.Internal.ListAdapter<
          java.lang.Integer, com.google.monitoring.v3.UptimeCheckRegion>(selectedRegions_, selectedRegions_converter_);
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public int getSelectedRegionsCount() {
      return selectedRegions_.size();
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public com.google.monitoring.v3.UptimeCheckRegion getSelectedRegions(int index) {
      return selectedRegions_converter_.convert(selectedRegions_.get(index));
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public Builder setSelectedRegions(
        int index, com.google.monitoring.v3.UptimeCheckRegion value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureSelectedRegionsIsMutable();
      selectedRegions_.set(index, value.getNumber());
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public Builder addSelectedRegions(com.google.monitoring.v3.UptimeCheckRegion value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureSelectedRegionsIsMutable();
      selectedRegions_.add(value.getNumber());
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public Builder addAllSelectedRegions(
        java.lang.Iterable<? extends com.google.monitoring.v3.UptimeCheckRegion> values) {
      ensureSelectedRegionsIsMutable();
      for (com.google.monitoring.v3.UptimeCheckRegion value : values) {
        selectedRegions_.add(value.getNumber());
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public Builder clearSelectedRegions() {
      selectedRegions_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000200);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public java.util.List<java.lang.Integer>
    getSelectedRegionsValueList() {
      return java.util.Collections.unmodifiableList(selectedRegions_);
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public int getSelectedRegionsValue(int index) {
      return selectedRegions_.get(index);
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public Builder setSelectedRegionsValue(
        int index, int value) {
      ensureSelectedRegionsIsMutable();
      selectedRegions_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public Builder addSelectedRegionsValue(int value) {
      ensureSelectedRegionsIsMutable();
      selectedRegions_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The list of regions from which the check will be run.
     * If this field is specified, enough regions to include a minimum of
     * 3 locations must be provided, or an error message is returned.
     * Not specifying this field will result in uptime checks running from all
     * regions.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckRegion selected_regions = 10;</code>
     */
    public Builder addAllSelectedRegionsValue(
        java.lang.Iterable<java.lang.Integer> values) {
      ensureSelectedRegionsIsMutable();
      for (int value : values) {
        selectedRegions_.add(value);
      }
      onChanged();
      return this;
    }

    private java.util.List<com.google.monitoring.v3.UptimeCheckConfig.InternalChecker> internalCheckers_ =
      java.util.Collections.emptyList();
    private void ensureInternalCheckersIsMutable() {
      if (!((bitField0_ & 0x00000400) == 0x00000400)) {
        internalCheckers_ = new java.util.ArrayList<com.google.monitoring.v3.UptimeCheckConfig.InternalChecker>(internalCheckers_);
        bitField0_ |= 0x00000400;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.InternalChecker, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder, com.google.monitoring.v3.UptimeCheckConfig.InternalCheckerOrBuilder> internalCheckersBuilder_;

    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public java.util.List<com.google.monitoring.v3.UptimeCheckConfig.InternalChecker> getInternalCheckersList() {
      if (internalCheckersBuilder_ == null) {
        return java.util.Collections.unmodifiableList(internalCheckers_);
      } else {
        return internalCheckersBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public int getInternalCheckersCount() {
      if (internalCheckersBuilder_ == null) {
        return internalCheckers_.size();
      } else {
        return internalCheckersBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.InternalChecker getInternalCheckers(int index) {
      if (internalCheckersBuilder_ == null) {
        return internalCheckers_.get(index);
      } else {
        return internalCheckersBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public Builder setInternalCheckers(
        int index, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker value) {
      if (internalCheckersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInternalCheckersIsMutable();
        internalCheckers_.set(index, value);
        onChanged();
      } else {
        internalCheckersBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public Builder setInternalCheckers(
        int index, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder builderForValue) {
      if (internalCheckersBuilder_ == null) {
        ensureInternalCheckersIsMutable();
        internalCheckers_.set(index, builderForValue.build());
        onChanged();
      } else {
        internalCheckersBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public Builder addInternalCheckers(com.google.monitoring.v3.UptimeCheckConfig.InternalChecker value) {
      if (internalCheckersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInternalCheckersIsMutable();
        internalCheckers_.add(value);
        onChanged();
      } else {
        internalCheckersBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public Builder addInternalCheckers(
        int index, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker value) {
      if (internalCheckersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInternalCheckersIsMutable();
        internalCheckers_.add(index, value);
        onChanged();
      } else {
        internalCheckersBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public Builder addInternalCheckers(
        com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder builderForValue) {
      if (internalCheckersBuilder_ == null) {
        ensureInternalCheckersIsMutable();
        internalCheckers_.add(builderForValue.build());
        onChanged();
      } else {
        internalCheckersBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public Builder addInternalCheckers(
        int index, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder builderForValue) {
      if (internalCheckersBuilder_ == null) {
        ensureInternalCheckersIsMutable();
        internalCheckers_.add(index, builderForValue.build());
        onChanged();
      } else {
        internalCheckersBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public Builder addAllInternalCheckers(
        java.lang.Iterable<? extends com.google.monitoring.v3.UptimeCheckConfig.InternalChecker> values) {
      if (internalCheckersBuilder_ == null) {
        ensureInternalCheckersIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, internalCheckers_);
        onChanged();
      } else {
        internalCheckersBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public Builder clearInternalCheckers() {
      if (internalCheckersBuilder_ == null) {
        internalCheckers_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000400);
        onChanged();
      } else {
        internalCheckersBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public Builder removeInternalCheckers(int index) {
      if (internalCheckersBuilder_ == null) {
        ensureInternalCheckersIsMutable();
        internalCheckers_.remove(index);
        onChanged();
      } else {
        internalCheckersBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder getInternalCheckersBuilder(
        int index) {
      return getInternalCheckersFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.InternalCheckerOrBuilder getInternalCheckersOrBuilder(
        int index) {
      if (internalCheckersBuilder_ == null) {
        return internalCheckers_.get(index);  } else {
        return internalCheckersBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public java.util.List<? extends com.google.monitoring.v3.UptimeCheckConfig.InternalCheckerOrBuilder> 
         getInternalCheckersOrBuilderList() {
      if (internalCheckersBuilder_ != null) {
        return internalCheckersBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(internalCheckers_);
      }
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder addInternalCheckersBuilder() {
      return getInternalCheckersFieldBuilder().addBuilder(
          com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.getDefaultInstance());
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder addInternalCheckersBuilder(
        int index) {
      return getInternalCheckersFieldBuilder().addBuilder(
          index, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.getDefaultInstance());
    }
    /**
     * <pre>
     * The internal checkers that this check will egress from.
     * </pre>
     *
     * <code>repeated .google.monitoring.v3.UptimeCheckConfig.InternalChecker internal_checkers = 14;</code>
     */
    public java.util.List<com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder> 
         getInternalCheckersBuilderList() {
      return getInternalCheckersFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.monitoring.v3.UptimeCheckConfig.InternalChecker, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder, com.google.monitoring.v3.UptimeCheckConfig.InternalCheckerOrBuilder> 
        getInternalCheckersFieldBuilder() {
      if (internalCheckersBuilder_ == null) {
        internalCheckersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.monitoring.v3.UptimeCheckConfig.InternalChecker, com.google.monitoring.v3.UptimeCheckConfig.InternalChecker.Builder, com.google.monitoring.v3.UptimeCheckConfig.InternalCheckerOrBuilder>(
                internalCheckers_,
                ((bitField0_ & 0x00000400) == 0x00000400),
                getParentForChildren(),
                isClean());
        internalCheckers_ = null;
      }
      return internalCheckersBuilder_;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.monitoring.v3.UptimeCheckConfig)
  }

  // @@protoc_insertion_point(class_scope:google.monitoring.v3.UptimeCheckConfig)
  private static final com.google.monitoring.v3.UptimeCheckConfig DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.monitoring.v3.UptimeCheckConfig();
  }

  public static com.google.monitoring.v3.UptimeCheckConfig getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<UptimeCheckConfig>
      PARSER = new com.google.protobuf.AbstractParser<UptimeCheckConfig>() {
    public UptimeCheckConfig parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new UptimeCheckConfig(input, extensionRegistry);
    }
  };

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

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

  public com.google.monitoring.v3.UptimeCheckConfig getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

