/*
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/compute/v1/compute.proto

package com.google.cloud.compute.v1;

/**
 *
 *
 * <pre>
 * </pre>
 *
 * Protobuf type {@code
 * google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse}
 */
public final class RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
    extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse)
    RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.newBuilder() to construct.
  private RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse(
      com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse() {
    firewallPolicys_ = java.util.Collections.emptyList();
    firewalls_ = java.util.Collections.emptyList();
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.compute.v1.Compute
        .internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.compute.v1.Compute
        .internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
                .class,
            com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
                .Builder.class);
  }

  public static final int FIREWALL_POLICYS_FIELD_NUMBER = 410985794;

  @SuppressWarnings("serial")
  private java.util.List<
          com.google.cloud.compute.v1
              .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy>
      firewallPolicys_;
  /**
   *
   *
   * <pre>
   * Effective firewalls from firewall policy.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
   * </code>
   */
  @java.lang.Override
  public java.util.List<
          com.google.cloud.compute.v1
              .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy>
      getFirewallPolicysList() {
    return firewallPolicys_;
  }
  /**
   *
   *
   * <pre>
   * Effective firewalls from firewall policy.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
   * </code>
   */
  @java.lang.Override
  public java.util.List<
          ? extends
              com.google.cloud.compute.v1
                  .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicyOrBuilder>
      getFirewallPolicysOrBuilderList() {
    return firewallPolicys_;
  }
  /**
   *
   *
   * <pre>
   * Effective firewalls from firewall policy.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
   * </code>
   */
  @java.lang.Override
  public int getFirewallPolicysCount() {
    return firewallPolicys_.size();
  }
  /**
   *
   *
   * <pre>
   * Effective firewalls from firewall policy.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
      getFirewallPolicys(int index) {
    return firewallPolicys_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Effective firewalls from firewall policy.
   * </pre>
   *
   * <code>
   * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicyOrBuilder
      getFirewallPolicysOrBuilder(int index) {
    return firewallPolicys_.get(index);
  }

  public static final int FIREWALLS_FIELD_NUMBER = 272245619;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.compute.v1.Firewall> firewalls_;
  /**
   *
   *
   * <pre>
   * Effective firewalls on the network.
   * </pre>
   *
   * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.compute.v1.Firewall> getFirewallsList() {
    return firewalls_;
  }
  /**
   *
   *
   * <pre>
   * Effective firewalls on the network.
   * </pre>
   *
   * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.cloud.compute.v1.FirewallOrBuilder>
      getFirewallsOrBuilderList() {
    return firewalls_;
  }
  /**
   *
   *
   * <pre>
   * Effective firewalls on the network.
   * </pre>
   *
   * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
   */
  @java.lang.Override
  public int getFirewallsCount() {
    return firewalls_.size();
  }
  /**
   *
   *
   * <pre>
   * Effective firewalls on the network.
   * </pre>
   *
   * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
   */
  @java.lang.Override
  public com.google.cloud.compute.v1.Firewall getFirewalls(int index) {
    return firewalls_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Effective firewalls on the network.
   * </pre>
   *
   * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
   */
  @java.lang.Override
  public com.google.cloud.compute.v1.FirewallOrBuilder getFirewallsOrBuilder(int index) {
    return firewalls_.get(index);
  }

  private byte memoizedIsInitialized = -1;

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    for (int i = 0; i < firewalls_.size(); i++) {
      output.writeMessage(272245619, firewalls_.get(i));
    }
    for (int i = 0; i < firewallPolicys_.size(); i++) {
      output.writeMessage(410985794, firewallPolicys_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    for (int i = 0; i < firewalls_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(272245619, firewalls_.get(i));
    }
    for (int i = 0; i < firewallPolicys_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              410985794, firewallPolicys_.get(i));
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj
        instanceof
        com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse)) {
      return super.equals(obj);
    }
    com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse other =
        (com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse)
            obj;

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

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getFirewallPolicysCount() > 0) {
      hash = (37 * hash) + FIREWALL_POLICYS_FIELD_NUMBER;
      hash = (53 * hash) + getFirewallPolicysList().hashCode();
    }
    if (getFirewallsCount() > 0) {
      hash = (37 * hash) + FIREWALLS_FIELD_NUMBER;
      hash = (53 * hash) + getFirewallsList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      parseFrom(java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      parseFrom(
          java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      parseFrom(com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      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.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      parseFrom(java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      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.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      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.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(
      com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
          prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * </pre>
   *
   * Protobuf type {@code
   * google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse)
      com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.compute.v1.Compute
          .internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.compute.v1.Compute
          .internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
                  .class,
              com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
                  .Builder.class);
    }

    // Construct using
    // com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (firewallPolicysBuilder_ == null) {
        firewallPolicys_ = java.util.Collections.emptyList();
      } else {
        firewallPolicys_ = null;
        firewallPolicysBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      if (firewallsBuilder_ == null) {
        firewalls_ = java.util.Collections.emptyList();
      } else {
        firewalls_ = null;
        firewallsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000002);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.compute.v1.Compute
          .internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
        getDefaultInstanceForType() {
      return com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
          .getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
        build() {
      com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
          result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
        buildPartial() {
      com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
          result =
              new com.google.cloud.compute.v1
                  .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(
        com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
            result) {
      if (firewallPolicysBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          firewallPolicys_ = java.util.Collections.unmodifiableList(firewallPolicys_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.firewallPolicys_ = firewallPolicys_;
      } else {
        result.firewallPolicys_ = firewallPolicysBuilder_.build();
      }
      if (firewallsBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)) {
          firewalls_ = java.util.Collections.unmodifiableList(firewalls_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.firewalls_ = firewalls_;
      } else {
        result.firewalls_ = firewallsBuilder_.build();
      }
    }

    private void buildPartial0(
        com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
            result) {
      int from_bitField0_ = bitField0_;
    }

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

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other
          instanceof
          com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) {
        return mergeFrom(
            (com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse)
                other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(
        com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
            other) {
      if (other
          == com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
              .getDefaultInstance()) return this;
      if (firewallPolicysBuilder_ == null) {
        if (!other.firewallPolicys_.isEmpty()) {
          if (firewallPolicys_.isEmpty()) {
            firewallPolicys_ = other.firewallPolicys_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureFirewallPolicysIsMutable();
            firewallPolicys_.addAll(other.firewallPolicys_);
          }
          onChanged();
        }
      } else {
        if (!other.firewallPolicys_.isEmpty()) {
          if (firewallPolicysBuilder_.isEmpty()) {
            firewallPolicysBuilder_.dispose();
            firewallPolicysBuilder_ = null;
            firewallPolicys_ = other.firewallPolicys_;
            bitField0_ = (bitField0_ & ~0x00000001);
            firewallPolicysBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getFirewallPolicysFieldBuilder()
                    : null;
          } else {
            firewallPolicysBuilder_.addAllMessages(other.firewallPolicys_);
          }
        }
      }
      if (firewallsBuilder_ == null) {
        if (!other.firewalls_.isEmpty()) {
          if (firewalls_.isEmpty()) {
            firewalls_ = other.firewalls_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureFirewallsIsMutable();
            firewalls_.addAll(other.firewalls_);
          }
          onChanged();
        }
      } else {
        if (!other.firewalls_.isEmpty()) {
          if (firewallsBuilder_.isEmpty()) {
            firewallsBuilder_.dispose();
            firewallsBuilder_ = null;
            firewalls_ = other.firewalls_;
            bitField0_ = (bitField0_ & ~0x00000002);
            firewallsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getFirewallsFieldBuilder()
                    : null;
          } else {
            firewallsBuilder_.addAllMessages(other.firewalls_);
          }
        }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

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

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case -2117002342:
              {
                com.google.cloud.compute.v1.Firewall m =
                    input.readMessage(
                        com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry);
                if (firewallsBuilder_ == null) {
                  ensureFirewallsIsMutable();
                  firewalls_.add(m);
                } else {
                  firewallsBuilder_.addMessage(m);
                }
                break;
              } // case -2117002342
            case -1007080942:
              {
                com.google.cloud.compute.v1
                        .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                    m =
                        input.readMessage(
                            com.google.cloud.compute.v1
                                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                                .parser(),
                            extensionRegistry);
                if (firewallPolicysBuilder_ == null) {
                  ensureFirewallPolicysIsMutable();
                  firewallPolicys_.add(m);
                } else {
                  firewallPolicysBuilder_.addMessage(m);
                }
                break;
              } // case -1007080942
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.util.List<
            com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy>
        firewallPolicys_ = java.util.Collections.emptyList();

    private void ensureFirewallPolicysIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        firewallPolicys_ =
            new java.util.ArrayList<
                com.google.cloud.compute.v1
                    .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy>(
                firewallPolicys_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy,
            com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                .Builder,
            com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicyOrBuilder>
        firewallPolicysBuilder_;

    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public java.util.List<
            com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy>
        getFirewallPolicysList() {
      if (firewallPolicysBuilder_ == null) {
        return java.util.Collections.unmodifiableList(firewallPolicys_);
      } else {
        return firewallPolicysBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public int getFirewallPolicysCount() {
      if (firewallPolicysBuilder_ == null) {
        return firewallPolicys_.size();
      } else {
        return firewallPolicysBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public com.google.cloud.compute.v1
            .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
        getFirewallPolicys(int index) {
      if (firewallPolicysBuilder_ == null) {
        return firewallPolicys_.get(index);
      } else {
        return firewallPolicysBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public Builder setFirewallPolicys(
        int index,
        com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
            value) {
      if (firewallPolicysBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureFirewallPolicysIsMutable();
        firewallPolicys_.set(index, value);
        onChanged();
      } else {
        firewallPolicysBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public Builder setFirewallPolicys(
        int index,
        com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                .Builder
            builderForValue) {
      if (firewallPolicysBuilder_ == null) {
        ensureFirewallPolicysIsMutable();
        firewallPolicys_.set(index, builderForValue.build());
        onChanged();
      } else {
        firewallPolicysBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public Builder addFirewallPolicys(
        com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
            value) {
      if (firewallPolicysBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureFirewallPolicysIsMutable();
        firewallPolicys_.add(value);
        onChanged();
      } else {
        firewallPolicysBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public Builder addFirewallPolicys(
        int index,
        com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
            value) {
      if (firewallPolicysBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureFirewallPolicysIsMutable();
        firewallPolicys_.add(index, value);
        onChanged();
      } else {
        firewallPolicysBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public Builder addFirewallPolicys(
        com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                .Builder
            builderForValue) {
      if (firewallPolicysBuilder_ == null) {
        ensureFirewallPolicysIsMutable();
        firewallPolicys_.add(builderForValue.build());
        onChanged();
      } else {
        firewallPolicysBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public Builder addFirewallPolicys(
        int index,
        com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                .Builder
            builderForValue) {
      if (firewallPolicysBuilder_ == null) {
        ensureFirewallPolicysIsMutable();
        firewallPolicys_.add(index, builderForValue.build());
        onChanged();
      } else {
        firewallPolicysBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public Builder addAllFirewallPolicys(
        java.lang.Iterable<
                ? extends
                    com.google.cloud.compute.v1
                        .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy>
            values) {
      if (firewallPolicysBuilder_ == null) {
        ensureFirewallPolicysIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, firewallPolicys_);
        onChanged();
      } else {
        firewallPolicysBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public Builder clearFirewallPolicys() {
      if (firewallPolicysBuilder_ == null) {
        firewallPolicys_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        firewallPolicysBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public Builder removeFirewallPolicys(int index) {
      if (firewallPolicysBuilder_ == null) {
        ensureFirewallPolicysIsMutable();
        firewallPolicys_.remove(index);
        onChanged();
      } else {
        firewallPolicysBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public com.google.cloud.compute.v1
            .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
            .Builder
        getFirewallPolicysBuilder(int index) {
      return getFirewallPolicysFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public com.google.cloud.compute.v1
            .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicyOrBuilder
        getFirewallPolicysOrBuilder(int index) {
      if (firewallPolicysBuilder_ == null) {
        return firewallPolicys_.get(index);
      } else {
        return firewallPolicysBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public java.util.List<
            ? extends
                com.google.cloud.compute.v1
                    .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicyOrBuilder>
        getFirewallPolicysOrBuilderList() {
      if (firewallPolicysBuilder_ != null) {
        return firewallPolicysBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(firewallPolicys_);
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public com.google.cloud.compute.v1
            .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
            .Builder
        addFirewallPolicysBuilder() {
      return getFirewallPolicysFieldBuilder()
          .addBuilder(
              com.google.cloud.compute.v1
                  .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                  .getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public com.google.cloud.compute.v1
            .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
            .Builder
        addFirewallPolicysBuilder(int index) {
      return getFirewallPolicysFieldBuilder()
          .addBuilder(
              index,
              com.google.cloud.compute.v1
                  .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                  .getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls from firewall policy.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy firewall_policys = 410985794;
     * </code>
     */
    public java.util.List<
            com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                .Builder>
        getFirewallPolicysBuilderList() {
      return getFirewallPolicysFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy,
            com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                .Builder,
            com.google.cloud.compute.v1
                .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicyOrBuilder>
        getFirewallPolicysFieldBuilder() {
      if (firewallPolicysBuilder_ == null) {
        firewallPolicysBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.compute.v1
                    .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy,
                com.google.cloud.compute.v1
                    .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy
                    .Builder,
                com.google.cloud.compute.v1
                    .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicyOrBuilder>(
                firewallPolicys_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        firewallPolicys_ = null;
      }
      return firewallPolicysBuilder_;
    }

    private java.util.List<com.google.cloud.compute.v1.Firewall> firewalls_ =
        java.util.Collections.emptyList();

    private void ensureFirewallsIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        firewalls_ = new java.util.ArrayList<com.google.cloud.compute.v1.Firewall>(firewalls_);
        bitField0_ |= 0x00000002;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.compute.v1.Firewall,
            com.google.cloud.compute.v1.Firewall.Builder,
            com.google.cloud.compute.v1.FirewallOrBuilder>
        firewallsBuilder_;

    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public java.util.List<com.google.cloud.compute.v1.Firewall> getFirewallsList() {
      if (firewallsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(firewalls_);
      } else {
        return firewallsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public int getFirewallsCount() {
      if (firewallsBuilder_ == null) {
        return firewalls_.size();
      } else {
        return firewallsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public com.google.cloud.compute.v1.Firewall getFirewalls(int index) {
      if (firewallsBuilder_ == null) {
        return firewalls_.get(index);
      } else {
        return firewallsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public Builder setFirewalls(int index, com.google.cloud.compute.v1.Firewall value) {
      if (firewallsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureFirewallsIsMutable();
        firewalls_.set(index, value);
        onChanged();
      } else {
        firewallsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public Builder setFirewalls(
        int index, com.google.cloud.compute.v1.Firewall.Builder builderForValue) {
      if (firewallsBuilder_ == null) {
        ensureFirewallsIsMutable();
        firewalls_.set(index, builderForValue.build());
        onChanged();
      } else {
        firewallsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public Builder addFirewalls(com.google.cloud.compute.v1.Firewall value) {
      if (firewallsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureFirewallsIsMutable();
        firewalls_.add(value);
        onChanged();
      } else {
        firewallsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public Builder addFirewalls(int index, com.google.cloud.compute.v1.Firewall value) {
      if (firewallsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureFirewallsIsMutable();
        firewalls_.add(index, value);
        onChanged();
      } else {
        firewallsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public Builder addFirewalls(com.google.cloud.compute.v1.Firewall.Builder builderForValue) {
      if (firewallsBuilder_ == null) {
        ensureFirewallsIsMutable();
        firewalls_.add(builderForValue.build());
        onChanged();
      } else {
        firewallsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public Builder addFirewalls(
        int index, com.google.cloud.compute.v1.Firewall.Builder builderForValue) {
      if (firewallsBuilder_ == null) {
        ensureFirewallsIsMutable();
        firewalls_.add(index, builderForValue.build());
        onChanged();
      } else {
        firewallsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public Builder addAllFirewalls(
        java.lang.Iterable<? extends com.google.cloud.compute.v1.Firewall> values) {
      if (firewallsBuilder_ == null) {
        ensureFirewallsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, firewalls_);
        onChanged();
      } else {
        firewallsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public Builder clearFirewalls() {
      if (firewallsBuilder_ == null) {
        firewalls_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        firewallsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public Builder removeFirewalls(int index) {
      if (firewallsBuilder_ == null) {
        ensureFirewallsIsMutable();
        firewalls_.remove(index);
        onChanged();
      } else {
        firewallsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public com.google.cloud.compute.v1.Firewall.Builder getFirewallsBuilder(int index) {
      return getFirewallsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public com.google.cloud.compute.v1.FirewallOrBuilder getFirewallsOrBuilder(int index) {
      if (firewallsBuilder_ == null) {
        return firewalls_.get(index);
      } else {
        return firewallsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public java.util.List<? extends com.google.cloud.compute.v1.FirewallOrBuilder>
        getFirewallsOrBuilderList() {
      if (firewallsBuilder_ != null) {
        return firewallsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(firewalls_);
      }
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public com.google.cloud.compute.v1.Firewall.Builder addFirewallsBuilder() {
      return getFirewallsFieldBuilder()
          .addBuilder(com.google.cloud.compute.v1.Firewall.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public com.google.cloud.compute.v1.Firewall.Builder addFirewallsBuilder(int index) {
      return getFirewallsFieldBuilder()
          .addBuilder(index, com.google.cloud.compute.v1.Firewall.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Effective firewalls on the network.
     * </pre>
     *
     * <code>repeated .google.cloud.compute.v1.Firewall firewalls = 272245619;</code>
     */
    public java.util.List<com.google.cloud.compute.v1.Firewall.Builder> getFirewallsBuilderList() {
      return getFirewallsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.compute.v1.Firewall,
            com.google.cloud.compute.v1.Firewall.Builder,
            com.google.cloud.compute.v1.FirewallOrBuilder>
        getFirewallsFieldBuilder() {
      if (firewallsBuilder_ == null) {
        firewallsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.compute.v1.Firewall,
                com.google.cloud.compute.v1.Firewall.Builder,
                com.google.cloud.compute.v1.FirewallOrBuilder>(
                firewalls_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean());
        firewalls_ = null;
      }
      return firewallsBuilder_;
    }

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

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

    // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse)
  private static final com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE =
        new com.google.cloud.compute.v1
            .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse();
  }

  public static com.google.cloud.compute.v1
          .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse
      getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
