text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v12/resources/feed_item_target.proto

package com.google.ads.googleads.v12.resources;

/**
 *

 * A feed item target.
 *

 *
 * Protobuf type {@code google.ads.googleads.v12.resources.FeedItemTarget}
 */
public final class FeedItemTarget extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.ads.googleads.v12.resources.FeedItemTarget)
    FeedItemTargetOrBuilder {
private static final long serialVersionUID = 0L;
  // Use FeedItemTarget.newBuilder() to construct.
  private FeedItemTarget(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private FeedItemTarget() {
    resourceName_ = "";
    feedItem_ = "";
    feedItemTargetType_ = 0;
    status_ = 0;
  }

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

  @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.ads.googleads.v12.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v12_resources_FeedItemTarget_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.ads.googleads.v12.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v12_resources_FeedItemTarget_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.ads.googleads.v12.resources.FeedItemTarget.class, com.google.ads.googleads.v12.resources.FeedItemTarget.Builder.class);
  }

  private int bitField0_;
  private int targetCase_ = 0;
  private java.lang.Object target_;
  public enum TargetCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    CAMPAIGN(14),
    AD_GROUP(15),
    KEYWORD(7),
    GEO_TARGET_CONSTANT(16),
    DEVICE(9),
    AD_SCHEDULE(10),
    TARGET_NOT_SET(0);
    private final int value;
    private TargetCase(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 TargetCase valueOf(int value) {
      return forNumber(value);
    }

    public static TargetCase forNumber(int value) {
      switch (value) {
        case 14: return CAMPAIGN;
        case 15: return AD_GROUP;
        case 7: return KEYWORD;
        case 16: return GEO_TARGET_CONSTANT;
        case 9: return DEVICE;
        case 10: return AD_SCHEDULE;
        case 0: return TARGET_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public TargetCase
  getTargetCase() {
    return TargetCase.forNumber(
        targetCase_);
  }

  public static final int RESOURCE_NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object resourceName_;
  /**
   *

   * Immutable. The resource name of the feed item target.
   * Feed item target resource names have the form:
   * `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
   *

   *
   * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The resourceName.
   */
  @java.lang.Override
  public java.lang.String getResourceName() {
    java.lang.Object ref = resourceName_;
    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();
      resourceName_ = s;
      return s;
    }
  }
  /**
   *

   * Immutable. The resource name of the feed item target.
   * Feed item target resource names have the form:
   * `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
   *

   *
   * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The bytes for resourceName.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getResourceNameBytes() {
    java.lang.Object ref = resourceName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      resourceName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FEED_ITEM_FIELD_NUMBER = 12;
  private volatile java.lang.Object feedItem_;
  /**
   *

   * Immutable. The feed item to which this feed item target belongs.
   *

   *
   * optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return Whether the feedItem field is set.
   */
  @java.lang.Override
  public boolean hasFeedItem() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   *

   * Immutable. The feed item to which this feed item target belongs.
   *

   *
   * optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The feedItem.
   */
  @java.lang.Override
  public java.lang.String getFeedItem() {
    java.lang.Object ref = feedItem_;
    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();
      feedItem_ = s;
      return s;
    }
  }
  /**
   *

   * Immutable. The feed item to which this feed item target belongs.
   *

   *
   * optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The bytes for feedItem.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getFeedItemBytes() {
    java.lang.Object ref = feedItem_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      feedItem_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FEED_ITEM_TARGET_TYPE_FIELD_NUMBER = 3;
  private int feedItemTargetType_;
  /**
   *

   * Output only. The target type of this feed item target. This field is read-only.
   *

   *
   * .google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The enum numeric value on the wire for feedItemTargetType.
   */
  @java.lang.Override public int getFeedItemTargetTypeValue() {
    return feedItemTargetType_;
  }
  /**
   *

   * Output only. The target type of this feed item target. This field is read-only.
   *

   *
   * .google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The feedItemTargetType.
   */
  @java.lang.Override public com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType getFeedItemTargetType() {
    @SuppressWarnings("deprecation")
    com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType result = com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType.valueOf(feedItemTargetType_);
    return result == null ? com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType.UNRECOGNIZED : result;
  }

  public static final int FEED_ITEM_TARGET_ID_FIELD_NUMBER = 13;
  private long feedItemTargetId_;
  /**
   *

   * Output only. The ID of the targeted resource. This field is read-only.
   *

   *
   * optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return Whether the feedItemTargetId field is set.
   */
  @java.lang.Override
  public boolean hasFeedItemTargetId() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   *

   * Output only. The ID of the targeted resource. This field is read-only.
   *

   *
   * optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The feedItemTargetId.
   */
  @java.lang.Override
  public long getFeedItemTargetId() {
    return feedItemTargetId_;
  }

  public static final int STATUS_FIELD_NUMBER = 11;
  private int status_;
  /**
   *

   * Output only. Status of the feed item target.
   * This field is read-only.
   *

   *
   * .google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The enum numeric value on the wire for status.
   */
  @java.lang.Override public int getStatusValue() {
    return status_;
  }
  /**
   *

   * Output only. Status of the feed item target.
   * This field is read-only.
   *

   *
   * .google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
   * @return The status.
   */
  @java.lang.Override public com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus getStatus() {
    @SuppressWarnings("deprecation")
    com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus result = com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.valueOf(status_);
    return result == null ? com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.UNRECOGNIZED : result;
  }

  public static final int CAMPAIGN_FIELD_NUMBER = 14;
  /**
   *

   * Immutable. The targeted campaign.
   *

   *
   * string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return Whether the campaign field is set.
   */
  public boolean hasCampaign() {
    return targetCase_ == 14;
  }
  /**
   *

   * Immutable. The targeted campaign.
   *

   *
   * string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The campaign.
   */
  public java.lang.String getCampaign() {
    java.lang.Object ref = "";
    if (targetCase_ == 14) {
      ref = target_;
    }
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (targetCase_ == 14) {
        target_ = s;
      }
      return s;
    }
  }
  /**
   *

   * Immutable. The targeted campaign.
   *

   *
   * string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The bytes for campaign.
   */
  public com.google.protobuf.ByteString
      getCampaignBytes() {
    java.lang.Object ref = "";
    if (targetCase_ == 14) {
      ref = target_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (targetCase_ == 14) {
        target_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int AD_GROUP_FIELD_NUMBER = 15;
  /**
   *

   * Immutable. The targeted ad group.
   *

   *
   * string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return Whether the adGroup field is set.
   */
  public boolean hasAdGroup() {
    return targetCase_ == 15;
  }
  /**
   *

   * Immutable. The targeted ad group.
   *

   *
   * string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The adGroup.
   */
  public java.lang.String getAdGroup() {
    java.lang.Object ref = "";
    if (targetCase_ == 15) {
      ref = target_;
    }
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (targetCase_ == 15) {
        target_ = s;
      }
      return s;
    }
  }
  /**
   *

   * Immutable. The targeted ad group.
   *

   *
   * string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The bytes for adGroup.
   */
  public com.google.protobuf.ByteString
      getAdGroupBytes() {
    java.lang.Object ref = "";
    if (targetCase_ == 15) {
      ref = target_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (targetCase_ == 15) {
        target_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int KEYWORD_FIELD_NUMBER = 7;
  /**
   *

   * Immutable. The targeted keyword.
   *

   *
   * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
   * @return Whether the keyword field is set.
   */
  @java.lang.Override
  public boolean hasKeyword() {
    return targetCase_ == 7;
  }
  /**
   *

   * Immutable. The targeted keyword.
   *

   *
   * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The keyword.
   */
  @java.lang.Override
  public com.google.ads.googleads.v12.common.KeywordInfo getKeyword() {
    if (targetCase_ == 7) {
       return (com.google.ads.googleads.v12.common.KeywordInfo) target_;
    }
    return com.google.ads.googleads.v12.common.KeywordInfo.getDefaultInstance();
  }
  /**
   *

   * Immutable. The targeted keyword.
   *

   *
   * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
   */
  @java.lang.Override
  public com.google.ads.googleads.v12.common.KeywordInfoOrBuilder getKeywordOrBuilder() {
    if (targetCase_ == 7) {
       return (com.google.ads.googleads.v12.common.KeywordInfo) target_;
    }
    return com.google.ads.googleads.v12.common.KeywordInfo.getDefaultInstance();
  }

  public static final int GEO_TARGET_CONSTANT_FIELD_NUMBER = 16;
  /**
   *

   * Immutable. The targeted geo target constant resource name.
   *

   *
   * string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return Whether the geoTargetConstant field is set.
   */
  public boolean hasGeoTargetConstant() {
    return targetCase_ == 16;
  }
  /**
   *

   * Immutable. The targeted geo target constant resource name.
   *

   *
   * string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The geoTargetConstant.
   */
  public java.lang.String getGeoTargetConstant() {
    java.lang.Object ref = "";
    if (targetCase_ == 16) {
      ref = target_;
    }
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (targetCase_ == 16) {
        target_ = s;
      }
      return s;
    }
  }
  /**
   *

   * Immutable. The targeted geo target constant resource name.
   *

   *
   * string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
   * @return The bytes for geoTargetConstant.
   */
  public com.google.protobuf.ByteString
      getGeoTargetConstantBytes() {
    java.lang.Object ref = "";
    if (targetCase_ == 16) {
      ref = target_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (targetCase_ == 16) {
        target_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

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

   * Immutable. The targeted device.
   *

   *
   * .google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
   * @return Whether the device field is set.
   */
  public boolean hasDevice() {
    return targetCase_ == 9;
  }
  /**
   *

   * Immutable. The targeted device.
   *

   *
   * .google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The enum numeric value on the wire for device.
   */
  public int getDeviceValue() {
    if (targetCase_ == 9) {
      return (java.lang.Integer) target_;
    }
    return 0;
  }
  /**
   *

   * Immutable. The targeted device.
   *

   *
   * .google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The device.
   */
  public com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice getDevice() {
    if (targetCase_ == 9) {
      @SuppressWarnings("deprecation")
      com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice result = com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.valueOf(
          (java.lang.Integer) target_);
      return result == null ? com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.UNRECOGNIZED : result;
    }
    return com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.UNSPECIFIED;
  }

  public static final int AD_SCHEDULE_FIELD_NUMBER = 10;
  /**
   *

   * Immutable. The targeted schedule.
   *

   *
   * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
   * @return Whether the adSchedule field is set.
   */
  @java.lang.Override
  public boolean hasAdSchedule() {
    return targetCase_ == 10;
  }
  /**
   *

   * Immutable. The targeted schedule.
   *

   *
   * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
   * @return The adSchedule.
   */
  @java.lang.Override
  public com.google.ads.googleads.v12.common.AdScheduleInfo getAdSchedule() {
    if (targetCase_ == 10) {
       return (com.google.ads.googleads.v12.common.AdScheduleInfo) target_;
    }
    return com.google.ads.googleads.v12.common.AdScheduleInfo.getDefaultInstance();
  }
  /**
   *

   * Immutable. The targeted schedule.
   *

   *
   * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
   */
  @java.lang.Override
  public com.google.ads.googleads.v12.common.AdScheduleInfoOrBuilder getAdScheduleOrBuilder() {
    if (targetCase_ == 10) {
       return (com.google.ads.googleads.v12.common.AdScheduleInfo) target_;
    }
    return com.google.ads.googleads.v12.common.AdScheduleInfo.getDefaultInstance();
  }

  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(resourceName_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceName_);
    }
    if (feedItemTargetType_ != com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType.UNSPECIFIED.getNumber()) {
      output.writeEnum(3, feedItemTargetType_);
    }
    if (targetCase_ == 7) {
      output.writeMessage(7, (com.google.ads.googleads.v12.common.KeywordInfo) target_);
    }
    if (targetCase_ == 9) {
      output.writeEnum(9, ((java.lang.Integer) target_));
    }
    if (targetCase_ == 10) {
      output.writeMessage(10, (com.google.ads.googleads.v12.common.AdScheduleInfo) target_);
    }
    if (status_ != com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.UNSPECIFIED.getNumber()) {
      output.writeEnum(11, status_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, feedItem_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeInt64(13, feedItemTargetId_);
    }
    if (targetCase_ == 14) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 14, target_);
    }
    if (targetCase_ == 15) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 15, target_);
    }
    if (targetCase_ == 16) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, target_);
    }
    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(resourceName_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceName_);
    }
    if (feedItemTargetType_ != com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType.UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(3, feedItemTargetType_);
    }
    if (targetCase_ == 7) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, (com.google.ads.googleads.v12.common.KeywordInfo) target_);
    }
    if (targetCase_ == 9) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(9, ((java.lang.Integer) target_));
    }
    if (targetCase_ == 10) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(10, (com.google.ads.googleads.v12.common.AdScheduleInfo) target_);
    }
    if (status_ != com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(11, status_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, feedItem_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(13, feedItemTargetId_);
    }
    if (targetCase_ == 14) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, target_);
    }
    if (targetCase_ == 15) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, target_);
    }
    if (targetCase_ == 16) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, target_);
    }
    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.ads.googleads.v12.resources.FeedItemTarget)) {
      return super.equals(obj);
    }
    com.google.ads.googleads.v12.resources.FeedItemTarget other = (com.google.ads.googleads.v12.resources.FeedItemTarget) obj;

    if (!getResourceName()
        .equals(other.getResourceName())) return false;
    if (hasFeedItem() != other.hasFeedItem()) return false;
    if (hasFeedItem()) {
      if (!getFeedItem()
          .equals(other.getFeedItem())) return false;
    }
    if (feedItemTargetType_ != other.feedItemTargetType_) return false;
    if (hasFeedItemTargetId() != other.hasFeedItemTargetId()) return false;
    if (hasFeedItemTargetId()) {
      if (getFeedItemTargetId()
          != other.getFeedItemTargetId()) return false;
    }
    if (status_ != other.status_) return false;
    if (!getTargetCase().equals(other.getTargetCase())) return false;
    switch (targetCase_) {
      case 14:
        if (!getCampaign()
            .equals(other.getCampaign())) return false;
        break;
      case 15:
        if (!getAdGroup()
            .equals(other.getAdGroup())) return false;
        break;
      case 7:
        if (!getKeyword()
            .equals(other.getKeyword())) return false;
        break;
      case 16:
        if (!getGeoTargetConstant()
            .equals(other.getGeoTargetConstant())) return false;
        break;
      case 9:
        if (getDeviceValue()
            != other.getDeviceValue()) return false;
        break;
      case 10:
        if (!getAdSchedule()
            .equals(other.getAdSchedule())) 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) + RESOURCE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getResourceName().hashCode();
    if (hasFeedItem()) {
      hash = (37 * hash) + FEED_ITEM_FIELD_NUMBER;
      hash = (53 * hash) + getFeedItem().hashCode();
    }
    hash = (37 * hash) + FEED_ITEM_TARGET_TYPE_FIELD_NUMBER;
    hash = (53 * hash) + feedItemTargetType_;
    if (hasFeedItemTargetId()) {
      hash = (37 * hash) + FEED_ITEM_TARGET_ID_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getFeedItemTargetId());
    }
    hash = (37 * hash) + STATUS_FIELD_NUMBER;
    hash = (53 * hash) + status_;
    switch (targetCase_) {
      case 14:
        hash = (37 * hash) + CAMPAIGN_FIELD_NUMBER;
        hash = (53 * hash) + getCampaign().hashCode();
        break;
      case 15:
        hash = (37 * hash) + AD_GROUP_FIELD_NUMBER;
        hash = (53 * hash) + getAdGroup().hashCode();
        break;
      case 7:
        hash = (37 * hash) + KEYWORD_FIELD_NUMBER;
        hash = (53 * hash) + getKeyword().hashCode();
        break;
      case 16:
        hash = (37 * hash) + GEO_TARGET_CONSTANT_FIELD_NUMBER;
        hash = (53 * hash) + getGeoTargetConstant().hashCode();
        break;
      case 9:
        hash = (37 * hash) + DEVICE_FIELD_NUMBER;
        hash = (53 * hash) + getDeviceValue();
        break;
      case 10:
        hash = (37 * hash) + AD_SCHEDULE_FIELD_NUMBER;
        hash = (53 * hash) + getAdSchedule().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.ads.googleads.v12.resources.FeedItemTarget parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v12.resources.FeedItemTarget parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.ads.googleads.v12.resources.FeedItemTarget parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v12.resources.FeedItemTarget 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.ads.googleads.v12.resources.FeedItemTarget parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v12.resources.FeedItemTarget parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.ads.googleads.v12.resources.FeedItemTarget parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v12.resources.FeedItemTarget 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.ads.googleads.v12.resources.FeedItemTarget parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v12.resources.FeedItemTarget 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.ads.googleads.v12.resources.FeedItemTarget parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v12.resources.FeedItemTarget 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.ads.googleads.v12.resources.FeedItemTarget 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 feed item target.
   *

   *
   * Protobuf type {@code google.ads.googleads.v12.resources.FeedItemTarget}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.ads.googleads.v12.resources.FeedItemTarget)
      com.google.ads.googleads.v12.resources.FeedItemTargetOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.ads.googleads.v12.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v12_resources_FeedItemTarget_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.ads.googleads.v12.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v12_resources_FeedItemTarget_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.ads.googleads.v12.resources.FeedItemTarget.class, com.google.ads.googleads.v12.resources.FeedItemTarget.Builder.class);
    }

    // Construct using com.google.ads.googleads.v12.resources.FeedItemTarget.newBuilder()
    private Builder() {

    }

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

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

      feedItem_ = "";
      bitField0_ = (bitField0_ & ~0x00000001);
      feedItemTargetType_ = 0;

      feedItemTargetId_ = 0L;
      bitField0_ = (bitField0_ & ~0x00000002);
      status_ = 0;

      if (keywordBuilder_ != null) {
        keywordBuilder_.clear();
      }
      if (adScheduleBuilder_ != null) {
        adScheduleBuilder_.clear();
      }
      targetCase_ = 0;
      target_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.ads.googleads.v12.resources.FeedItemTargetProto.internal_static_google_ads_googleads_v12_resources_FeedItemTarget_descriptor;
    }

    @java.lang.Override
    public com.google.ads.googleads.v12.resources.FeedItemTarget getDefaultInstanceForType() {
      return com.google.ads.googleads.v12.resources.FeedItemTarget.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.ads.googleads.v12.resources.FeedItemTarget build() {
      com.google.ads.googleads.v12.resources.FeedItemTarget result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.ads.googleads.v12.resources.FeedItemTarget buildPartial() {
      com.google.ads.googleads.v12.resources.FeedItemTarget result = new com.google.ads.googleads.v12.resources.FeedItemTarget(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.resourceName_ = resourceName_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        to_bitField0_ |= 0x00000001;
      }
      result.feedItem_ = feedItem_;
      result.feedItemTargetType_ = feedItemTargetType_;
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.feedItemTargetId_ = feedItemTargetId_;
        to_bitField0_ |= 0x00000002;
      }
      result.status_ = status_;
      if (targetCase_ == 14) {
        result.target_ = target_;
      }
      if (targetCase_ == 15) {
        result.target_ = target_;
      }
      if (targetCase_ == 7) {
        if (keywordBuilder_ == null) {
          result.target_ = target_;
        } else {
          result.target_ = keywordBuilder_.build();
        }
      }
      if (targetCase_ == 16) {
        result.target_ = target_;
      }
      if (targetCase_ == 9) {
        result.target_ = target_;
      }
      if (targetCase_ == 10) {
        if (adScheduleBuilder_ == null) {
          result.target_ = target_;
        } else {
          result.target_ = adScheduleBuilder_.build();
        }
      }
      result.bitField0_ = to_bitField0_;
      result.targetCase_ = targetCase_;
      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.ads.googleads.v12.resources.FeedItemTarget) {
        return mergeFrom((com.google.ads.googleads.v12.resources.FeedItemTarget)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.ads.googleads.v12.resources.FeedItemTarget other) {
      if (other == com.google.ads.googleads.v12.resources.FeedItemTarget.getDefaultInstance()) return this;
      if (!other.getResourceName().isEmpty()) {
        resourceName_ = other.resourceName_;
        onChanged();
      }
      if (other.hasFeedItem()) {
        bitField0_ |= 0x00000001;
        feedItem_ = other.feedItem_;
        onChanged();
      }
      if (other.feedItemTargetType_ != 0) {
        setFeedItemTargetTypeValue(other.getFeedItemTargetTypeValue());
      }
      if (other.hasFeedItemTargetId()) {
        setFeedItemTargetId(other.getFeedItemTargetId());
      }
      if (other.status_ != 0) {
        setStatusValue(other.getStatusValue());
      }
      switch (other.getTargetCase()) {
        case CAMPAIGN: {
          targetCase_ = 14;
          target_ = other.target_;
          onChanged();
          break;
        }
        case AD_GROUP: {
          targetCase_ = 15;
          target_ = other.target_;
          onChanged();
          break;
        }
        case KEYWORD: {
          mergeKeyword(other.getKeyword());
          break;
        }
        case GEO_TARGET_CONSTANT: {
          targetCase_ = 16;
          target_ = other.target_;
          onChanged();
          break;
        }
        case DEVICE: {
          setDeviceValue(other.getDeviceValue());
          break;
        }
        case AD_SCHEDULE: {
          mergeAdSchedule(other.getAdSchedule());
          break;
        }
        case TARGET_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: {
              resourceName_ = input.readStringRequireUtf8();

              break;
            } // case 10
            case 24: {
              feedItemTargetType_ = input.readEnum();

              break;
            } // case 24
            case 58: {
              input.readMessage(
                  getKeywordFieldBuilder().getBuilder(),
                  extensionRegistry);
              targetCase_ = 7;
              break;
            } // case 58
            case 72: {
              int rawValue = input.readEnum();
              targetCase_ = 9;
              target_ = rawValue;
              break;
            } // case 72
            case 82: {
              input.readMessage(
                  getAdScheduleFieldBuilder().getBuilder(),
                  extensionRegistry);
              targetCase_ = 10;
              break;
            } // case 82
            case 88: {
              status_ = input.readEnum();

              break;
            } // case 88
            case 98: {
              feedItem_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000001;
              break;
            } // case 98
            case 104: {
              feedItemTargetId_ = input.readInt64();
              bitField0_ |= 0x00000002;
              break;
            } // case 104
            case 114: {
              java.lang.String s = input.readStringRequireUtf8();
              targetCase_ = 14;
              target_ = s;
              break;
            } // case 114
            case 122: {
              java.lang.String s = input.readStringRequireUtf8();
              targetCase_ = 15;
              target_ = s;
              break;
            } // case 122
            case 130: {
              java.lang.String s = input.readStringRequireUtf8();
              targetCase_ = 16;
              target_ = s;
              break;
            } // case 130
            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 targetCase_ = 0;
    private java.lang.Object target_;
    public TargetCase
        getTargetCase() {
      return TargetCase.forNumber(
          targetCase_);
    }

    public Builder clearTarget() {
      targetCase_ = 0;
      target_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

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

     * Immutable. The resource name of the feed item target.
     * Feed item target resource names have the form:
     * `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
     *

     *
     * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The resourceName.
     */
    public java.lang.String getResourceName() {
      java.lang.Object ref = resourceName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        resourceName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *

     * Immutable. The resource name of the feed item target.
     * Feed item target resource names have the form:
     * `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
     *

     *
     * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The bytes for resourceName.
     */
    public com.google.protobuf.ByteString
        getResourceNameBytes() {
      java.lang.Object ref = resourceName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        resourceName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *

     * Immutable. The resource name of the feed item target.
     * Feed item target resource names have the form:
     * `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
     *

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

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

     * Immutable. The resource name of the feed item target.
     * Feed item target resource names have the form:
     * `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
     *

     *
     * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return This builder for chaining.
     */
    public Builder clearResourceName() {

      resourceName_ = getDefaultInstance().getResourceName();
      onChanged();
      return this;
    }
    /**
     *

     * Immutable. The resource name of the feed item target.
     * Feed item target resource names have the form:
     * `customers/{customer_id}/feedItemTargets/{feed_id}~{feed_item_id}~{feed_item_target_type}~{feed_item_target_id}`
     *

     *
     * string resource_name = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @param value The bytes for resourceName to set.
     * @return This builder for chaining.
     */
    public Builder setResourceNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);

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

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

     * Immutable. The feed item to which this feed item target belongs.
     *

     *
     * optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return Whether the feedItem field is set.
     */
    public boolean hasFeedItem() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     *

     * Immutable. The feed item to which this feed item target belongs.
     *

     *
     * optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The feedItem.
     */
    public java.lang.String getFeedItem() {
      java.lang.Object ref = feedItem_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        feedItem_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *

     * Immutable. The feed item to which this feed item target belongs.
     *

     *
     * optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The bytes for feedItem.
     */
    public com.google.protobuf.ByteString
        getFeedItemBytes() {
      java.lang.Object ref = feedItem_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        feedItem_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *

     * Immutable. The feed item to which this feed item target belongs.
     *

     *
     * optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @param value The feedItem to set.
     * @return This builder for chaining.
     */
    public Builder setFeedItem(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
      feedItem_ = value;
      onChanged();
      return this;
    }
    /**
     *

     * Immutable. The feed item to which this feed item target belongs.
     *

     *
     * optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return This builder for chaining.
     */
    public Builder clearFeedItem() {
      bitField0_ = (bitField0_ & ~0x00000001);
      feedItem_ = getDefaultInstance().getFeedItem();
      onChanged();
      return this;
    }
    /**
     *

     * Immutable. The feed item to which this feed item target belongs.
     *

     *
     * optional string feed_item = 12 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @param value The bytes for feedItem to set.
     * @return This builder for chaining.
     */
    public Builder setFeedItemBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      bitField0_ |= 0x00000001;
      feedItem_ = value;
      onChanged();
      return this;
    }

    private int feedItemTargetType_ = 0;
    /**
     *

     * Output only. The target type of this feed item target. This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return The enum numeric value on the wire for feedItemTargetType.
     */
    @java.lang.Override public int getFeedItemTargetTypeValue() {
      return feedItemTargetType_;
    }
    /**
     *

     * Output only. The target type of this feed item target. This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param value The enum numeric value on the wire for feedItemTargetType to set.
     * @return This builder for chaining.
     */
    public Builder setFeedItemTargetTypeValue(int value) {

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

     * Output only. The target type of this feed item target. This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return The feedItemTargetType.
     */
    @java.lang.Override
    public com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType getFeedItemTargetType() {
      @SuppressWarnings("deprecation")
      com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType result = com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType.valueOf(feedItemTargetType_);
      return result == null ? com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType.UNRECOGNIZED : result;
    }
    /**
     *

     * Output only. The target type of this feed item target. This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param value The feedItemTargetType to set.
     * @return This builder for chaining.
     */
    public Builder setFeedItemTargetType(com.google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType value) {
      if (value == null) {
        throw new NullPointerException();
      }

      feedItemTargetType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *

     * Output only. The target type of this feed item target. This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetTypeEnum.FeedItemTargetType feed_item_target_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return This builder for chaining.
     */
    public Builder clearFeedItemTargetType() {

      feedItemTargetType_ = 0;
      onChanged();
      return this;
    }

    private long feedItemTargetId_ ;
    /**
     *

     * Output only. The ID of the targeted resource. This field is read-only.
     *

     *
     * optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return Whether the feedItemTargetId field is set.
     */
    @java.lang.Override
    public boolean hasFeedItemTargetId() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     *

     * Output only. The ID of the targeted resource. This field is read-only.
     *

     *
     * optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return The feedItemTargetId.
     */
    @java.lang.Override
    public long getFeedItemTargetId() {
      return feedItemTargetId_;
    }
    /**
     *

     * Output only. The ID of the targeted resource. This field is read-only.
     *

     *
     * optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param value The feedItemTargetId to set.
     * @return This builder for chaining.
     */
    public Builder setFeedItemTargetId(long value) {
      bitField0_ |= 0x00000002;
      feedItemTargetId_ = value;
      onChanged();
      return this;
    }
    /**
     *

     * Output only. The ID of the targeted resource. This field is read-only.
     *

     *
     * optional int64 feed_item_target_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return This builder for chaining.
     */
    public Builder clearFeedItemTargetId() {
      bitField0_ = (bitField0_ & ~0x00000002);
      feedItemTargetId_ = 0L;
      onChanged();
      return this;
    }

    private int status_ = 0;
    /**
     *

     * Output only. Status of the feed item target.
     * This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return The enum numeric value on the wire for status.
     */
    @java.lang.Override public int getStatusValue() {
      return status_;
    }
    /**
     *

     * Output only. Status of the feed item target.
     * This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param value The enum numeric value on the wire for status to set.
     * @return This builder for chaining.
     */
    public Builder setStatusValue(int value) {

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

     * Output only. Status of the feed item target.
     * This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return The status.
     */
    @java.lang.Override
    public com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus getStatus() {
      @SuppressWarnings("deprecation")
      com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus result = com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.valueOf(status_);
      return result == null ? com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus.UNRECOGNIZED : result;
    }
    /**
     *

     * Output only. Status of the feed item target.
     * This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @param value The status to set.
     * @return This builder for chaining.
     */
    public Builder setStatus(com.google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus value) {
      if (value == null) {
        throw new NullPointerException();
      }

      status_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *

     * Output only. Status of the feed item target.
     * This field is read-only.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetStatusEnum.FeedItemTargetStatus status = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
     * @return This builder for chaining.
     */
    public Builder clearStatus() {

      status_ = 0;
      onChanged();
      return this;
    }

    /**
     *

     * Immutable. The targeted campaign.
     *

     *
     * string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return Whether the campaign field is set.
     */
    @java.lang.Override
    public boolean hasCampaign() {
      return targetCase_ == 14;
    }
    /**
     *

     * Immutable. The targeted campaign.
     *

     *
     * string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The campaign.
     */
    @java.lang.Override
    public java.lang.String getCampaign() {
      java.lang.Object ref = "";
      if (targetCase_ == 14) {
        ref = target_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (targetCase_ == 14) {
          target_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *

     * Immutable. The targeted campaign.
     *

     *
     * string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The bytes for campaign.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getCampaignBytes() {
      java.lang.Object ref = "";
      if (targetCase_ == 14) {
        ref = target_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (targetCase_ == 14) {
          target_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *

     * Immutable. The targeted campaign.
     *

     *
     * string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @param value The campaign to set.
     * @return This builder for chaining.
     */
    public Builder setCampaign(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  targetCase_ = 14;
      target_ = value;
      onChanged();
      return this;
    }
    /**
     *

     * Immutable. The targeted campaign.
     *

     *
     * string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return This builder for chaining.
     */
    public Builder clearCampaign() {
      if (targetCase_ == 14) {
        targetCase_ = 0;
        target_ = null;
        onChanged();
      }
      return this;
    }
    /**
     *

     * Immutable. The targeted campaign.
     *

     *
     * string campaign = 14 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @param value The bytes for campaign to set.
     * @return This builder for chaining.
     */
    public Builder setCampaignBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      targetCase_ = 14;
      target_ = value;
      onChanged();
      return this;
    }

    /**
     *

     * Immutable. The targeted ad group.
     *

     *
     * string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return Whether the adGroup field is set.
     */
    @java.lang.Override
    public boolean hasAdGroup() {
      return targetCase_ == 15;
    }
    /**
     *

     * Immutable. The targeted ad group.
     *

     *
     * string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The adGroup.
     */
    @java.lang.Override
    public java.lang.String getAdGroup() {
      java.lang.Object ref = "";
      if (targetCase_ == 15) {
        ref = target_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (targetCase_ == 15) {
          target_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *

     * Immutable. The targeted ad group.
     *

     *
     * string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The bytes for adGroup.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getAdGroupBytes() {
      java.lang.Object ref = "";
      if (targetCase_ == 15) {
        ref = target_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (targetCase_ == 15) {
          target_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *

     * Immutable. The targeted ad group.
     *

     *
     * string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @param value The adGroup to set.
     * @return This builder for chaining.
     */
    public Builder setAdGroup(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  targetCase_ = 15;
      target_ = value;
      onChanged();
      return this;
    }
    /**
     *

     * Immutable. The targeted ad group.
     *

     *
     * string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return This builder for chaining.
     */
    public Builder clearAdGroup() {
      if (targetCase_ == 15) {
        targetCase_ = 0;
        target_ = null;
        onChanged();
      }
      return this;
    }
    /**
     *

     * Immutable. The targeted ad group.
     *

     *
     * string ad_group = 15 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @param value The bytes for adGroup to set.
     * @return This builder for chaining.
     */
    public Builder setAdGroupBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      targetCase_ = 15;
      target_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v12.common.KeywordInfo, com.google.ads.googleads.v12.common.KeywordInfo.Builder, com.google.ads.googleads.v12.common.KeywordInfoOrBuilder> keywordBuilder_;
    /**
     *

     * Immutable. The targeted keyword.
     *

     *
     * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
     * @return Whether the keyword field is set.
     */
    @java.lang.Override
    public boolean hasKeyword() {
      return targetCase_ == 7;
    }
    /**
     *

     * Immutable. The targeted keyword.
     *

     *
     * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
     * @return The keyword.
     */
    @java.lang.Override
    public com.google.ads.googleads.v12.common.KeywordInfo getKeyword() {
      if (keywordBuilder_ == null) {
        if (targetCase_ == 7) {
          return (com.google.ads.googleads.v12.common.KeywordInfo) target_;
        }
        return com.google.ads.googleads.v12.common.KeywordInfo.getDefaultInstance();
      } else {
        if (targetCase_ == 7) {
          return keywordBuilder_.getMessage();
        }
        return com.google.ads.googleads.v12.common.KeywordInfo.getDefaultInstance();
      }
    }
    /**
     *

     * Immutable. The targeted keyword.
     *

     *
     * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public Builder setKeyword(com.google.ads.googleads.v12.common.KeywordInfo value) {
      if (keywordBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        target_ = value;
        onChanged();
      } else {
        keywordBuilder_.setMessage(value);
      }
      targetCase_ = 7;
      return this;
    }
    /**
     *

     * Immutable. The targeted keyword.
     *

     *
     * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public Builder setKeyword(
        com.google.ads.googleads.v12.common.KeywordInfo.Builder builderForValue) {
      if (keywordBuilder_ == null) {
        target_ = builderForValue.build();
        onChanged();
      } else {
        keywordBuilder_.setMessage(builderForValue.build());
      }
      targetCase_ = 7;
      return this;
    }
    /**
     *

     * Immutable. The targeted keyword.
     *

     *
     * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public Builder mergeKeyword(com.google.ads.googleads.v12.common.KeywordInfo value) {
      if (keywordBuilder_ == null) {
        if (targetCase_ == 7 &&
            target_ != com.google.ads.googleads.v12.common.KeywordInfo.getDefaultInstance()) {
          target_ = com.google.ads.googleads.v12.common.KeywordInfo.newBuilder((com.google.ads.googleads.v12.common.KeywordInfo) target_)
              .mergeFrom(value).buildPartial();
        } else {
          target_ = value;
        }
        onChanged();
      } else {
        if (targetCase_ == 7) {
          keywordBuilder_.mergeFrom(value);
        } else {
          keywordBuilder_.setMessage(value);
        }
      }
      targetCase_ = 7;
      return this;
    }
    /**
     *

     * Immutable. The targeted keyword.
     *

     *
     * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public Builder clearKeyword() {
      if (keywordBuilder_ == null) {
        if (targetCase_ == 7) {
          targetCase_ = 0;
          target_ = null;
          onChanged();
        }
      } else {
        if (targetCase_ == 7) {
          targetCase_ = 0;
          target_ = null;
        }
        keywordBuilder_.clear();
      }
      return this;
    }
    /**
     *

     * Immutable. The targeted keyword.
     *

     *
     * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public com.google.ads.googleads.v12.common.KeywordInfo.Builder getKeywordBuilder() {
      return getKeywordFieldBuilder().getBuilder();
    }
    /**
     *

     * Immutable. The targeted keyword.
     *

     *
     * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
     */
    @java.lang.Override
    public com.google.ads.googleads.v12.common.KeywordInfoOrBuilder getKeywordOrBuilder() {
      if ((targetCase_ == 7) && (keywordBuilder_ != null)) {
        return keywordBuilder_.getMessageOrBuilder();
      } else {
        if (targetCase_ == 7) {
          return (com.google.ads.googleads.v12.common.KeywordInfo) target_;
        }
        return com.google.ads.googleads.v12.common.KeywordInfo.getDefaultInstance();
      }
    }
    /**
     *

     * Immutable. The targeted keyword.
     *

     *
     * .google.ads.googleads.v12.common.KeywordInfo keyword = 7 [(.google.api.field_behavior) = IMMUTABLE];
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v12.common.KeywordInfo, com.google.ads.googleads.v12.common.KeywordInfo.Builder, com.google.ads.googleads.v12.common.KeywordInfoOrBuilder>
        getKeywordFieldBuilder() {
      if (keywordBuilder_ == null) {
        if (!(targetCase_ == 7)) {
          target_ = com.google.ads.googleads.v12.common.KeywordInfo.getDefaultInstance();
        }
        keywordBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v12.common.KeywordInfo, com.google.ads.googleads.v12.common.KeywordInfo.Builder, com.google.ads.googleads.v12.common.KeywordInfoOrBuilder>(
                (com.google.ads.googleads.v12.common.KeywordInfo) target_,
                getParentForChildren(),
                isClean());
        target_ = null;
      }
      targetCase_ = 7;
      onChanged();;
      return keywordBuilder_;
    }

    /**
     *

     * Immutable. The targeted geo target constant resource name.
     *

     *
     * string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return Whether the geoTargetConstant field is set.
     */
    @java.lang.Override
    public boolean hasGeoTargetConstant() {
      return targetCase_ == 16;
    }
    /**
     *

     * Immutable. The targeted geo target constant resource name.
     *

     *
     * string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The geoTargetConstant.
     */
    @java.lang.Override
    public java.lang.String getGeoTargetConstant() {
      java.lang.Object ref = "";
      if (targetCase_ == 16) {
        ref = target_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (targetCase_ == 16) {
          target_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *

     * Immutable. The targeted geo target constant resource name.
     *

     *
     * string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return The bytes for geoTargetConstant.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getGeoTargetConstantBytes() {
      java.lang.Object ref = "";
      if (targetCase_ == 16) {
        ref = target_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (targetCase_ == 16) {
          target_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *

     * Immutable. The targeted geo target constant resource name.
     *

     *
     * string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @param value The geoTargetConstant to set.
     * @return This builder for chaining.
     */
    public Builder setGeoTargetConstant(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  targetCase_ = 16;
      target_ = value;
      onChanged();
      return this;
    }
    /**
     *

     * Immutable. The targeted geo target constant resource name.
     *

     *
     * string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @return This builder for chaining.
     */
    public Builder clearGeoTargetConstant() {
      if (targetCase_ == 16) {
        targetCase_ = 0;
        target_ = null;
        onChanged();
      }
      return this;
    }
    /**
     *

     * Immutable. The targeted geo target constant resource name.
     *

     *
     * string geo_target_constant = 16 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
     * @param value The bytes for geoTargetConstant to set.
     * @return This builder for chaining.
     */
    public Builder setGeoTargetConstantBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      targetCase_ = 16;
      target_ = value;
      onChanged();
      return this;
    }

    /**
     *

     * Immutable. The targeted device.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
     * @return Whether the device field is set.
     */
    @java.lang.Override
    public boolean hasDevice() {
      return targetCase_ == 9;
    }
    /**
     *

     * Immutable. The targeted device.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
     * @return The enum numeric value on the wire for device.
     */
    @java.lang.Override
    public int getDeviceValue() {
      if (targetCase_ == 9) {
        return ((java.lang.Integer) target_).intValue();
      }
      return 0;
    }
    /**
     *

     * Immutable. The targeted device.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
     * @param value The enum numeric value on the wire for device to set.
     * @return This builder for chaining.
     */
    public Builder setDeviceValue(int value) {
      targetCase_ = 9;
      target_ = value;
      onChanged();
      return this;
    }
    /**
     *

     * Immutable. The targeted device.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
     * @return The device.
     */
    @java.lang.Override
    public com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice getDevice() {
      if (targetCase_ == 9) {
        @SuppressWarnings("deprecation")
        com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice result = com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.valueOf(
            (java.lang.Integer) target_);
        return result == null ? com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.UNRECOGNIZED : result;
      }
      return com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice.UNSPECIFIED;
    }
    /**
     *

     * Immutable. The targeted device.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
     * @param value The device to set.
     * @return This builder for chaining.
     */
    public Builder setDevice(com.google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice value) {
      if (value == null) {
        throw new NullPointerException();
      }
      targetCase_ = 9;
      target_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *

     * Immutable. The targeted device.
     *

     *
     * .google.ads.googleads.v12.enums.FeedItemTargetDeviceEnum.FeedItemTargetDevice device = 9 [(.google.api.field_behavior) = IMMUTABLE];
     * @return This builder for chaining.
     */
    public Builder clearDevice() {
      if (targetCase_ == 9) {
        targetCase_ = 0;
        target_ = null;
        onChanged();
      }
      return this;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v12.common.AdScheduleInfo, com.google.ads.googleads.v12.common.AdScheduleInfo.Builder, com.google.ads.googleads.v12.common.AdScheduleInfoOrBuilder> adScheduleBuilder_;
    /**
     *

     * Immutable. The targeted schedule.
     *

     *
     * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
     * @return Whether the adSchedule field is set.
     */
    @java.lang.Override
    public boolean hasAdSchedule() {
      return targetCase_ == 10;
    }
    /**
     *

     * Immutable. The targeted schedule.
     *

     *
     * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
     * @return The adSchedule.
     */
    @java.lang.Override
    public com.google.ads.googleads.v12.common.AdScheduleInfo getAdSchedule() {
      if (adScheduleBuilder_ == null) {
        if (targetCase_ == 10) {
          return (com.google.ads.googleads.v12.common.AdScheduleInfo) target_;
        }
        return com.google.ads.googleads.v12.common.AdScheduleInfo.getDefaultInstance();
      } else {
        if (targetCase_ == 10) {
          return adScheduleBuilder_.getMessage();
        }
        return com.google.ads.googleads.v12.common.AdScheduleInfo.getDefaultInstance();
      }
    }
    /**
     *

     * Immutable. The targeted schedule.
     *

     *
     * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public Builder setAdSchedule(com.google.ads.googleads.v12.common.AdScheduleInfo value) {
      if (adScheduleBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        target_ = value;
        onChanged();
      } else {
        adScheduleBuilder_.setMessage(value);
      }
      targetCase_ = 10;
      return this;
    }
    /**
     *

     * Immutable. The targeted schedule.
     *

     *
     * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public Builder setAdSchedule(
        com.google.ads.googleads.v12.common.AdScheduleInfo.Builder builderForValue) {
      if (adScheduleBuilder_ == null) {
        target_ = builderForValue.build();
        onChanged();
      } else {
        adScheduleBuilder_.setMessage(builderForValue.build());
      }
      targetCase_ = 10;
      return this;
    }
    /**
     *

     * Immutable. The targeted schedule.
     *

     *
     * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public Builder mergeAdSchedule(com.google.ads.googleads.v12.common.AdScheduleInfo value) {
      if (adScheduleBuilder_ == null) {
        if (targetCase_ == 10 &&
            target_ != com.google.ads.googleads.v12.common.AdScheduleInfo.getDefaultInstance()) {
          target_ = com.google.ads.googleads.v12.common.AdScheduleInfo.newBuilder((com.google.ads.googleads.v12.common.AdScheduleInfo) target_)
              .mergeFrom(value).buildPartial();
        } else {
          target_ = value;
        }
        onChanged();
      } else {
        if (targetCase_ == 10) {
          adScheduleBuilder_.mergeFrom(value);
        } else {
          adScheduleBuilder_.setMessage(value);
        }
      }
      targetCase_ = 10;
      return this;
    }
    /**
     *

     * Immutable. The targeted schedule.
     *

     *
     * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public Builder clearAdSchedule() {
      if (adScheduleBuilder_ == null) {
        if (targetCase_ == 10) {
          targetCase_ = 0;
          target_ = null;
          onChanged();
        }
      } else {
        if (targetCase_ == 10) {
          targetCase_ = 0;
          target_ = null;
        }
        adScheduleBuilder_.clear();
      }
      return this;
    }
    /**
     *

     * Immutable. The targeted schedule.
     *

     *
     * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
     */
    public com.google.ads.googleads.v12.common.AdScheduleInfo.Builder getAdScheduleBuilder() {
      return getAdScheduleFieldBuilder().getBuilder();
    }
    /**
     *

     * Immutable. The targeted schedule.
     *

     *
     * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
     */
    @java.lang.Override
    public com.google.ads.googleads.v12.common.AdScheduleInfoOrBuilder getAdScheduleOrBuilder() {
      if ((targetCase_ == 10) && (adScheduleBuilder_ != null)) {
        return adScheduleBuilder_.getMessageOrBuilder();
      } else {
        if (targetCase_ == 10) {
          return (com.google.ads.googleads.v12.common.AdScheduleInfo) target_;
        }
        return com.google.ads.googleads.v12.common.AdScheduleInfo.getDefaultInstance();
      }
    }
    /**
     *

     * Immutable. The targeted schedule.
     *

     *
     * .google.ads.googleads.v12.common.AdScheduleInfo ad_schedule = 10 [(.google.api.field_behavior) = IMMUTABLE];
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v12.common.AdScheduleInfo, com.google.ads.googleads.v12.common.AdScheduleInfo.Builder, com.google.ads.googleads.v12.common.AdScheduleInfoOrBuilder>
        getAdScheduleFieldBuilder() {
      if (adScheduleBuilder_ == null) {
        if (!(targetCase_ == 10)) {
          target_ = com.google.ads.googleads.v12.common.AdScheduleInfo.getDefaultInstance();
        }
        adScheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v12.common.AdScheduleInfo, com.google.ads.googleads.v12.common.AdScheduleInfo.Builder, com.google.ads.googleads.v12.common.AdScheduleInfoOrBuilder>(
                (com.google.ads.googleads.v12.common.AdScheduleInfo) target_,
                getParentForChildren(),
                isClean());
        target_ = null;
      }
      targetCase_ = 10;
      onChanged();;
      return adScheduleBuilder_;
    }
    @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.ads.googleads.v12.resources.FeedItemTarget)
  }

  // @@protoc_insertion_point(class_scope:google.ads.googleads.v12.resources.FeedItemTarget)
  private static final com.google.ads.googleads.v12.resources.FeedItemTarget DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.ads.googleads.v12.resources.FeedItemTarget();
  }

  public static com.google.ads.googleads.v12.resources.FeedItemTarget getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public com.google.ads.googleads.v12.resources.FeedItemTarget getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}


text:
pyKMLib
=======

Python Kernel SVM library accelerated with CUDA. Library allows for classification sparse and big dataset with use of different sprase storage (matrix) format. CUDA SVM in python.

It is a partial python port of .net KMLib project https://github.com/ksirg/KMLib

author: Krzysztof Sopyła (krzysztofsopyla@gmail.com)

Prerequisits
-------------
* Python 2.7
* pycuda 2013.1.1
* Numpy 1.7 MKL
* Scipy
* Numba

Ubuntu 13.10 prerequisits installation
-----------

##numba installation

* *llvm* - This install llvm 3.4
```sh
 sudo apt-get install llvm
```

* *llvmpy* - python llvm wrapper

```sh
wget https://github.com/llvmpy/llvmpy/releases/tag/0.12.3
tar zxvf 0.12.3.tar.gz
cd 0.12.3
sudo LLVM_CONFIG_PATH=/usr/bin/llvm-config python setup.py install
```

* *numba* -
```sh
sudo pip install numba
```

**pycuda installation**

*Warning!*

*sudo apt-get install pycuda* - probably override your nvidia driver installation, so If you install nvidia driver and cuda toolkit previously than it is not recomended. (I have install cuda toolkit and driver with help http://askubuntu.com/questions/380609/anyone-has-successfully-installed-cuda-5-5-on-ubuntu-13-10-64-bit )

```sh
vim ~/.bashrc
export CUDA_HOME=/usr/local/cuda
export CUDA_ROOT=${CUDA_HOME}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64

sudo PATH=$PATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH pip install pycuda
```

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using Tt195361.Casl2Simulator.Common;
using Tt195361.Casl2Simulator.Properties;
using Tt195361.Casl2Simulator.Utils;

namespace Tt195361.Casl2Simulator.Casl2
{
    /// <summary>
    /// 定義したラベルの一覧を管理します。
    /// </summary>
    internal class LabelTable
    {
        #region Instance Fields
        private readonly Dictionary<String, LabelDefinition> m_labelDictionary;
        private Int32 m_literalLabelNumber;
        #endregion

        internal LabelTable()
        {
            m_labelDictionary = new Dictionary<String, LabelDefinition>();
            m_literalLabelNumber = Label.MinLiteralLabelNumber;
        }

        /// <summary>
        /// 定義したラベルの一覧を取得します。
        /// </summary>
        internal IEnumerable<LabelDefinition> LabelDefinitions
        {
            get { return m_labelDictionary.Values; }
        }

        /// <summary>
        /// 指定のラベルを登録します。
        /// </summary>
        /// <param name="label">登録するラベルです。</param>
        internal void Register(Label label)
        {
            String name = label.Name;
            if (IsRegistered(name))
            {
                String message = String.Format(Resources.MSG_LabelAlreadyDefined, name);
                throw new Casl2SimulatorException(message);
            }

            LabelDefinition labelDef = new LabelDefinition(label);
            m_labelDictionary.Add(name, labelDef);
        }

        /// <summary>
        /// 指定のラベルに対応するラベルの定義を取得します。
        /// </summary>
        /// <param name="label">取得する定義を指定するラベルです。</param>
        /// <returns>指定のラベルに対応するラベルの定義を返します。</returns>
        internal LabelDefinition GetDefinitionFor(Label label)
        {
            LabelDefinition labelDef = FindDefinitionFor(label);
            if (labelDef == null)
            {
                String message = String.Format(Resources.MSG_LabelNotDefined, label.Name);
                throw new Casl2SimulatorException(message);
            }

            return labelDef;
        }

        /// <summary>
        /// 指定のラベルに対応するラベルの定義を探します。
        /// </summary>
        /// <param name="label">探し出す定義を指定するラベルです。</param>
        /// <returns>
        /// ラベルの定義が見つかった場合は、そのラベルの定義を返します。
        /// 見つからなかった場合は <see langword="null"/> を返します。
        /// </returns>
        internal LabelDefinition FindDefinitionFor(Label label)
        {
            String name = label.Name;
            if (!IsRegistered(name))
            {
                return null;
            }
            else
            {
                return m_labelDictionary[name];
            }
        }

        private Boolean IsRegistered(String name)
        {
            return m_labelDictionary.ContainsKey(name);
        }

        /// <summary>
        /// リテラルで使用するプログラムのものと重複しないラベルを作成します。
        /// </summary>
        /// <returns>作成したラベルを返します。</returns>
        internal Label MakeLiteralLabel()
        {
            for ( ; m_literalLabelNumber <= Label.MaxLiteralLabelNumber; ++m_literalLabelNumber)
            {
                String name = Label.MakeLiteralLabelName(m_literalLabelNumber);
                if (!IsRegistered(name))
                {
                    // 登録されていないラベル名が作成できれば、それを登録し、番号を次に進める。
                    Label literalLabel = new Label(name);
                    Register(literalLabel);
                    ++m_literalLabelNumber;
                    return literalLabel;
                }
            }

            String message = String.Format(Resources.MSG_CouldNotMakeLiteralLabel, Label.LiteralLabelPrefix);
            throw new Casl2SimulatorException(message);
        }

        /// <summary>
        /// それぞれのラベルの定義に絶対アドレスを割り当てます。
        /// </summary>
        /// <param name="baseAddress">
        /// ラベルが定義された再配置可能モジュールが実行可能モジュールで配置されるアドレスです。
        /// </param>
        internal void AssignLabelAddress(MemoryAddress baseAddress)
        {
            LabelDefinitions.ForEach((labelDef) => labelDef.AssignAbsAddress(baseAddress));
        }

        internal void RegisterForUnitTest(LabelDefinition labelDef)
        {
            String name = labelDef.Label.Name;
            m_labelDictionary.Add(name, labelDef);
        }
    }
}


text:
<?php

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use AppBundle\Entity\User;
use FOS\RestBundle\Controller\FOSRestController;
use FOS\RestBundle\View\View;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class UserController extends FOSRestController
{
    /**
     * @Route("/login")
     *
     * @Method("GET")
     *
     *
     * @return View
     */
    public function login(Request $request): View
    {
        $requestData = $request->request->get('security_login');

        $username = $requestData['username'];
        $plainPassword = $requestData['plainPassword'];
        $existsUser = $this->get('fos_user.user_manager')->findUserByUsernameOrEmail($username);
        $factory = $this->get('security.encoder_factory');

        if (!$existsUser instanceof User) {
            $statusCode = 404;
            $content = ['response' => 'User for username = ' . $username . ' is not found.'];
        } else {
            $encoder = $factory->getEncoder($existsUser);
            if (!$encoder->isPasswordValid($existsUser->getPassword(), $plainPassword, $existsUser->getSalt())) {
                $statusCode = 403;
                $content = ['response' => 'Password : ' . $plainPassword . ' mismatch the correct one.'];
            } else {
                $statusCode = 200;
                $content = ['response' => 'Successfully logged in'];
                $this->get('fos_user.security.login_manager')->logInUser('main', $existsUser);
            }
        }
        return $this->view($content, $statusCode)->setFormat('json');
    }

    /**
     * @Route("/login")
     *
     * @Method("POST")
     *
     *
     * @return View
     */
    public function loginPost(Request $request): View
    {
        $params = array();
        $content = $this->get("request")->getContent();
        if (!empty($content))
        {
            $params = json_decode($content, true); // 2nd param to get as array
        }
    }

    /**
     * @Route("/")
     *
     * @Method("GET")
     *
     *
     * @return View
     */
    public function getAllUser(): View
    {
        $users = $this->getDoctrine()->getRepository('AppBundle:User')->findAll();

        if (count($users) == 0) {
            throw new NotFoundHttpException('User not found');
        } else {
            $view = $this->view($users, 200)->setFormat('json');
        }

        return $view;
    }

    /**
     * @Route("/")
     *
     * @Method("POST")
     *
     * @param Request $request
     * @return View
     */
    public function createUser(Request $request): View
    {
        $requestData = $request->request->get('user');

        $user = new User();
        $user->setUsername($requestData['username']);
        $user->setEmail($requestData['email']);
        $user->setPassword($requestData['password']);
        $user->setEnabled($requestData['enabled'] ?? false);

        return $this->validateAndStoreUser($user);
    }

    /**
     * @Route("/{id}", requirements={
     *     "id": "\d+"
     * })
     *
     * @Method("GET")
     *
     * @param $id
     * @return View
     */
    public function getUserById(int $id): View
    {
        $user = $this->getDoctrine()->getRepository('AppBundle:User')->find($id);

        if (!$user instanceof User) {
            throw new NotFoundHttpException('User for id=' . $id . ' not found');
        }

        $view = $this->view($user, 200)->setFormat('json');

        return $view;
    }

    /**
     * @Route("/{id}", requirements={
     *     "id": "\d+"
     * })
     *
     * @Method("DELETE")
     *
     * @param $id
     * @return View
     */
    public function deleteUser(int $id): View
    {
        $em = $this->getDoctrine()->getManager();
        $user = $em->getRepository('AppBundle:User')->find($id);

        if (!$user instanceof User) {
            throw new NotFoundHttpException('No user found for id : ' . $id);
        }

        $em->remove($user);
        $em->flush();

        $view = $this->view('User deleted', 200)->setFormat('json');

        return $view;
    }

    /**
     * @Route("/{id}", requirements={
     *     "id": "\d+"
     * })
     *
     * @Method("PUT")
     *
     * @param $id
     * @param Request $request
     * @return View
     */
    public function editUser(int $id, Request $request): View
    {
        /** @var User $user */
        $user = $this->getDoctrine()->getRepository('AppBundle:User')->find($id);

        if (!$user instanceof User) {
            throw new NotFoundHttpException('No user found for id : ' . $id);
        }

        $requestData = $request->request->get('user');

        $user->setUsername($requestData['username']);
        $user->setEmail($requestData['email']);
        $user->setPassword($requestData['password']);
        $user->setEnabled($requestData['enabled']);

        return $this->validateAndStoreUser($user);
    }

    /**
     * @param User $user
     * @return View
     */
    private function validateAndStoreUser(User $user): View
    {
        // Get validator service
        $validator = $this->get('validator');

        // Validate the object
        $listErrors = $validator->validate($user);

        // If form is valid
        if (count($listErrors) == 0) {
            $em = $this->getDoctrine()->getManager();
            $em->persist($user);
            $em->flush();

            $statusCode = 200;
            $content = 'User stored';
        } else {
            $statusCode = 400;

            // Return the form errors as content
            $content = $listErrors;
        }

        return $this->view($content, $statusCode)->setFormat('json');
    }
}