text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/monitoring/dashboard/v1/dashboard.proto

package com.google.monitoring.dashboard.v1;

/**
 *
 *
 *

 * A Google Stackdriver dashboard. Dashboards define the content and layout
 * of pages in the Stackdriver web application.
 *

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

  private Dashboard() {
    name_ = "";
    displayName_ = "";
    etag_ = "";
    dashboardFilters_ = java.util.Collections.emptyList();
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.monitoring.dashboard.v1.DashboardsProto
        .internal_static_google_monitoring_dashboard_v1_Dashboard_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 12:
        return internalGetLabels();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.monitoring.dashboard.v1.DashboardsProto
        .internal_static_google_monitoring_dashboard_v1_Dashboard_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.monitoring.dashboard.v1.Dashboard.class,
            com.google.monitoring.dashboard.v1.Dashboard.Builder.class);
  }

  private int layoutCase_ = 0;
  private java.lang.Object layout_;

  public enum LayoutCase
      implements
          com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    GRID_LAYOUT(5),
    MOSAIC_LAYOUT(6),
    ROW_LAYOUT(8),
    COLUMN_LAYOUT(9),
    LAYOUT_NOT_SET(0);
    private final int value;

    private LayoutCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static LayoutCase valueOf(int value) {
      return forNumber(value);
    }

    public static LayoutCase forNumber(int value) {
      switch (value) {
        case 5:
          return GRID_LAYOUT;
        case 6:
          return MOSAIC_LAYOUT;
        case 8:
          return ROW_LAYOUT;
        case 9:
          return COLUMN_LAYOUT;
        case 0:
          return LAYOUT_NOT_SET;
        default:
          return null;
      }
    }

    public int getNumber() {
      return this.value;
    }
  };

  public LayoutCase getLayoutCase() {
    return LayoutCase.forNumber(layoutCase_);
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   *
   *
   *

   * Immutable. The resource name of the dashboard.
   *

   *
   * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
   *
   * @return The name.
   */
  @java.lang.Override
  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;
    }
  }
  /**
   *
   *
   *

   * Immutable. The resource name of the dashboard.
   *

   *
   * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  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_;
  /**
   *
   *
   *

   * Required. The mutable, human-readable name.
   *

   *
   * string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The displayName.
   */
  @java.lang.Override
  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;
    }
  }
  /**
   *
   *
   *

   * Required. The mutable, human-readable name.
   *

   *
   * string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
   *
   * @return The bytes for displayName.
   */
  @java.lang.Override
  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 ETAG_FIELD_NUMBER = 4;
  private volatile java.lang.Object etag_;
  /**
   *
   *
   *

   * `etag` is used for optimistic concurrency control as a way to help
   * prevent simultaneous updates of a policy from overwriting each other.
   * An `etag` is returned in the response to `GetDashboard`, and
   * users are expected to put that etag in the request to `UpdateDashboard` to
   * ensure that their change will be applied to the same version of the
   * Dashboard configuration. The field should not be passed during
   * dashboard creation.
   *

   *
   * string etag = 4;
   *
   * @return The etag.
   */
  @java.lang.Override
  public java.lang.String getEtag() {
    java.lang.Object ref = etag_;
    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();
      etag_ = s;
      return s;
    }
  }
  /**
   *
   *
   *

   * `etag` is used for optimistic concurrency control as a way to help
   * prevent simultaneous updates of a policy from overwriting each other.
   * An `etag` is returned in the response to `GetDashboard`, and
   * users are expected to put that etag in the request to `UpdateDashboard` to
   * ensure that their change will be applied to the same version of the
   * Dashboard configuration. The field should not be passed during
   * dashboard creation.
   *

   *
   * string etag = 4;
   *
   * @return The bytes for etag.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getEtagBytes() {
    java.lang.Object ref = etag_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      etag_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int GRID_LAYOUT_FIELD_NUMBER = 5;
  /**
   *
   *
   *

   * Content is arranged with a basic layout that re-flows a simple list of
   * informational elements like widgets or tiles.
   *

   *
   * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
   *
   * @return Whether the gridLayout field is set.
   */
  @java.lang.Override
  public boolean hasGridLayout() {
    return layoutCase_ == 5;
  }
  /**
   *
   *
   *

   * Content is arranged with a basic layout that re-flows a simple list of
   * informational elements like widgets or tiles.
   *

   *
   * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
   *
   * @return The gridLayout.
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.GridLayout getGridLayout() {
    if (layoutCase_ == 5) {
      return (com.google.monitoring.dashboard.v1.GridLayout) layout_;
    }
    return com.google.monitoring.dashboard.v1.GridLayout.getDefaultInstance();
  }
  /**
   *
   *
   *

   * Content is arranged with a basic layout that re-flows a simple list of
   * informational elements like widgets or tiles.
   *

   *
   * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.GridLayoutOrBuilder getGridLayoutOrBuilder() {
    if (layoutCase_ == 5) {
      return (com.google.monitoring.dashboard.v1.GridLayout) layout_;
    }
    return com.google.monitoring.dashboard.v1.GridLayout.getDefaultInstance();
  }

  public static final int MOSAIC_LAYOUT_FIELD_NUMBER = 6;
  /**
   *
   *
   *

   * The content is arranged as a grid of tiles, with each content widget
   * occupying one or more grid blocks.
   *

   *
   * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
   *
   * @return Whether the mosaicLayout field is set.
   */
  @java.lang.Override
  public boolean hasMosaicLayout() {
    return layoutCase_ == 6;
  }
  /**
   *
   *
   *

   * The content is arranged as a grid of tiles, with each content widget
   * occupying one or more grid blocks.
   *

   *
   * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
   *
   * @return The mosaicLayout.
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.MosaicLayout getMosaicLayout() {
    if (layoutCase_ == 6) {
      return (com.google.monitoring.dashboard.v1.MosaicLayout) layout_;
    }
    return com.google.monitoring.dashboard.v1.MosaicLayout.getDefaultInstance();
  }
  /**
   *
   *
   *

   * The content is arranged as a grid of tiles, with each content widget
   * occupying one or more grid blocks.
   *

   *
   * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.MosaicLayoutOrBuilder getMosaicLayoutOrBuilder() {
    if (layoutCase_ == 6) {
      return (com.google.monitoring.dashboard.v1.MosaicLayout) layout_;
    }
    return com.google.monitoring.dashboard.v1.MosaicLayout.getDefaultInstance();
  }

  public static final int ROW_LAYOUT_FIELD_NUMBER = 8;
  /**
   *
   *
   *

   * The content is divided into equally spaced rows and the widgets are
   * arranged horizontally.
   *

   *
   * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
   *
   * @return Whether the rowLayout field is set.
   */
  @java.lang.Override
  public boolean hasRowLayout() {
    return layoutCase_ == 8;
  }
  /**
   *
   *
   *

   * The content is divided into equally spaced rows and the widgets are
   * arranged horizontally.
   *

   *
   * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
   *
   * @return The rowLayout.
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.RowLayout getRowLayout() {
    if (layoutCase_ == 8) {
      return (com.google.monitoring.dashboard.v1.RowLayout) layout_;
    }
    return com.google.monitoring.dashboard.v1.RowLayout.getDefaultInstance();
  }
  /**
   *
   *
   *

   * The content is divided into equally spaced rows and the widgets are
   * arranged horizontally.
   *

   *
   * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.RowLayoutOrBuilder getRowLayoutOrBuilder() {
    if (layoutCase_ == 8) {
      return (com.google.monitoring.dashboard.v1.RowLayout) layout_;
    }
    return com.google.monitoring.dashboard.v1.RowLayout.getDefaultInstance();
  }

  public static final int COLUMN_LAYOUT_FIELD_NUMBER = 9;
  /**
   *
   *
   *

   * The content is divided into equally spaced columns and the widgets are
   * arranged vertically.
   *

   *
   * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
   *
   * @return Whether the columnLayout field is set.
   */
  @java.lang.Override
  public boolean hasColumnLayout() {
    return layoutCase_ == 9;
  }
  /**
   *
   *
   *

   * The content is divided into equally spaced columns and the widgets are
   * arranged vertically.
   *

   *
   * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
   *
   * @return The columnLayout.
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.ColumnLayout getColumnLayout() {
    if (layoutCase_ == 9) {
      return (com.google.monitoring.dashboard.v1.ColumnLayout) layout_;
    }
    return com.google.monitoring.dashboard.v1.ColumnLayout.getDefaultInstance();
  }
  /**
   *
   *
   *

   * The content is divided into equally spaced columns and the widgets are
   * arranged vertically.
   *

   *
   * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.ColumnLayoutOrBuilder getColumnLayoutOrBuilder() {
    if (layoutCase_ == 9) {
      return (com.google.monitoring.dashboard.v1.ColumnLayout) layout_;
    }
    return com.google.monitoring.dashboard.v1.ColumnLayout.getDefaultInstance();
  }

  public static final int DASHBOARD_FILTERS_FIELD_NUMBER = 11;
  private java.util.List<com.google.monitoring.dashboard.v1.DashboardFilter> dashboardFilters_;
  /**
   *
   *
   *

   * Filters to reduce the amount of data charted based on the filter criteria.
   *

   *
   * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
   */
  @java.lang.Override
  public java.util.List<com.google.monitoring.dashboard.v1.DashboardFilter>
      getDashboardFiltersList() {
    return dashboardFilters_;
  }
  /**
   *
   *
   *

   * Filters to reduce the amount of data charted based on the filter criteria.
   *

   *
   * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
   */
  @java.lang.Override
  public java.util.List<? extends com.google.monitoring.dashboard.v1.DashboardFilterOrBuilder>
      getDashboardFiltersOrBuilderList() {
    return dashboardFilters_;
  }
  /**
   *
   *
   *

   * Filters to reduce the amount of data charted based on the filter criteria.
   *

   *
   * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
   */
  @java.lang.Override
  public int getDashboardFiltersCount() {
    return dashboardFilters_.size();
  }
  /**
   *
   *
   *

   * Filters to reduce the amount of data charted based on the filter criteria.
   *

   *
   * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.DashboardFilter getDashboardFilters(int index) {
    return dashboardFilters_.get(index);
  }
  /**
   *
   *
   *

   * Filters to reduce the amount of data charted based on the filter criteria.
   *

   *
   * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
   */
  @java.lang.Override
  public com.google.monitoring.dashboard.v1.DashboardFilterOrBuilder getDashboardFiltersOrBuilder(
      int index) {
    return dashboardFilters_.get(index);
  }

  public static final int LABELS_FIELD_NUMBER = 12;

  private static final class LabelsDefaultEntryHolder {
    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.dashboard.v1.DashboardsProto
                .internal_static_google_monitoring_dashboard_v1_Dashboard_LabelsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
    if (labels_ == null) {
      return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
    }
    return labels_;
  }

  public int getLabelsCount() {
    return internalGetLabels().getMap().size();
  }
  /**
   *
   *
   *

   * Labels applied to the dashboard
   *

   *
   * map<string, string> labels = 12;
   */
  @java.lang.Override
  public boolean containsLabels(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetLabels().getMap().containsKey(key);
  }
  /** Use {@link #getLabelsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getLabels() {
    return getLabelsMap();
  }
  /**
   *
   *
   *

   * Labels applied to the dashboard
   *

   *
   * map<string, string> labels = 12;
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
    return internalGetLabels().getMap();
  }
  /**
   *
   *
   *

   * Labels applied to the dashboard
   *

   *
   * map<string, string> labels = 12;
   */
  @java.lang.Override
  public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   *

   * Labels applied to the dashboard
   *

   *
   * map<string, string> labels = 12;
   */
  @java.lang.Override
  public java.lang.String getLabelsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  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 {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, etag_);
    }
    if (layoutCase_ == 5) {
      output.writeMessage(5, (com.google.monitoring.dashboard.v1.GridLayout) layout_);
    }
    if (layoutCase_ == 6) {
      output.writeMessage(6, (com.google.monitoring.dashboard.v1.MosaicLayout) layout_);
    }
    if (layoutCase_ == 8) {
      output.writeMessage(8, (com.google.monitoring.dashboard.v1.RowLayout) layout_);
    }
    if (layoutCase_ == 9) {
      output.writeMessage(9, (com.google.monitoring.dashboard.v1.ColumnLayout) layout_);
    }
    for (int i = 0; i < dashboardFilters_.size(); i++) {
      output.writeMessage(11, dashboardFilters_.get(i));
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 12);
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, etag_);
    }
    if (layoutCase_ == 5) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              5, (com.google.monitoring.dashboard.v1.GridLayout) layout_);
    }
    if (layoutCase_ == 6) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              6, (com.google.monitoring.dashboard.v1.MosaicLayout) layout_);
    }
    if (layoutCase_ == 8) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              8, (com.google.monitoring.dashboard.v1.RowLayout) layout_);
    }
    if (layoutCase_ == 9) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              9, (com.google.monitoring.dashboard.v1.ColumnLayout) layout_);
    }
    for (int i = 0; i < dashboardFilters_.size(); i++) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(11, dashboardFilters_.get(i));
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
          LabelsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, labels__);
    }
    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.monitoring.dashboard.v1.Dashboard)) {
      return super.equals(obj);
    }
    com.google.monitoring.dashboard.v1.Dashboard other =
        (com.google.monitoring.dashboard.v1.Dashboard) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getDisplayName().equals(other.getDisplayName())) return false;
    if (!getEtag().equals(other.getEtag())) return false;
    if (!getDashboardFiltersList().equals(other.getDashboardFiltersList())) return false;
    if (!internalGetLabels().equals(other.internalGetLabels())) return false;
    if (!getLayoutCase().equals(other.getLayoutCase())) return false;
    switch (layoutCase_) {
      case 5:
        if (!getGridLayout().equals(other.getGridLayout())) return false;
        break;
      case 6:
        if (!getMosaicLayout().equals(other.getMosaicLayout())) return false;
        break;
      case 8:
        if (!getRowLayout().equals(other.getRowLayout())) return false;
        break;
      case 9:
        if (!getColumnLayout().equals(other.getColumnLayout())) return false;
        break;
      case 0:
      default:
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getDisplayName().hashCode();
    hash = (37 * hash) + ETAG_FIELD_NUMBER;
    hash = (53 * hash) + getEtag().hashCode();
    if (getDashboardFiltersCount() > 0) {
      hash = (37 * hash) + DASHBOARD_FILTERS_FIELD_NUMBER;
      hash = (53 * hash) + getDashboardFiltersList().hashCode();
    }
    if (!internalGetLabels().getMap().isEmpty()) {
      hash = (37 * hash) + LABELS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetLabels().hashCode();
    }
    switch (layoutCase_) {
      case 5:
        hash = (37 * hash) + GRID_LAYOUT_FIELD_NUMBER;
        hash = (53 * hash) + getGridLayout().hashCode();
        break;
      case 6:
        hash = (37 * hash) + MOSAIC_LAYOUT_FIELD_NUMBER;
        hash = (53 * hash) + getMosaicLayout().hashCode();
        break;
      case 8:
        hash = (37 * hash) + ROW_LAYOUT_FIELD_NUMBER;
        hash = (53 * hash) + getRowLayout().hashCode();
        break;
      case 9:
        hash = (37 * hash) + COLUMN_LAYOUT_FIELD_NUMBER;
        hash = (53 * hash) + getColumnLayout().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.monitoring.dashboard.v1.Dashboard parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.monitoring.dashboard.v1.Dashboard 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.dashboard.v1.Dashboard parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

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

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

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

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

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

  public static com.google.monitoring.dashboard.v1.Dashboard 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.monitoring.dashboard.v1.Dashboard 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;
  }
  /**
   *
   *
   *

   * A Google Stackdriver dashboard. Dashboards define the content and layout
   * of pages in the Stackdriver web application.
   *

   *
   * Protobuf type {@code google.monitoring.dashboard.v1.Dashboard}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.monitoring.dashboard.v1.Dashboard)
      com.google.monitoring.dashboard.v1.DashboardOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.monitoring.dashboard.v1.DashboardsProto
          .internal_static_google_monitoring_dashboard_v1_Dashboard_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 12:
          return internalGetLabels();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 12:
          return internalGetMutableLabels();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.monitoring.dashboard.v1.DashboardsProto
          .internal_static_google_monitoring_dashboard_v1_Dashboard_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.monitoring.dashboard.v1.Dashboard.class,
              com.google.monitoring.dashboard.v1.Dashboard.Builder.class);
    }

    // Construct using com.google.monitoring.dashboard.v1.Dashboard.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      name_ = "";

      displayName_ = "";

      etag_ = "";

      if (gridLayoutBuilder_ != null) {
        gridLayoutBuilder_.clear();
      }
      if (mosaicLayoutBuilder_ != null) {
        mosaicLayoutBuilder_.clear();
      }
      if (rowLayoutBuilder_ != null) {
        rowLayoutBuilder_.clear();
      }
      if (columnLayoutBuilder_ != null) {
        columnLayoutBuilder_.clear();
      }
      if (dashboardFiltersBuilder_ == null) {
        dashboardFilters_ = java.util.Collections.emptyList();
      } else {
        dashboardFilters_ = null;
        dashboardFiltersBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      internalGetMutableLabels().clear();
      layoutCase_ = 0;
      layout_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.monitoring.dashboard.v1.DashboardsProto
          .internal_static_google_monitoring_dashboard_v1_Dashboard_descriptor;
    }

    @java.lang.Override
    public com.google.monitoring.dashboard.v1.Dashboard getDefaultInstanceForType() {
      return com.google.monitoring.dashboard.v1.Dashboard.getDefaultInstance();
    }

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

    @java.lang.Override
    public com.google.monitoring.dashboard.v1.Dashboard buildPartial() {
      com.google.monitoring.dashboard.v1.Dashboard result =
          new com.google.monitoring.dashboard.v1.Dashboard(this);
      int from_bitField0_ = bitField0_;
      result.name_ = name_;
      result.displayName_ = displayName_;
      result.etag_ = etag_;
      if (layoutCase_ == 5) {
        if (gridLayoutBuilder_ == null) {
          result.layout_ = layout_;
        } else {
          result.layout_ = gridLayoutBuilder_.build();
        }
      }
      if (layoutCase_ == 6) {
        if (mosaicLayoutBuilder_ == null) {
          result.layout_ = layout_;
        } else {
          result.layout_ = mosaicLayoutBuilder_.build();
        }
      }
      if (layoutCase_ == 8) {
        if (rowLayoutBuilder_ == null) {
          result.layout_ = layout_;
        } else {
          result.layout_ = rowLayoutBuilder_.build();
        }
      }
      if (layoutCase_ == 9) {
        if (columnLayoutBuilder_ == null) {
          result.layout_ = layout_;
        } else {
          result.layout_ = columnLayoutBuilder_.build();
        }
      }
      if (dashboardFiltersBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          dashboardFilters_ = java.util.Collections.unmodifiableList(dashboardFilters_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.dashboardFilters_ = dashboardFilters_;
      } else {
        result.dashboardFilters_ = dashboardFiltersBuilder_.build();
      }
      result.labels_ = internalGetLabels();
      result.labels_.makeImmutable();
      result.layoutCase_ = layoutCase_;
      onBuilt();
      return result;
    }

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

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

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

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

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

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

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

    public Builder mergeFrom(com.google.monitoring.dashboard.v1.Dashboard other) {
      if (other == com.google.monitoring.dashboard.v1.Dashboard.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getDisplayName().isEmpty()) {
        displayName_ = other.displayName_;
        onChanged();
      }
      if (!other.getEtag().isEmpty()) {
        etag_ = other.etag_;
        onChanged();
      }
      if (dashboardFiltersBuilder_ == null) {
        if (!other.dashboardFilters_.isEmpty()) {
          if (dashboardFilters_.isEmpty()) {
            dashboardFilters_ = other.dashboardFilters_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureDashboardFiltersIsMutable();
            dashboardFilters_.addAll(other.dashboardFilters_);
          }
          onChanged();
        }
      } else {
        if (!other.dashboardFilters_.isEmpty()) {
          if (dashboardFiltersBuilder_.isEmpty()) {
            dashboardFiltersBuilder_.dispose();
            dashboardFiltersBuilder_ = null;
            dashboardFilters_ = other.dashboardFilters_;
            bitField0_ = (bitField0_ & ~0x00000001);
            dashboardFiltersBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getDashboardFiltersFieldBuilder()
                    : null;
          } else {
            dashboardFiltersBuilder_.addAllMessages(other.dashboardFilters_);
          }
        }
      }
      internalGetMutableLabels().mergeFrom(other.internalGetLabels());
      switch (other.getLayoutCase()) {
        case GRID_LAYOUT:
          {
            mergeGridLayout(other.getGridLayout());
            break;
          }
        case MOSAIC_LAYOUT:
          {
            mergeMosaicLayout(other.getMosaicLayout());
            break;
          }
        case ROW_LAYOUT:
          {
            mergeRowLayout(other.getRowLayout());
            break;
          }
        case COLUMN_LAYOUT:
          {
            mergeColumnLayout(other.getColumnLayout());
            break;
          }
        case LAYOUT_NOT_SET:
          {
            break;
          }
      }
      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 10:
              {
                name_ = input.readStringRequireUtf8();

                break;
              } // case 10
            case 18:
              {
                displayName_ = input.readStringRequireUtf8();

                break;
              } // case 18
            case 34:
              {
                etag_ = input.readStringRequireUtf8();

                break;
              } // case 34
            case 42:
              {
                input.readMessage(getGridLayoutFieldBuilder().getBuilder(), extensionRegistry);
                layoutCase_ = 5;
                break;
              } // case 42
            case 50:
              {
                input.readMessage(getMosaicLayoutFieldBuilder().getBuilder(), extensionRegistry);
                layoutCase_ = 6;
                break;
              } // case 50
            case 66:
              {
                input.readMessage(getRowLayoutFieldBuilder().getBuilder(), extensionRegistry);
                layoutCase_ = 8;
                break;
              } // case 66
            case 74:
              {
                input.readMessage(getColumnLayoutFieldBuilder().getBuilder(), extensionRegistry);
                layoutCase_ = 9;
                break;
              } // case 74
            case 90:
              {
                com.google.monitoring.dashboard.v1.DashboardFilter m =
                    input.readMessage(
                        com.google.monitoring.dashboard.v1.DashboardFilter.parser(),
                        extensionRegistry);
                if (dashboardFiltersBuilder_ == null) {
                  ensureDashboardFiltersIsMutable();
                  dashboardFilters_.add(m);
                } else {
                  dashboardFiltersBuilder_.addMessage(m);
                }
                break;
              } // case 90
            case 98:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
                    input.readMessage(
                        LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableLabels()
                    .getMutableMap()
                    .put(labels__.getKey(), labels__.getValue());
                break;
              } // case 98
            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 layoutCase_ = 0;
    private java.lang.Object layout_;

    public LayoutCase getLayoutCase() {
      return LayoutCase.forNumber(layoutCase_);
    }

    public Builder clearLayout() {
      layoutCase_ = 0;
      layout_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     *

     * Immutable. The resource name of the dashboard.
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @return The name.
     */
    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;
      }
    }
    /**
     *
     *
     *

     * Immutable. The resource name of the dashboard.
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @return The bytes for name.
     */
    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;
      }
    }
    /**
     *
     *
     *

     * Immutable. The resource name of the dashboard.
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      name_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Immutable. The resource name of the dashboard.
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {

      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Immutable. The resource name of the dashboard.
     *

     *
     * string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    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_ = "";
    /**
     *
     *
     *

     * Required. The mutable, human-readable name.
     *

     *
     * string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
     *
     * @return The displayName.
     */
    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;
      }
    }
    /**
     *
     *
     *

     * Required. The mutable, human-readable name.
     *

     *
     * string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
     *
     * @return The bytes for displayName.
     */
    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;
      }
    }
    /**
     *
     *
     *

     * Required. The mutable, human-readable name.
     *

     *
     * string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
     *
     * @param value The displayName to set.
     * @return This builder for chaining.
     */
    public Builder setDisplayName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      displayName_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Required. The mutable, human-readable name.
     *

     *
     * string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
     *
     * @return This builder for chaining.
     */
    public Builder clearDisplayName() {

      displayName_ = getDefaultInstance().getDisplayName();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * Required. The mutable, human-readable name.
     *

     *
     * string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
     *
     * @param value The bytes for displayName to set.
     * @return This builder for chaining.
     */
    public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      displayName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object etag_ = "";
    /**
     *
     *
     *

     * `etag` is used for optimistic concurrency control as a way to help
     * prevent simultaneous updates of a policy from overwriting each other.
     * An `etag` is returned in the response to `GetDashboard`, and
     * users are expected to put that etag in the request to `UpdateDashboard` to
     * ensure that their change will be applied to the same version of the
     * Dashboard configuration. The field should not be passed during
     * dashboard creation.
     *

     *
     * string etag = 4;
     *
     * @return The etag.
     */
    public java.lang.String getEtag() {
      java.lang.Object ref = etag_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        etag_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     *

     * `etag` is used for optimistic concurrency control as a way to help
     * prevent simultaneous updates of a policy from overwriting each other.
     * An `etag` is returned in the response to `GetDashboard`, and
     * users are expected to put that etag in the request to `UpdateDashboard` to
     * ensure that their change will be applied to the same version of the
     * Dashboard configuration. The field should not be passed during
     * dashboard creation.
     *

     *
     * string etag = 4;
     *
     * @return The bytes for etag.
     */
    public com.google.protobuf.ByteString getEtagBytes() {
      java.lang.Object ref = etag_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        etag_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     *

     * `etag` is used for optimistic concurrency control as a way to help
     * prevent simultaneous updates of a policy from overwriting each other.
     * An `etag` is returned in the response to `GetDashboard`, and
     * users are expected to put that etag in the request to `UpdateDashboard` to
     * ensure that their change will be applied to the same version of the
     * Dashboard configuration. The field should not be passed during
     * dashboard creation.
     *

     *
     * string etag = 4;
     *
     * @param value The etag to set.
     * @return This builder for chaining.
     */
    public Builder setEtag(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      etag_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * `etag` is used for optimistic concurrency control as a way to help
     * prevent simultaneous updates of a policy from overwriting each other.
     * An `etag` is returned in the response to `GetDashboard`, and
     * users are expected to put that etag in the request to `UpdateDashboard` to
     * ensure that their change will be applied to the same version of the
     * Dashboard configuration. The field should not be passed during
     * dashboard creation.
     *

     *
     * string etag = 4;
     *
     * @return This builder for chaining.
     */
    public Builder clearEtag() {

      etag_ = getDefaultInstance().getEtag();
      onChanged();
      return this;
    }
    /**
     *
     *
     *

     * `etag` is used for optimistic concurrency control as a way to help
     * prevent simultaneous updates of a policy from overwriting each other.
     * An `etag` is returned in the response to `GetDashboard`, and
     * users are expected to put that etag in the request to `UpdateDashboard` to
     * ensure that their change will be applied to the same version of the
     * Dashboard configuration. The field should not be passed during
     * dashboard creation.
     *

     *
     * string etag = 4;
     *
     * @param value The bytes for etag to set.
     * @return This builder for chaining.
     */
    public Builder setEtagBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      etag_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.dashboard.v1.GridLayout,
            com.google.monitoring.dashboard.v1.GridLayout.Builder,
            com.google.monitoring.dashboard.v1.GridLayoutOrBuilder>
        gridLayoutBuilder_;
    /**
     *
     *
     *

     * Content is arranged with a basic layout that re-flows a simple list of
     * informational elements like widgets or tiles.
     *

     *
     * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
     *
     * @return Whether the gridLayout field is set.
     */
    @java.lang.Override
    public boolean hasGridLayout() {
      return layoutCase_ == 5;
    }
    /**
     *
     *
     *

     * Content is arranged with a basic layout that re-flows a simple list of
     * informational elements like widgets or tiles.
     *

     *
     * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
     *
     * @return The gridLayout.
     */
    @java.lang.Override
    public com.google.monitoring.dashboard.v1.GridLayout getGridLayout() {
      if (gridLayoutBuilder_ == null) {
        if (layoutCase_ == 5) {
          return (com.google.monitoring.dashboard.v1.GridLayout) layout_;
        }
        return com.google.monitoring.dashboard.v1.GridLayout.getDefaultInstance();
      } else {
        if (layoutCase_ == 5) {
          return gridLayoutBuilder_.getMessage();
        }
        return com.google.monitoring.dashboard.v1.GridLayout.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * Content is arranged with a basic layout that re-flows a simple list of
     * informational elements like widgets or tiles.
     *

     *
     * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
     */
    public Builder setGridLayout(com.google.monitoring.dashboard.v1.GridLayout value) {
      if (gridLayoutBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        layout_ = value;
        onChanged();
      } else {
        gridLayoutBuilder_.setMessage(value);
      }
      layoutCase_ = 5;
      return this;
    }
    /**
     *
     *
     *

     * Content is arranged with a basic layout that re-flows a simple list of
     * informational elements like widgets or tiles.
     *

     *
     * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
     */
    public Builder setGridLayout(
        com.google.monitoring.dashboard.v1.GridLayout.Builder builderForValue) {
      if (gridLayoutBuilder_ == null) {
        layout_ = builderForValue.build();
        onChanged();
      } else {
        gridLayoutBuilder_.setMessage(builderForValue.build());
      }
      layoutCase_ = 5;
      return this;
    }
    /**
     *
     *
     *

     * Content is arranged with a basic layout that re-flows a simple list of
     * informational elements like widgets or tiles.
     *

     *
     * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
     */
    public Builder mergeGridLayout(com.google.monitoring.dashboard.v1.GridLayout value) {
      if (gridLayoutBuilder_ == null) {
        if (layoutCase_ == 5
            && layout_ != com.google.monitoring.dashboard.v1.GridLayout.getDefaultInstance()) {
          layout_ =
              com.google.monitoring.dashboard.v1.GridLayout.newBuilder(
                      (com.google.monitoring.dashboard.v1.GridLayout) layout_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          layout_ = value;
        }
        onChanged();
      } else {
        if (layoutCase_ == 5) {
          gridLayoutBuilder_.mergeFrom(value);
        } else {
          gridLayoutBuilder_.setMessage(value);
        }
      }
      layoutCase_ = 5;
      return this;
    }
    /**
     *
     *
     *

     * Content is arranged with a basic layout that re-flows a simple list of
     * informational elements like widgets or tiles.
     *

     *
     * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
     */
    public Builder clearGridLayout() {
      if (gridLayoutBuilder_ == null) {
        if (layoutCase_ == 5) {
          layoutCase_ = 0;
          layout_ = null;
          onChanged();
        }
      } else {
        if (layoutCase_ == 5) {
          layoutCase_ = 0;
          layout_ = null;
        }
        gridLayoutBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     *

     * Content is arranged with a basic layout that re-flows a simple list of
     * informational elements like widgets or tiles.
     *

     *
     * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
     */
    public com.google.monitoring.dashboard.v1.GridLayout.Builder getGridLayoutBuilder() {
      return getGridLayoutFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * Content is arranged with a basic layout that re-flows a simple list of
     * informational elements like widgets or tiles.
     *

     *
     * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
     */
    @java.lang.Override
    public com.google.monitoring.dashboard.v1.GridLayoutOrBuilder getGridLayoutOrBuilder() {
      if ((layoutCase_ == 5) && (gridLayoutBuilder_ != null)) {
        return gridLayoutBuilder_.getMessageOrBuilder();
      } else {
        if (layoutCase_ == 5) {
          return (com.google.monitoring.dashboard.v1.GridLayout) layout_;
        }
        return com.google.monitoring.dashboard.v1.GridLayout.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * Content is arranged with a basic layout that re-flows a simple list of
     * informational elements like widgets or tiles.
     *

     *
     * .google.monitoring.dashboard.v1.GridLayout grid_layout = 5;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.dashboard.v1.GridLayout,
            com.google.monitoring.dashboard.v1.GridLayout.Builder,
            com.google.monitoring.dashboard.v1.GridLayoutOrBuilder>
        getGridLayoutFieldBuilder() {
      if (gridLayoutBuilder_ == null) {
        if (!(layoutCase_ == 5)) {
          layout_ = com.google.monitoring.dashboard.v1.GridLayout.getDefaultInstance();
        }
        gridLayoutBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.monitoring.dashboard.v1.GridLayout,
                com.google.monitoring.dashboard.v1.GridLayout.Builder,
                com.google.monitoring.dashboard.v1.GridLayoutOrBuilder>(
                (com.google.monitoring.dashboard.v1.GridLayout) layout_,
                getParentForChildren(),
                isClean());
        layout_ = null;
      }
      layoutCase_ = 5;
      onChanged();
      ;
      return gridLayoutBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.dashboard.v1.MosaicLayout,
            com.google.monitoring.dashboard.v1.MosaicLayout.Builder,
            com.google.monitoring.dashboard.v1.MosaicLayoutOrBuilder>
        mosaicLayoutBuilder_;
    /**
     *
     *
     *

     * The content is arranged as a grid of tiles, with each content widget
     * occupying one or more grid blocks.
     *

     *
     * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
     *
     * @return Whether the mosaicLayout field is set.
     */
    @java.lang.Override
    public boolean hasMosaicLayout() {
      return layoutCase_ == 6;
    }
    /**
     *
     *
     *

     * The content is arranged as a grid of tiles, with each content widget
     * occupying one or more grid blocks.
     *

     *
     * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
     *
     * @return The mosaicLayout.
     */
    @java.lang.Override
    public com.google.monitoring.dashboard.v1.MosaicLayout getMosaicLayout() {
      if (mosaicLayoutBuilder_ == null) {
        if (layoutCase_ == 6) {
          return (com.google.monitoring.dashboard.v1.MosaicLayout) layout_;
        }
        return com.google.monitoring.dashboard.v1.MosaicLayout.getDefaultInstance();
      } else {
        if (layoutCase_ == 6) {
          return mosaicLayoutBuilder_.getMessage();
        }
        return com.google.monitoring.dashboard.v1.MosaicLayout.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * The content is arranged as a grid of tiles, with each content widget
     * occupying one or more grid blocks.
     *

     *
     * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
     */
    public Builder setMosaicLayout(com.google.monitoring.dashboard.v1.MosaicLayout value) {
      if (mosaicLayoutBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        layout_ = value;
        onChanged();
      } else {
        mosaicLayoutBuilder_.setMessage(value);
      }
      layoutCase_ = 6;
      return this;
    }
    /**
     *
     *
     *

     * The content is arranged as a grid of tiles, with each content widget
     * occupying one or more grid blocks.
     *

     *
     * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
     */
    public Builder setMosaicLayout(
        com.google.monitoring.dashboard.v1.MosaicLayout.Builder builderForValue) {
      if (mosaicLayoutBuilder_ == null) {
        layout_ = builderForValue.build();
        onChanged();
      } else {
        mosaicLayoutBuilder_.setMessage(builderForValue.build());
      }
      layoutCase_ = 6;
      return this;
    }
    /**
     *
     *
     *

     * The content is arranged as a grid of tiles, with each content widget
     * occupying one or more grid blocks.
     *

     *
     * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
     */
    public Builder mergeMosaicLayout(com.google.monitoring.dashboard.v1.MosaicLayout value) {
      if (mosaicLayoutBuilder_ == null) {
        if (layoutCase_ == 6
            && layout_ != com.google.monitoring.dashboard.v1.MosaicLayout.getDefaultInstance()) {
          layout_ =
              com.google.monitoring.dashboard.v1.MosaicLayout.newBuilder(
                      (com.google.monitoring.dashboard.v1.MosaicLayout) layout_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          layout_ = value;
        }
        onChanged();
      } else {
        if (layoutCase_ == 6) {
          mosaicLayoutBuilder_.mergeFrom(value);
        } else {
          mosaicLayoutBuilder_.setMessage(value);
        }
      }
      layoutCase_ = 6;
      return this;
    }
    /**
     *
     *
     *

     * The content is arranged as a grid of tiles, with each content widget
     * occupying one or more grid blocks.
     *

     *
     * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
     */
    public Builder clearMosaicLayout() {
      if (mosaicLayoutBuilder_ == null) {
        if (layoutCase_ == 6) {
          layoutCase_ = 0;
          layout_ = null;
          onChanged();
        }
      } else {
        if (layoutCase_ == 6) {
          layoutCase_ = 0;
          layout_ = null;
        }
        mosaicLayoutBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     *

     * The content is arranged as a grid of tiles, with each content widget
     * occupying one or more grid blocks.
     *

     *
     * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
     */
    public com.google.monitoring.dashboard.v1.MosaicLayout.Builder getMosaicLayoutBuilder() {
      return getMosaicLayoutFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * The content is arranged as a grid of tiles, with each content widget
     * occupying one or more grid blocks.
     *

     *
     * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
     */
    @java.lang.Override
    public com.google.monitoring.dashboard.v1.MosaicLayoutOrBuilder getMosaicLayoutOrBuilder() {
      if ((layoutCase_ == 6) && (mosaicLayoutBuilder_ != null)) {
        return mosaicLayoutBuilder_.getMessageOrBuilder();
      } else {
        if (layoutCase_ == 6) {
          return (com.google.monitoring.dashboard.v1.MosaicLayout) layout_;
        }
        return com.google.monitoring.dashboard.v1.MosaicLayout.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * The content is arranged as a grid of tiles, with each content widget
     * occupying one or more grid blocks.
     *

     *
     * .google.monitoring.dashboard.v1.MosaicLayout mosaic_layout = 6;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.dashboard.v1.MosaicLayout,
            com.google.monitoring.dashboard.v1.MosaicLayout.Builder,
            com.google.monitoring.dashboard.v1.MosaicLayoutOrBuilder>
        getMosaicLayoutFieldBuilder() {
      if (mosaicLayoutBuilder_ == null) {
        if (!(layoutCase_ == 6)) {
          layout_ = com.google.monitoring.dashboard.v1.MosaicLayout.getDefaultInstance();
        }
        mosaicLayoutBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.monitoring.dashboard.v1.MosaicLayout,
                com.google.monitoring.dashboard.v1.MosaicLayout.Builder,
                com.google.monitoring.dashboard.v1.MosaicLayoutOrBuilder>(
                (com.google.monitoring.dashboard.v1.MosaicLayout) layout_,
                getParentForChildren(),
                isClean());
        layout_ = null;
      }
      layoutCase_ = 6;
      onChanged();
      ;
      return mosaicLayoutBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.dashboard.v1.RowLayout,
            com.google.monitoring.dashboard.v1.RowLayout.Builder,
            com.google.monitoring.dashboard.v1.RowLayoutOrBuilder>
        rowLayoutBuilder_;
    /**
     *
     *
     *

     * The content is divided into equally spaced rows and the widgets are
     * arranged horizontally.
     *

     *
     * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
     *
     * @return Whether the rowLayout field is set.
     */
    @java.lang.Override
    public boolean hasRowLayout() {
      return layoutCase_ == 8;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced rows and the widgets are
     * arranged horizontally.
     *

     *
     * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
     *
     * @return The rowLayout.
     */
    @java.lang.Override
    public com.google.monitoring.dashboard.v1.RowLayout getRowLayout() {
      if (rowLayoutBuilder_ == null) {
        if (layoutCase_ == 8) {
          return (com.google.monitoring.dashboard.v1.RowLayout) layout_;
        }
        return com.google.monitoring.dashboard.v1.RowLayout.getDefaultInstance();
      } else {
        if (layoutCase_ == 8) {
          return rowLayoutBuilder_.getMessage();
        }
        return com.google.monitoring.dashboard.v1.RowLayout.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced rows and the widgets are
     * arranged horizontally.
     *

     *
     * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
     */
    public Builder setRowLayout(com.google.monitoring.dashboard.v1.RowLayout value) {
      if (rowLayoutBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        layout_ = value;
        onChanged();
      } else {
        rowLayoutBuilder_.setMessage(value);
      }
      layoutCase_ = 8;
      return this;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced rows and the widgets are
     * arranged horizontally.
     *

     *
     * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
     */
    public Builder setRowLayout(
        com.google.monitoring.dashboard.v1.RowLayout.Builder builderForValue) {
      if (rowLayoutBuilder_ == null) {
        layout_ = builderForValue.build();
        onChanged();
      } else {
        rowLayoutBuilder_.setMessage(builderForValue.build());
      }
      layoutCase_ = 8;
      return this;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced rows and the widgets are
     * arranged horizontally.
     *

     *
     * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
     */
    public Builder mergeRowLayout(com.google.monitoring.dashboard.v1.RowLayout value) {
      if (rowLayoutBuilder_ == null) {
        if (layoutCase_ == 8
            && layout_ != com.google.monitoring.dashboard.v1.RowLayout.getDefaultInstance()) {
          layout_ =
              com.google.monitoring.dashboard.v1.RowLayout.newBuilder(
                      (com.google.monitoring.dashboard.v1.RowLayout) layout_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          layout_ = value;
        }
        onChanged();
      } else {
        if (layoutCase_ == 8) {
          rowLayoutBuilder_.mergeFrom(value);
        } else {
          rowLayoutBuilder_.setMessage(value);
        }
      }
      layoutCase_ = 8;
      return this;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced rows and the widgets are
     * arranged horizontally.
     *

     *
     * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
     */
    public Builder clearRowLayout() {
      if (rowLayoutBuilder_ == null) {
        if (layoutCase_ == 8) {
          layoutCase_ = 0;
          layout_ = null;
          onChanged();
        }
      } else {
        if (layoutCase_ == 8) {
          layoutCase_ = 0;
          layout_ = null;
        }
        rowLayoutBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced rows and the widgets are
     * arranged horizontally.
     *

     *
     * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
     */
    public com.google.monitoring.dashboard.v1.RowLayout.Builder getRowLayoutBuilder() {
      return getRowLayoutFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced rows and the widgets are
     * arranged horizontally.
     *

     *
     * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
     */
    @java.lang.Override
    public com.google.monitoring.dashboard.v1.RowLayoutOrBuilder getRowLayoutOrBuilder() {
      if ((layoutCase_ == 8) && (rowLayoutBuilder_ != null)) {
        return rowLayoutBuilder_.getMessageOrBuilder();
      } else {
        if (layoutCase_ == 8) {
          return (com.google.monitoring.dashboard.v1.RowLayout) layout_;
        }
        return com.google.monitoring.dashboard.v1.RowLayout.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced rows and the widgets are
     * arranged horizontally.
     *

     *
     * .google.monitoring.dashboard.v1.RowLayout row_layout = 8;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.dashboard.v1.RowLayout,
            com.google.monitoring.dashboard.v1.RowLayout.Builder,
            com.google.monitoring.dashboard.v1.RowLayoutOrBuilder>
        getRowLayoutFieldBuilder() {
      if (rowLayoutBuilder_ == null) {
        if (!(layoutCase_ == 8)) {
          layout_ = com.google.monitoring.dashboard.v1.RowLayout.getDefaultInstance();
        }
        rowLayoutBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.monitoring.dashboard.v1.RowLayout,
                com.google.monitoring.dashboard.v1.RowLayout.Builder,
                com.google.monitoring.dashboard.v1.RowLayoutOrBuilder>(
                (com.google.monitoring.dashboard.v1.RowLayout) layout_,
                getParentForChildren(),
                isClean());
        layout_ = null;
      }
      layoutCase_ = 8;
      onChanged();
      ;
      return rowLayoutBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.dashboard.v1.ColumnLayout,
            com.google.monitoring.dashboard.v1.ColumnLayout.Builder,
            com.google.monitoring.dashboard.v1.ColumnLayoutOrBuilder>
        columnLayoutBuilder_;
    /**
     *
     *
     *

     * The content is divided into equally spaced columns and the widgets are
     * arranged vertically.
     *

     *
     * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
     *
     * @return Whether the columnLayout field is set.
     */
    @java.lang.Override
    public boolean hasColumnLayout() {
      return layoutCase_ == 9;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced columns and the widgets are
     * arranged vertically.
     *

     *
     * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
     *
     * @return The columnLayout.
     */
    @java.lang.Override
    public com.google.monitoring.dashboard.v1.ColumnLayout getColumnLayout() {
      if (columnLayoutBuilder_ == null) {
        if (layoutCase_ == 9) {
          return (com.google.monitoring.dashboard.v1.ColumnLayout) layout_;
        }
        return com.google.monitoring.dashboard.v1.ColumnLayout.getDefaultInstance();
      } else {
        if (layoutCase_ == 9) {
          return columnLayoutBuilder_.getMessage();
        }
        return com.google.monitoring.dashboard.v1.ColumnLayout.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced columns and the widgets are
     * arranged vertically.
     *

     *
     * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
     */
    public Builder setColumnLayout(com.google.monitoring.dashboard.v1.ColumnLayout value) {
      if (columnLayoutBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        layout_ = value;
        onChanged();
      } else {
        columnLayoutBuilder_.setMessage(value);
      }
      layoutCase_ = 9;
      return this;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced columns and the widgets are
     * arranged vertically.
     *

     *
     * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
     */
    public Builder setColumnLayout(
        com.google.monitoring.dashboard.v1.ColumnLayout.Builder builderForValue) {
      if (columnLayoutBuilder_ == null) {
        layout_ = builderForValue.build();
        onChanged();
      } else {
        columnLayoutBuilder_.setMessage(builderForValue.build());
      }
      layoutCase_ = 9;
      return this;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced columns and the widgets are
     * arranged vertically.
     *

     *
     * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
     */
    public Builder mergeColumnLayout(com.google.monitoring.dashboard.v1.ColumnLayout value) {
      if (columnLayoutBuilder_ == null) {
        if (layoutCase_ == 9
            && layout_ != com.google.monitoring.dashboard.v1.ColumnLayout.getDefaultInstance()) {
          layout_ =
              com.google.monitoring.dashboard.v1.ColumnLayout.newBuilder(
                      (com.google.monitoring.dashboard.v1.ColumnLayout) layout_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          layout_ = value;
        }
        onChanged();
      } else {
        if (layoutCase_ == 9) {
          columnLayoutBuilder_.mergeFrom(value);
        } else {
          columnLayoutBuilder_.setMessage(value);
        }
      }
      layoutCase_ = 9;
      return this;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced columns and the widgets are
     * arranged vertically.
     *

     *
     * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
     */
    public Builder clearColumnLayout() {
      if (columnLayoutBuilder_ == null) {
        if (layoutCase_ == 9) {
          layoutCase_ = 0;
          layout_ = null;
          onChanged();
        }
      } else {
        if (layoutCase_ == 9) {
          layoutCase_ = 0;
          layout_ = null;
        }
        columnLayoutBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced columns and the widgets are
     * arranged vertically.
     *

     *
     * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
     */
    public com.google.monitoring.dashboard.v1.ColumnLayout.Builder getColumnLayoutBuilder() {
      return getColumnLayoutFieldBuilder().getBuilder();
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced columns and the widgets are
     * arranged vertically.
     *

     *
     * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
     */
    @java.lang.Override
    public com.google.monitoring.dashboard.v1.ColumnLayoutOrBuilder getColumnLayoutOrBuilder() {
      if ((layoutCase_ == 9) && (columnLayoutBuilder_ != null)) {
        return columnLayoutBuilder_.getMessageOrBuilder();
      } else {
        if (layoutCase_ == 9) {
          return (com.google.monitoring.dashboard.v1.ColumnLayout) layout_;
        }
        return com.google.monitoring.dashboard.v1.ColumnLayout.getDefaultInstance();
      }
    }
    /**
     *
     *
     *

     * The content is divided into equally spaced columns and the widgets are
     * arranged vertically.
     *

     *
     * .google.monitoring.dashboard.v1.ColumnLayout column_layout = 9;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.monitoring.dashboard.v1.ColumnLayout,
            com.google.monitoring.dashboard.v1.ColumnLayout.Builder,
            com.google.monitoring.dashboard.v1.ColumnLayoutOrBuilder>
        getColumnLayoutFieldBuilder() {
      if (columnLayoutBuilder_ == null) {
        if (!(layoutCase_ == 9)) {
          layout_ = com.google.monitoring.dashboard.v1.ColumnLayout.getDefaultInstance();
        }
        columnLayoutBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.monitoring.dashboard.v1.ColumnLayout,
                com.google.monitoring.dashboard.v1.ColumnLayout.Builder,
                com.google.monitoring.dashboard.v1.ColumnLayoutOrBuilder>(
                (com.google.monitoring.dashboard.v1.ColumnLayout) layout_,
                getParentForChildren(),
                isClean());
        layout_ = null;
      }
      layoutCase_ = 9;
      onChanged();
      ;
      return columnLayoutBuilder_;
    }

    private java.util.List<com.google.monitoring.dashboard.v1.DashboardFilter> dashboardFilters_ =
        java.util.Collections.emptyList();

    private void ensureDashboardFiltersIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        dashboardFilters_ =
            new java.util.ArrayList<com.google.monitoring.dashboard.v1.DashboardFilter>(
                dashboardFilters_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.monitoring.dashboard.v1.DashboardFilter,
            com.google.monitoring.dashboard.v1.DashboardFilter.Builder,
            com.google.monitoring.dashboard.v1.DashboardFilterOrBuilder>
        dashboardFiltersBuilder_;

    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public java.util.List<com.google.monitoring.dashboard.v1.DashboardFilter>
        getDashboardFiltersList() {
      if (dashboardFiltersBuilder_ == null) {
        return java.util.Collections.unmodifiableList(dashboardFilters_);
      } else {
        return dashboardFiltersBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public int getDashboardFiltersCount() {
      if (dashboardFiltersBuilder_ == null) {
        return dashboardFilters_.size();
      } else {
        return dashboardFiltersBuilder_.getCount();
      }
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public com.google.monitoring.dashboard.v1.DashboardFilter getDashboardFilters(int index) {
      if (dashboardFiltersBuilder_ == null) {
        return dashboardFilters_.get(index);
      } else {
        return dashboardFiltersBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public Builder setDashboardFilters(
        int index, com.google.monitoring.dashboard.v1.DashboardFilter value) {
      if (dashboardFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDashboardFiltersIsMutable();
        dashboardFilters_.set(index, value);
        onChanged();
      } else {
        dashboardFiltersBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public Builder setDashboardFilters(
        int index, com.google.monitoring.dashboard.v1.DashboardFilter.Builder builderForValue) {
      if (dashboardFiltersBuilder_ == null) {
        ensureDashboardFiltersIsMutable();
        dashboardFilters_.set(index, builderForValue.build());
        onChanged();
      } else {
        dashboardFiltersBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public Builder addDashboardFilters(com.google.monitoring.dashboard.v1.DashboardFilter value) {
      if (dashboardFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDashboardFiltersIsMutable();
        dashboardFilters_.add(value);
        onChanged();
      } else {
        dashboardFiltersBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public Builder addDashboardFilters(
        int index, com.google.monitoring.dashboard.v1.DashboardFilter value) {
      if (dashboardFiltersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDashboardFiltersIsMutable();
        dashboardFilters_.add(index, value);
        onChanged();
      } else {
        dashboardFiltersBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public Builder addDashboardFilters(
        com.google.monitoring.dashboard.v1.DashboardFilter.Builder builderForValue) {
      if (dashboardFiltersBuilder_ == null) {
        ensureDashboardFiltersIsMutable();
        dashboardFilters_.add(builderForValue.build());
        onChanged();
      } else {
        dashboardFiltersBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public Builder addDashboardFilters(
        int index, com.google.monitoring.dashboard.v1.DashboardFilter.Builder builderForValue) {
      if (dashboardFiltersBuilder_ == null) {
        ensureDashboardFiltersIsMutable();
        dashboardFilters_.add(index, builderForValue.build());
        onChanged();
      } else {
        dashboardFiltersBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public Builder addAllDashboardFilters(
        java.lang.Iterable<? extends com.google.monitoring.dashboard.v1.DashboardFilter> values) {
      if (dashboardFiltersBuilder_ == null) {
        ensureDashboardFiltersIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dashboardFilters_);
        onChanged();
      } else {
        dashboardFiltersBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public Builder clearDashboardFilters() {
      if (dashboardFiltersBuilder_ == null) {
        dashboardFilters_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        dashboardFiltersBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public Builder removeDashboardFilters(int index) {
      if (dashboardFiltersBuilder_ == null) {
        ensureDashboardFiltersIsMutable();
        dashboardFilters_.remove(index);
        onChanged();
      } else {
        dashboardFiltersBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public com.google.monitoring.dashboard.v1.DashboardFilter.Builder getDashboardFiltersBuilder(
        int index) {
      return getDashboardFiltersFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public com.google.monitoring.dashboard.v1.DashboardFilterOrBuilder getDashboardFiltersOrBuilder(
        int index) {
      if (dashboardFiltersBuilder_ == null) {
        return dashboardFilters_.get(index);
      } else {
        return dashboardFiltersBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public java.util.List<? extends com.google.monitoring.dashboard.v1.DashboardFilterOrBuilder>
        getDashboardFiltersOrBuilderList() {
      if (dashboardFiltersBuilder_ != null) {
        return dashboardFiltersBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(dashboardFilters_);
      }
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public com.google.monitoring.dashboard.v1.DashboardFilter.Builder addDashboardFiltersBuilder() {
      return getDashboardFiltersFieldBuilder()
          .addBuilder(com.google.monitoring.dashboard.v1.DashboardFilter.getDefaultInstance());
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public com.google.monitoring.dashboard.v1.DashboardFilter.Builder addDashboardFiltersBuilder(
        int index) {
      return getDashboardFiltersFieldBuilder()
          .addBuilder(
              index, com.google.monitoring.dashboard.v1.DashboardFilter.getDefaultInstance());
    }
    /**
     *
     *
     *

     * Filters to reduce the amount of data charted based on the filter criteria.
     *

     *
     * repeated .google.monitoring.dashboard.v1.DashboardFilter dashboard_filters = 11;
     */
    public java.util.List<com.google.monitoring.dashboard.v1.DashboardFilter.Builder>
        getDashboardFiltersBuilderList() {
      return getDashboardFiltersFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.monitoring.dashboard.v1.DashboardFilter,
            com.google.monitoring.dashboard.v1.DashboardFilter.Builder,
            com.google.monitoring.dashboard.v1.DashboardFilterOrBuilder>
        getDashboardFiltersFieldBuilder() {
      if (dashboardFiltersBuilder_ == null) {
        dashboardFiltersBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.monitoring.dashboard.v1.DashboardFilter,
                com.google.monitoring.dashboard.v1.DashboardFilter.Builder,
                com.google.monitoring.dashboard.v1.DashboardFilterOrBuilder>(
                dashboardFilters_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        dashboardFilters_ = null;
      }
      return dashboardFiltersBuilder_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
      if (labels_ == null) {
        return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      return labels_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableLabels() {
      onChanged();
      ;
      if (labels_ == null) {
        labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      if (!labels_.isMutable()) {
        labels_ = labels_.copy();
      }
      return labels_;
    }

    public int getLabelsCount() {
      return internalGetLabels().getMap().size();
    }
    /**
     *
     *
     *

     * Labels applied to the dashboard
     *

     *
     * map<string, string> labels = 12;
     */
    @java.lang.Override
    public boolean containsLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetLabels().getMap().containsKey(key);
    }
    /** Use {@link #getLabelsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getLabels() {
      return getLabelsMap();
    }
    /**
     *
     *
     *

     * Labels applied to the dashboard
     *

     *
     * map<string, string> labels = 12;
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
      return internalGetLabels().getMap();
    }
    /**
     *
     *
     *

     * Labels applied to the dashboard
     *

     *
     * map<string, string> labels = 12;
     */
    @java.lang.Override
    public java.lang.String getLabelsOrDefault(
        java.lang.String key, java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     *

     * Labels applied to the dashboard
     *

     *
     * map<string, string> labels = 12;
     */
    @java.lang.Override
    public java.lang.String getLabelsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearLabels() {
      internalGetMutableLabels().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     *

     * Labels applied to the dashboard
     *

     *
     * map<string, string> labels = 12;
     */
    public Builder removeLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableLabels().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
      return internalGetMutableLabels().getMutableMap();
    }
    /**
     *
     *
     *

     * Labels applied to the dashboard
     *

     *
     * map<string, string> labels = 12;
     */
    public Builder putLabels(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }

      internalGetMutableLabels().getMutableMap().put(key, value);
      return this;
    }
    /**
     *
     *
     *

     * Labels applied to the dashboard
     *

     *
     * map<string, string> labels = 12;
     */
    public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableLabels().getMutableMap().putAll(values);
      return this;
    }

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

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

    // @@protoc_insertion_point(builder_scope:google.monitoring.dashboard.v1.Dashboard)
  }

  // @@protoc_insertion_point(class_scope:google.monitoring.dashboard.v1.Dashboard)
  private static final com.google.monitoring.dashboard.v1.Dashboard DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.monitoring.dashboard.v1.Dashboard();
  }

  public static com.google.monitoring.dashboard.v1.Dashboard getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Dashboard> PARSER =
      new com.google.protobuf.AbstractParser<Dashboard>() {
        @java.lang.Override
        public Dashboard 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<Dashboard> parser() {
    return PARSER;
  }

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

  @java.lang.Override
  public com.google.monitoring.dashboard.v1.Dashboard getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}


text:
![Build Status](https://travis-ci.org/abelmartin/jasmine_trellis.svg)

# JasmineTrellis

A new approach to maintable, dynamic fixture generation for Javascript tests.

## Installation

Add this line to your application's Gemfile:

    group: :development, :test do
      gem 'jasmine_trellis'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install jasmine_trellis

## Usage

This gem is HIGHLY volital and very much a work in progress.

## Contributing

1. Fork it ( http://github.com/<my-github-username>/jasmine_trellis/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

redpajama_set_name: RedPajamaGithub


text:
require File.expand_path("../../module", __FILE__)

describe Base do

  let(:email_predictor) { Base.new GIVEN_FORMATS }

  context 'I want to predict email addresses for new formats' do

    it 'should predict correctly when a correct format is present' do
      name, domain = "Peter Wong", "alphasights.com"
      email_predictor.context(CLIENTS)
      expect(email_predictor.predict(name, domain).first).to eq "peter.wong@alphasights.com"
    end

    it 'should predict multiple formats for multiple patterns' do
      name, domain = "Craig Silverstein", "google.com"
      email_predictor.context(CLIENTS)
      expect(email_predictor.predict(name, domain)).to eq ['craig.s@google.com', 'c.silverstein@google.com']
    end

    it 'should predict correctly when a correct format is present (try 2)' do
      name, domain = "Steve Wozniak", "apple.com"
      email_predictor.context(CLIENTS)
      expect(email_predictor.predict(name, domain).first).to eq "s.w@apple.com"
    end

    it 'should return no format' do
      name, domain = "Barack Obama", "whitehouse.gov"
      email_predictor.context(CLIENTS)
      expect(email_predictor.predict(name, domain)).to eq 'Can\'t predict email addresses for this data'
    end

  end
end