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

package com.google.analytics.admin.v1alpha;

/**
 *
 *
 * <pre>
 * A link between a GA4 property and a Display &amp; Video 360 advertiser.
 * </pre>
 *
 * Protobuf type {@code google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink}
 */
public final class DisplayVideo360AdvertiserLink extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink)
    DisplayVideo360AdvertiserLinkOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use DisplayVideo360AdvertiserLink.newBuilder() to construct.
  private DisplayVideo360AdvertiserLink(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private DisplayVideo360AdvertiserLink() {
    name_ = "";
    advertiserId_ = "";
    advertiserDisplayName_ = "";
  }

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

  @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.analytics.admin.v1alpha.ResourcesProto
        .internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLink_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.analytics.admin.v1alpha.ResourcesProto
        .internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLink_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.class,
            com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.Builder.class);
  }

  public static final int NAME_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The resource name for this DisplayVideo360AdvertiserLink
   * resource. Format:
   * properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId}
   * Note: linkId is not the Display &amp; Video 360 Advertiser ID
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @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;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The resource name for this DisplayVideo360AdvertiserLink
   * resource. Format:
   * properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId}
   * Note: linkId is not the Display &amp; Video 360 Advertiser ID
   * </pre>
   *
   * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @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 ADVERTISER_ID_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object advertiserId_ = "";
  /**
   *
   *
   * <pre>
   * Immutable. The Display &amp; Video 360 Advertiser's advertiser ID.
   * </pre>
   *
   * <code>string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
   *
   * @return The advertiserId.
   */
  @java.lang.Override
  public java.lang.String getAdvertiserId() {
    java.lang.Object ref = advertiserId_;
    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();
      advertiserId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Immutable. The Display &amp; Video 360 Advertiser's advertiser ID.
   * </pre>
   *
   * <code>string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
   *
   * @return The bytes for advertiserId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getAdvertiserIdBytes() {
    java.lang.Object ref = advertiserId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      advertiserId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ADVERTISER_DISPLAY_NAME_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private volatile java.lang.Object advertiserDisplayName_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The display name of the Display &amp; Video 360 Advertiser.
   * </pre>
   *
   * <code>string advertiser_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The advertiserDisplayName.
   */
  @java.lang.Override
  public java.lang.String getAdvertiserDisplayName() {
    java.lang.Object ref = advertiserDisplayName_;
    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();
      advertiserDisplayName_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The display name of the Display &amp; Video 360 Advertiser.
   * </pre>
   *
   * <code>string advertiser_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @return The bytes for advertiserDisplayName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getAdvertiserDisplayNameBytes() {
    java.lang.Object ref = advertiserDisplayName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      advertiserDisplayName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ADS_PERSONALIZATION_ENABLED_FIELD_NUMBER = 4;
  private com.google.protobuf.BoolValue adsPersonalizationEnabled_;
  /**
   *
   *
   * <pre>
   * Enables personalized advertising features with this integration.
   * If this field is not set on create/update, it will be defaulted to true.
   * </pre>
   *
   * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
   *
   * @return Whether the adsPersonalizationEnabled field is set.
   */
  @java.lang.Override
  public boolean hasAdsPersonalizationEnabled() {
    return adsPersonalizationEnabled_ != null;
  }
  /**
   *
   *
   * <pre>
   * Enables personalized advertising features with this integration.
   * If this field is not set on create/update, it will be defaulted to true.
   * </pre>
   *
   * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
   *
   * @return The adsPersonalizationEnabled.
   */
  @java.lang.Override
  public com.google.protobuf.BoolValue getAdsPersonalizationEnabled() {
    return adsPersonalizationEnabled_ == null
        ? com.google.protobuf.BoolValue.getDefaultInstance()
        : adsPersonalizationEnabled_;
  }
  /**
   *
   *
   * <pre>
   * Enables personalized advertising features with this integration.
   * If this field is not set on create/update, it will be defaulted to true.
   * </pre>
   *
   * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
   */
  @java.lang.Override
  public com.google.protobuf.BoolValueOrBuilder getAdsPersonalizationEnabledOrBuilder() {
    return adsPersonalizationEnabled_ == null
        ? com.google.protobuf.BoolValue.getDefaultInstance()
        : adsPersonalizationEnabled_;
  }

  public static final int CAMPAIGN_DATA_SHARING_ENABLED_FIELD_NUMBER = 5;
  private com.google.protobuf.BoolValue campaignDataSharingEnabled_;
  /**
   *
   *
   * <pre>
   * Immutable. Enables the import of campaign data from Display &amp; Video 360
   * into the GA4 property. After link creation, this can only be updated from
   * the Display &amp; Video 360 product. If this field is not set on create, it
   * will be defaulted to true.
   * </pre>
   *
   * <code>
   * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return Whether the campaignDataSharingEnabled field is set.
   */
  @java.lang.Override
  public boolean hasCampaignDataSharingEnabled() {
    return campaignDataSharingEnabled_ != null;
  }
  /**
   *
   *
   * <pre>
   * Immutable. Enables the import of campaign data from Display &amp; Video 360
   * into the GA4 property. After link creation, this can only be updated from
   * the Display &amp; Video 360 product. If this field is not set on create, it
   * will be defaulted to true.
   * </pre>
   *
   * <code>
   * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The campaignDataSharingEnabled.
   */
  @java.lang.Override
  public com.google.protobuf.BoolValue getCampaignDataSharingEnabled() {
    return campaignDataSharingEnabled_ == null
        ? com.google.protobuf.BoolValue.getDefaultInstance()
        : campaignDataSharingEnabled_;
  }
  /**
   *
   *
   * <pre>
   * Immutable. Enables the import of campaign data from Display &amp; Video 360
   * into the GA4 property. After link creation, this can only be updated from
   * the Display &amp; Video 360 product. If this field is not set on create, it
   * will be defaulted to true.
   * </pre>
   *
   * <code>
   * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.BoolValueOrBuilder getCampaignDataSharingEnabledOrBuilder() {
    return campaignDataSharingEnabled_ == null
        ? com.google.protobuf.BoolValue.getDefaultInstance()
        : campaignDataSharingEnabled_;
  }

  public static final int COST_DATA_SHARING_ENABLED_FIELD_NUMBER = 6;
  private com.google.protobuf.BoolValue costDataSharingEnabled_;
  /**
   *
   *
   * <pre>
   * Immutable. Enables the import of cost data from Display &amp; Video 360 into
   * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
   * is enabled. After link creation, this can only be updated from the Display
   * &amp; Video 360 product. If this field is not set on create, it will be
   * defaulted to true.
   * </pre>
   *
   * <code>
   * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return Whether the costDataSharingEnabled field is set.
   */
  @java.lang.Override
  public boolean hasCostDataSharingEnabled() {
    return costDataSharingEnabled_ != null;
  }
  /**
   *
   *
   * <pre>
   * Immutable. Enables the import of cost data from Display &amp; Video 360 into
   * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
   * is enabled. After link creation, this can only be updated from the Display
   * &amp; Video 360 product. If this field is not set on create, it will be
   * defaulted to true.
   * </pre>
   *
   * <code>
   * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
   * </code>
   *
   * @return The costDataSharingEnabled.
   */
  @java.lang.Override
  public com.google.protobuf.BoolValue getCostDataSharingEnabled() {
    return costDataSharingEnabled_ == null
        ? com.google.protobuf.BoolValue.getDefaultInstance()
        : costDataSharingEnabled_;
  }
  /**
   *
   *
   * <pre>
   * Immutable. Enables the import of cost data from Display &amp; Video 360 into
   * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
   * is enabled. After link creation, this can only be updated from the Display
   * &amp; Video 360 product. If this field is not set on create, it will be
   * defaulted to true.
   * </pre>
   *
   * <code>
   * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
   * </code>
   */
  @java.lang.Override
  public com.google.protobuf.BoolValueOrBuilder getCostDataSharingEnabledOrBuilder() {
    return costDataSharingEnabled_ == null
        ? com.google.protobuf.BoolValue.getDefaultInstance()
        : costDataSharingEnabled_;
  }

  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(advertiserId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, advertiserId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(advertiserDisplayName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, advertiserDisplayName_);
    }
    if (adsPersonalizationEnabled_ != null) {
      output.writeMessage(4, getAdsPersonalizationEnabled());
    }
    if (campaignDataSharingEnabled_ != null) {
      output.writeMessage(5, getCampaignDataSharingEnabled());
    }
    if (costDataSharingEnabled_ != null) {
      output.writeMessage(6, getCostDataSharingEnabled());
    }
    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(advertiserId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, advertiserId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(advertiserDisplayName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, advertiserDisplayName_);
    }
    if (adsPersonalizationEnabled_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              4, getAdsPersonalizationEnabled());
    }
    if (campaignDataSharingEnabled_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(
              5, getCampaignDataSharingEnabled());
    }
    if (costDataSharingEnabled_ != null) {
      size +=
          com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCostDataSharingEnabled());
    }
    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.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink)) {
      return super.equals(obj);
    }
    com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink other =
        (com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getAdvertiserId().equals(other.getAdvertiserId())) return false;
    if (!getAdvertiserDisplayName().equals(other.getAdvertiserDisplayName())) return false;
    if (hasAdsPersonalizationEnabled() != other.hasAdsPersonalizationEnabled()) return false;
    if (hasAdsPersonalizationEnabled()) {
      if (!getAdsPersonalizationEnabled().equals(other.getAdsPersonalizationEnabled()))
        return false;
    }
    if (hasCampaignDataSharingEnabled() != other.hasCampaignDataSharingEnabled()) return false;
    if (hasCampaignDataSharingEnabled()) {
      if (!getCampaignDataSharingEnabled().equals(other.getCampaignDataSharingEnabled()))
        return false;
    }
    if (hasCostDataSharingEnabled() != other.hasCostDataSharingEnabled()) return false;
    if (hasCostDataSharingEnabled()) {
      if (!getCostDataSharingEnabled().equals(other.getCostDataSharingEnabled())) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + ADVERTISER_ID_FIELD_NUMBER;
    hash = (53 * hash) + getAdvertiserId().hashCode();
    hash = (37 * hash) + ADVERTISER_DISPLAY_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getAdvertiserDisplayName().hashCode();
    if (hasAdsPersonalizationEnabled()) {
      hash = (37 * hash) + ADS_PERSONALIZATION_ENABLED_FIELD_NUMBER;
      hash = (53 * hash) + getAdsPersonalizationEnabled().hashCode();
    }
    if (hasCampaignDataSharingEnabled()) {
      hash = (37 * hash) + CAMPAIGN_DATA_SHARING_ENABLED_FIELD_NUMBER;
      hash = (53 * hash) + getCampaignDataSharingEnabled().hashCode();
    }
    if (hasCostDataSharingEnabled()) {
      hash = (37 * hash) + COST_DATA_SHARING_ENABLED_FIELD_NUMBER;
      hash = (53 * hash) + getCostDataSharingEnabled().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink 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.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink parseFrom(
      byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink 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.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink 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.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink 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.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

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

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * A link between a GA4 property and a Display &amp; Video 360 advertiser.
   * </pre>
   *
   * Protobuf type {@code google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink)
      com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.analytics.admin.v1alpha.ResourcesProto
          .internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLink_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.analytics.admin.v1alpha.ResourcesProto
          .internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLink_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.class,
              com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.Builder.class);
    }

    // Construct using com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      name_ = "";
      advertiserId_ = "";
      advertiserDisplayName_ = "";
      adsPersonalizationEnabled_ = null;
      if (adsPersonalizationEnabledBuilder_ != null) {
        adsPersonalizationEnabledBuilder_.dispose();
        adsPersonalizationEnabledBuilder_ = null;
      }
      campaignDataSharingEnabled_ = null;
      if (campaignDataSharingEnabledBuilder_ != null) {
        campaignDataSharingEnabledBuilder_.dispose();
        campaignDataSharingEnabledBuilder_ = null;
      }
      costDataSharingEnabled_ = null;
      if (costDataSharingEnabledBuilder_ != null) {
        costDataSharingEnabledBuilder_.dispose();
        costDataSharingEnabledBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.analytics.admin.v1alpha.ResourcesProto
          .internal_static_google_analytics_admin_v1alpha_DisplayVideo360AdvertiserLink_descriptor;
    }

    @java.lang.Override
    public com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink
        getDefaultInstanceForType() {
      return com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink build() {
      com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink buildPartial() {
      com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink result =
          new com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(
        com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.name_ = name_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.advertiserId_ = advertiserId_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.advertiserDisplayName_ = advertiserDisplayName_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.adsPersonalizationEnabled_ =
            adsPersonalizationEnabledBuilder_ == null
                ? adsPersonalizationEnabled_
                : adsPersonalizationEnabledBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.campaignDataSharingEnabled_ =
            campaignDataSharingEnabledBuilder_ == null
                ? campaignDataSharingEnabled_
                : campaignDataSharingEnabledBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.costDataSharingEnabled_ =
            costDataSharingEnabledBuilder_ == null
                ? costDataSharingEnabled_
                : costDataSharingEnabledBuilder_.build();
      }
    }

    @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.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink) {
        return mergeFrom((com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(
        com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink other) {
      if (other
          == com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.getDefaultInstance())
        return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      if (!other.getAdvertiserId().isEmpty()) {
        advertiserId_ = other.advertiserId_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (!other.getAdvertiserDisplayName().isEmpty()) {
        advertiserDisplayName_ = other.advertiserDisplayName_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (other.hasAdsPersonalizationEnabled()) {
        mergeAdsPersonalizationEnabled(other.getAdsPersonalizationEnabled());
      }
      if (other.hasCampaignDataSharingEnabled()) {
        mergeCampaignDataSharingEnabled(other.getCampaignDataSharingEnabled());
      }
      if (other.hasCostDataSharingEnabled()) {
        mergeCostDataSharingEnabled(other.getCostDataSharingEnabled());
      }
      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();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                advertiserId_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                advertiserDisplayName_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                input.readMessage(
                    getAdsPersonalizationEnabledFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            case 42:
              {
                input.readMessage(
                    getCampaignDataSharingEnabledFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000010;
                break;
              } // case 42
            case 50:
              {
                input.readMessage(
                    getCostDataSharingEnabledFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000020;
                break;
              } // case 50
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this DisplayVideo360AdvertiserLink
     * resource. Format:
     * properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId}
     * Note: linkId is not the Display &amp; Video 360 Advertiser ID
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this DisplayVideo360AdvertiserLink
     * resource. Format:
     * properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId}
     * Note: linkId is not the Display &amp; Video 360 Advertiser ID
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this DisplayVideo360AdvertiserLink
     * resource. Format:
     * properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId}
     * Note: linkId is not the Display &amp; Video 360 Advertiser ID
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this DisplayVideo360AdvertiserLink
     * resource. Format:
     * properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId}
     * Note: linkId is not the Display &amp; Video 360 Advertiser ID
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name for this DisplayVideo360AdvertiserLink
     * resource. Format:
     * properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId}
     * Note: linkId is not the Display &amp; Video 360 Advertiser ID
     * </pre>
     *
     * <code>string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    private java.lang.Object advertiserId_ = "";
    /**
     *
     *
     * <pre>
     * Immutable. The Display &amp; Video 360 Advertiser's advertiser ID.
     * </pre>
     *
     * <code>string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @return The advertiserId.
     */
    public java.lang.String getAdvertiserId() {
      java.lang.Object ref = advertiserId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        advertiserId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Immutable. The Display &amp; Video 360 Advertiser's advertiser ID.
     * </pre>
     *
     * <code>string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @return The bytes for advertiserId.
     */
    public com.google.protobuf.ByteString getAdvertiserIdBytes() {
      java.lang.Object ref = advertiserId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        advertiserId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Immutable. The Display &amp; Video 360 Advertiser's advertiser ID.
     * </pre>
     *
     * <code>string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @param value The advertiserId to set.
     * @return This builder for chaining.
     */
    public Builder setAdvertiserId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      advertiserId_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. The Display &amp; Video 360 Advertiser's advertiser ID.
     * </pre>
     *
     * <code>string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAdvertiserId() {
      advertiserId_ = getDefaultInstance().getAdvertiserId();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. The Display &amp; Video 360 Advertiser's advertiser ID.
     * </pre>
     *
     * <code>string advertiser_id = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     *
     * @param value The bytes for advertiserId to set.
     * @return This builder for chaining.
     */
    public Builder setAdvertiserIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      advertiserId_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private java.lang.Object advertiserDisplayName_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The display name of the Display &amp; Video 360 Advertiser.
     * </pre>
     *
     * <code>string advertiser_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The advertiserDisplayName.
     */
    public java.lang.String getAdvertiserDisplayName() {
      java.lang.Object ref = advertiserDisplayName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        advertiserDisplayName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The display name of the Display &amp; Video 360 Advertiser.
     * </pre>
     *
     * <code>string advertiser_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return The bytes for advertiserDisplayName.
     */
    public com.google.protobuf.ByteString getAdvertiserDisplayNameBytes() {
      java.lang.Object ref = advertiserDisplayName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        advertiserDisplayName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The display name of the Display &amp; Video 360 Advertiser.
     * </pre>
     *
     * <code>string advertiser_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The advertiserDisplayName to set.
     * @return This builder for chaining.
     */
    public Builder setAdvertiserDisplayName(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      advertiserDisplayName_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The display name of the Display &amp; Video 360 Advertiser.
     * </pre>
     *
     * <code>string advertiser_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearAdvertiserDisplayName() {
      advertiserDisplayName_ = getDefaultInstance().getAdvertiserDisplayName();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The display name of the Display &amp; Video 360 Advertiser.
     * </pre>
     *
     * <code>string advertiser_display_name = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @param value The bytes for advertiserDisplayName to set.
     * @return This builder for chaining.
     */
    public Builder setAdvertiserDisplayNameBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      advertiserDisplayName_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private com.google.protobuf.BoolValue adsPersonalizationEnabled_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.BoolValue,
            com.google.protobuf.BoolValue.Builder,
            com.google.protobuf.BoolValueOrBuilder>
        adsPersonalizationEnabledBuilder_;
    /**
     *
     *
     * <pre>
     * Enables personalized advertising features with this integration.
     * If this field is not set on create/update, it will be defaulted to true.
     * </pre>
     *
     * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
     *
     * @return Whether the adsPersonalizationEnabled field is set.
     */
    public boolean hasAdsPersonalizationEnabled() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Enables personalized advertising features with this integration.
     * If this field is not set on create/update, it will be defaulted to true.
     * </pre>
     *
     * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
     *
     * @return The adsPersonalizationEnabled.
     */
    public com.google.protobuf.BoolValue getAdsPersonalizationEnabled() {
      if (adsPersonalizationEnabledBuilder_ == null) {
        return adsPersonalizationEnabled_ == null
            ? com.google.protobuf.BoolValue.getDefaultInstance()
            : adsPersonalizationEnabled_;
      } else {
        return adsPersonalizationEnabledBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Enables personalized advertising features with this integration.
     * If this field is not set on create/update, it will be defaulted to true.
     * </pre>
     *
     * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
     */
    public Builder setAdsPersonalizationEnabled(com.google.protobuf.BoolValue value) {
      if (adsPersonalizationEnabledBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        adsPersonalizationEnabled_ = value;
      } else {
        adsPersonalizationEnabledBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Enables personalized advertising features with this integration.
     * If this field is not set on create/update, it will be defaulted to true.
     * </pre>
     *
     * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
     */
    public Builder setAdsPersonalizationEnabled(
        com.google.protobuf.BoolValue.Builder builderForValue) {
      if (adsPersonalizationEnabledBuilder_ == null) {
        adsPersonalizationEnabled_ = builderForValue.build();
      } else {
        adsPersonalizationEnabledBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Enables personalized advertising features with this integration.
     * If this field is not set on create/update, it will be defaulted to true.
     * </pre>
     *
     * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
     */
    public Builder mergeAdsPersonalizationEnabled(com.google.protobuf.BoolValue value) {
      if (adsPersonalizationEnabledBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && adsPersonalizationEnabled_ != null
            && adsPersonalizationEnabled_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
          getAdsPersonalizationEnabledBuilder().mergeFrom(value);
        } else {
          adsPersonalizationEnabled_ = value;
        }
      } else {
        adsPersonalizationEnabledBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Enables personalized advertising features with this integration.
     * If this field is not set on create/update, it will be defaulted to true.
     * </pre>
     *
     * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
     */
    public Builder clearAdsPersonalizationEnabled() {
      bitField0_ = (bitField0_ & ~0x00000008);
      adsPersonalizationEnabled_ = null;
      if (adsPersonalizationEnabledBuilder_ != null) {
        adsPersonalizationEnabledBuilder_.dispose();
        adsPersonalizationEnabledBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Enables personalized advertising features with this integration.
     * If this field is not set on create/update, it will be defaulted to true.
     * </pre>
     *
     * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
     */
    public com.google.protobuf.BoolValue.Builder getAdsPersonalizationEnabledBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getAdsPersonalizationEnabledFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Enables personalized advertising features with this integration.
     * If this field is not set on create/update, it will be defaulted to true.
     * </pre>
     *
     * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
     */
    public com.google.protobuf.BoolValueOrBuilder getAdsPersonalizationEnabledOrBuilder() {
      if (adsPersonalizationEnabledBuilder_ != null) {
        return adsPersonalizationEnabledBuilder_.getMessageOrBuilder();
      } else {
        return adsPersonalizationEnabled_ == null
            ? com.google.protobuf.BoolValue.getDefaultInstance()
            : adsPersonalizationEnabled_;
      }
    }
    /**
     *
     *
     * <pre>
     * Enables personalized advertising features with this integration.
     * If this field is not set on create/update, it will be defaulted to true.
     * </pre>
     *
     * <code>.google.protobuf.BoolValue ads_personalization_enabled = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.BoolValue,
            com.google.protobuf.BoolValue.Builder,
            com.google.protobuf.BoolValueOrBuilder>
        getAdsPersonalizationEnabledFieldBuilder() {
      if (adsPersonalizationEnabledBuilder_ == null) {
        adsPersonalizationEnabledBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.BoolValue,
                com.google.protobuf.BoolValue.Builder,
                com.google.protobuf.BoolValueOrBuilder>(
                getAdsPersonalizationEnabled(), getParentForChildren(), isClean());
        adsPersonalizationEnabled_ = null;
      }
      return adsPersonalizationEnabledBuilder_;
    }

    private com.google.protobuf.BoolValue campaignDataSharingEnabled_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.BoolValue,
            com.google.protobuf.BoolValue.Builder,
            com.google.protobuf.BoolValueOrBuilder>
        campaignDataSharingEnabledBuilder_;
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of campaign data from Display &amp; Video 360
     * into the GA4 property. After link creation, this can only be updated from
     * the Display &amp; Video 360 product. If this field is not set on create, it
     * will be defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return Whether the campaignDataSharingEnabled field is set.
     */
    public boolean hasCampaignDataSharingEnabled() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of campaign data from Display &amp; Video 360
     * into the GA4 property. After link creation, this can only be updated from
     * the Display &amp; Video 360 product. If this field is not set on create, it
     * will be defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The campaignDataSharingEnabled.
     */
    public com.google.protobuf.BoolValue getCampaignDataSharingEnabled() {
      if (campaignDataSharingEnabledBuilder_ == null) {
        return campaignDataSharingEnabled_ == null
            ? com.google.protobuf.BoolValue.getDefaultInstance()
            : campaignDataSharingEnabled_;
      } else {
        return campaignDataSharingEnabledBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of campaign data from Display &amp; Video 360
     * into the GA4 property. After link creation, this can only be updated from
     * the Display &amp; Video 360 product. If this field is not set on create, it
     * will be defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setCampaignDataSharingEnabled(com.google.protobuf.BoolValue value) {
      if (campaignDataSharingEnabledBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        campaignDataSharingEnabled_ = value;
      } else {
        campaignDataSharingEnabledBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of campaign data from Display &amp; Video 360
     * into the GA4 property. After link creation, this can only be updated from
     * the Display &amp; Video 360 product. If this field is not set on create, it
     * will be defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setCampaignDataSharingEnabled(
        com.google.protobuf.BoolValue.Builder builderForValue) {
      if (campaignDataSharingEnabledBuilder_ == null) {
        campaignDataSharingEnabled_ = builderForValue.build();
      } else {
        campaignDataSharingEnabledBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of campaign data from Display &amp; Video 360
     * into the GA4 property. After link creation, this can only be updated from
     * the Display &amp; Video 360 product. If this field is not set on create, it
     * will be defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder mergeCampaignDataSharingEnabled(com.google.protobuf.BoolValue value) {
      if (campaignDataSharingEnabledBuilder_ == null) {
        if (((bitField0_ & 0x00000010) != 0)
            && campaignDataSharingEnabled_ != null
            && campaignDataSharingEnabled_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
          getCampaignDataSharingEnabledBuilder().mergeFrom(value);
        } else {
          campaignDataSharingEnabled_ = value;
        }
      } else {
        campaignDataSharingEnabledBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of campaign data from Display &amp; Video 360
     * into the GA4 property. After link creation, this can only be updated from
     * the Display &amp; Video 360 product. If this field is not set on create, it
     * will be defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder clearCampaignDataSharingEnabled() {
      bitField0_ = (bitField0_ & ~0x00000010);
      campaignDataSharingEnabled_ = null;
      if (campaignDataSharingEnabledBuilder_ != null) {
        campaignDataSharingEnabledBuilder_.dispose();
        campaignDataSharingEnabledBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of campaign data from Display &amp; Video 360
     * into the GA4 property. After link creation, this can only be updated from
     * the Display &amp; Video 360 product. If this field is not set on create, it
     * will be defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.protobuf.BoolValue.Builder getCampaignDataSharingEnabledBuilder() {
      bitField0_ |= 0x00000010;
      onChanged();
      return getCampaignDataSharingEnabledFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of campaign data from Display &amp; Video 360
     * into the GA4 property. After link creation, this can only be updated from
     * the Display &amp; Video 360 product. If this field is not set on create, it
     * will be defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.protobuf.BoolValueOrBuilder getCampaignDataSharingEnabledOrBuilder() {
      if (campaignDataSharingEnabledBuilder_ != null) {
        return campaignDataSharingEnabledBuilder_.getMessageOrBuilder();
      } else {
        return campaignDataSharingEnabled_ == null
            ? com.google.protobuf.BoolValue.getDefaultInstance()
            : campaignDataSharingEnabled_;
      }
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of campaign data from Display &amp; Video 360
     * into the GA4 property. After link creation, this can only be updated from
     * the Display &amp; Video 360 product. If this field is not set on create, it
     * will be defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.BoolValue,
            com.google.protobuf.BoolValue.Builder,
            com.google.protobuf.BoolValueOrBuilder>
        getCampaignDataSharingEnabledFieldBuilder() {
      if (campaignDataSharingEnabledBuilder_ == null) {
        campaignDataSharingEnabledBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.BoolValue,
                com.google.protobuf.BoolValue.Builder,
                com.google.protobuf.BoolValueOrBuilder>(
                getCampaignDataSharingEnabled(), getParentForChildren(), isClean());
        campaignDataSharingEnabled_ = null;
      }
      return campaignDataSharingEnabledBuilder_;
    }

    private com.google.protobuf.BoolValue costDataSharingEnabled_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.BoolValue,
            com.google.protobuf.BoolValue.Builder,
            com.google.protobuf.BoolValueOrBuilder>
        costDataSharingEnabledBuilder_;
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of cost data from Display &amp; Video 360 into
     * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
     * is enabled. After link creation, this can only be updated from the Display
     * &amp; Video 360 product. If this field is not set on create, it will be
     * defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return Whether the costDataSharingEnabled field is set.
     */
    public boolean hasCostDataSharingEnabled() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of cost data from Display &amp; Video 360 into
     * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
     * is enabled. After link creation, this can only be updated from the Display
     * &amp; Video 360 product. If this field is not set on create, it will be
     * defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     *
     * @return The costDataSharingEnabled.
     */
    public com.google.protobuf.BoolValue getCostDataSharingEnabled() {
      if (costDataSharingEnabledBuilder_ == null) {
        return costDataSharingEnabled_ == null
            ? com.google.protobuf.BoolValue.getDefaultInstance()
            : costDataSharingEnabled_;
      } else {
        return costDataSharingEnabledBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of cost data from Display &amp; Video 360 into
     * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
     * is enabled. After link creation, this can only be updated from the Display
     * &amp; Video 360 product. If this field is not set on create, it will be
     * defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setCostDataSharingEnabled(com.google.protobuf.BoolValue value) {
      if (costDataSharingEnabledBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        costDataSharingEnabled_ = value;
      } else {
        costDataSharingEnabledBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of cost data from Display &amp; Video 360 into
     * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
     * is enabled. After link creation, this can only be updated from the Display
     * &amp; Video 360 product. If this field is not set on create, it will be
     * defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder setCostDataSharingEnabled(
        com.google.protobuf.BoolValue.Builder builderForValue) {
      if (costDataSharingEnabledBuilder_ == null) {
        costDataSharingEnabled_ = builderForValue.build();
      } else {
        costDataSharingEnabledBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of cost data from Display &amp; Video 360 into
     * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
     * is enabled. After link creation, this can only be updated from the Display
     * &amp; Video 360 product. If this field is not set on create, it will be
     * defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder mergeCostDataSharingEnabled(com.google.protobuf.BoolValue value) {
      if (costDataSharingEnabledBuilder_ == null) {
        if (((bitField0_ & 0x00000020) != 0)
            && costDataSharingEnabled_ != null
            && costDataSharingEnabled_ != com.google.protobuf.BoolValue.getDefaultInstance()) {
          getCostDataSharingEnabledBuilder().mergeFrom(value);
        } else {
          costDataSharingEnabled_ = value;
        }
      } else {
        costDataSharingEnabledBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of cost data from Display &amp; Video 360 into
     * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
     * is enabled. After link creation, this can only be updated from the Display
     * &amp; Video 360 product. If this field is not set on create, it will be
     * defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public Builder clearCostDataSharingEnabled() {
      bitField0_ = (bitField0_ & ~0x00000020);
      costDataSharingEnabled_ = null;
      if (costDataSharingEnabledBuilder_ != null) {
        costDataSharingEnabledBuilder_.dispose();
        costDataSharingEnabledBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of cost data from Display &amp; Video 360 into
     * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
     * is enabled. After link creation, this can only be updated from the Display
     * &amp; Video 360 product. If this field is not set on create, it will be
     * defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.protobuf.BoolValue.Builder getCostDataSharingEnabledBuilder() {
      bitField0_ |= 0x00000020;
      onChanged();
      return getCostDataSharingEnabledFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of cost data from Display &amp; Video 360 into
     * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
     * is enabled. After link creation, this can only be updated from the Display
     * &amp; Video 360 product. If this field is not set on create, it will be
     * defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    public com.google.protobuf.BoolValueOrBuilder getCostDataSharingEnabledOrBuilder() {
      if (costDataSharingEnabledBuilder_ != null) {
        return costDataSharingEnabledBuilder_.getMessageOrBuilder();
      } else {
        return costDataSharingEnabled_ == null
            ? com.google.protobuf.BoolValue.getDefaultInstance()
            : costDataSharingEnabled_;
      }
    }
    /**
     *
     *
     * <pre>
     * Immutable. Enables the import of cost data from Display &amp; Video 360 into
     * the GA4 property. This can only be enabled if campaign_data_sharing_enabled
     * is enabled. After link creation, this can only be updated from the Display
     * &amp; Video 360 product. If this field is not set on create, it will be
     * defaulted to true.
     * </pre>
     *
     * <code>
     * .google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(.google.api.field_behavior) = IMMUTABLE];
     * </code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.BoolValue,
            com.google.protobuf.BoolValue.Builder,
            com.google.protobuf.BoolValueOrBuilder>
        getCostDataSharingEnabledFieldBuilder() {
      if (costDataSharingEnabledBuilder_ == null) {
        costDataSharingEnabledBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.BoolValue,
                com.google.protobuf.BoolValue.Builder,
                com.google.protobuf.BoolValueOrBuilder>(
                getCostDataSharingEnabled(), getParentForChildren(), isClean());
        costDataSharingEnabled_ = null;
      }
      return costDataSharingEnabledBuilder_;
    }

    @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.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink)
  }

  // @@protoc_insertion_point(class_scope:google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink)
  private static final com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink
      DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink();
  }

  public static com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink
      getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public com.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink
      getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
