// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/resources/feed_item_target.proto

package resources // import "google.golang.org/genproto/googleapis/ads/googleads/v1/resources"

import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import wrappers "github.com/golang/protobuf/ptypes/wrappers"
import common "google.golang.org/genproto/googleapis/ads/googleads/v1/common"
import enums "google.golang.org/genproto/googleapis/ads/googleads/v1/enums"
import _ "google.golang.org/genproto/googleapis/api/annotations"

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

// A feed item target.
type FeedItemTarget struct {
	// 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}`
	ResourceName string `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
	// The feed item to which this feed item target belongs.
	FeedItem *wrappers.StringValue `protobuf:"bytes,2,opt,name=feed_item,json=feedItem,proto3" json:"feed_item,omitempty"`
	// The target type of this feed item target. This field is read-only.
	FeedItemTargetType enums.FeedItemTargetTypeEnum_FeedItemTargetType `protobuf:"varint,3,opt,name=feed_item_target_type,json=feedItemTargetType,proto3,enum=google.ads.googleads.v1.enums.FeedItemTargetTypeEnum_FeedItemTargetType" json:"feed_item_target_type,omitempty"`
	// The ID of the targeted resource. This field is read-only.
	FeedItemTargetId *wrappers.Int64Value `protobuf:"bytes,6,opt,name=feed_item_target_id,json=feedItemTargetId,proto3" json:"feed_item_target_id,omitempty"`
	// The targeted resource.
	//
	// Types that are valid to be assigned to Target:
	//	*FeedItemTarget_Campaign
	//	*FeedItemTarget_AdGroup
	//	*FeedItemTarget_Keyword
	//	*FeedItemTarget_GeoTargetConstant
	//	*FeedItemTarget_Device
	//	*FeedItemTarget_AdSchedule
	Target               isFeedItemTarget_Target `protobuf_oneof:"target"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (m *FeedItemTarget) Reset()         { *m = FeedItemTarget{} }
func (m *FeedItemTarget) String() string { return proto.CompactTextString(m) }
func (*FeedItemTarget) ProtoMessage()    {}
func (*FeedItemTarget) Descriptor() ([]byte, []int) {
	return fileDescriptor_feed_item_target_197999b4e7a91668, []int{0}
}
func (m *FeedItemTarget) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_FeedItemTarget.Unmarshal(m, b)
}
func (m *FeedItemTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_FeedItemTarget.Marshal(b, m, deterministic)
}
func (dst *FeedItemTarget) XXX_Merge(src proto.Message) {
	xxx_messageInfo_FeedItemTarget.Merge(dst, src)
}
func (m *FeedItemTarget) XXX_Size() int {
	return xxx_messageInfo_FeedItemTarget.Size(m)
}
func (m *FeedItemTarget) XXX_DiscardUnknown() {
	xxx_messageInfo_FeedItemTarget.DiscardUnknown(m)
}

var xxx_messageInfo_FeedItemTarget proto.InternalMessageInfo

func (m *FeedItemTarget) GetResourceName() string {
	if m != nil {
		return m.ResourceName
	}
	return ""
}

func (m *FeedItemTarget) GetFeedItem() *wrappers.StringValue {
	if m != nil {
		return m.FeedItem
	}
	return nil
}

func (m *FeedItemTarget) GetFeedItemTargetType() enums.FeedItemTargetTypeEnum_FeedItemTargetType {
	if m != nil {
		return m.FeedItemTargetType
	}
	return enums.FeedItemTargetTypeEnum_UNSPECIFIED
}

func (m *FeedItemTarget) GetFeedItemTargetId() *wrappers.Int64Value {
	if m != nil {
		return m.FeedItemTargetId
	}
	return nil
}

type isFeedItemTarget_Target interface {
	isFeedItemTarget_Target()
}

type FeedItemTarget_Campaign struct {
	Campaign *wrappers.StringValue `protobuf:"bytes,4,opt,name=campaign,proto3,oneof"`
}

type FeedItemTarget_AdGroup struct {
	AdGroup *wrappers.StringValue `protobuf:"bytes,5,opt,name=ad_group,json=adGroup,proto3,oneof"`
}

type FeedItemTarget_Keyword struct {
	Keyword *common.KeywordInfo `protobuf:"bytes,7,opt,name=keyword,proto3,oneof"`
}

type FeedItemTarget_GeoTargetConstant struct {
	GeoTargetConstant *wrappers.StringValue `protobuf:"bytes,8,opt,name=geo_target_constant,json=geoTargetConstant,proto3,oneof"`
}

type FeedItemTarget_Device struct {
	Device enums.FeedItemTargetDeviceEnum_FeedItemTargetDevice `protobuf:"varint,9,opt,name=device,proto3,enum=google.ads.googleads.v1.enums.FeedItemTargetDeviceEnum_FeedItemTargetDevice,oneof"`
}

type FeedItemTarget_AdSchedule struct {
	AdSchedule *common.AdScheduleInfo `protobuf:"bytes,10,opt,name=ad_schedule,json=adSchedule,proto3,oneof"`
}

func (*FeedItemTarget_Campaign) isFeedItemTarget_Target() {}

func (*FeedItemTarget_AdGroup) isFeedItemTarget_Target() {}

func (*FeedItemTarget_Keyword) isFeedItemTarget_Target() {}

func (*FeedItemTarget_GeoTargetConstant) isFeedItemTarget_Target() {}

func (*FeedItemTarget_Device) isFeedItemTarget_Target() {}

func (*FeedItemTarget_AdSchedule) isFeedItemTarget_Target() {}

func (m *FeedItemTarget) GetTarget() isFeedItemTarget_Target {
	if m != nil {
		return m.Target
	}
	return nil
}

func (m *FeedItemTarget) GetCampaign() *wrappers.StringValue {
	if x, ok := m.GetTarget().(*FeedItemTarget_Campaign); ok {
		return x.Campaign
	}
	return nil
}

func (m *FeedItemTarget) GetAdGroup() *wrappers.StringValue {
	if x, ok := m.GetTarget().(*FeedItemTarget_AdGroup); ok {
		return x.AdGroup
	}
	return nil
}

func (m *FeedItemTarget) GetKeyword() *common.KeywordInfo {
	if x, ok := m.GetTarget().(*FeedItemTarget_Keyword); ok {
		return x.Keyword
	}
	return nil
}

func (m *FeedItemTarget) GetGeoTargetConstant() *wrappers.StringValue {
	if x, ok := m.GetTarget().(*FeedItemTarget_GeoTargetConstant); ok {
		return x.GeoTargetConstant
	}
	return nil
}

func (m *FeedItemTarget) GetDevice() enums.FeedItemTargetDeviceEnum_FeedItemTargetDevice {
	if x, ok := m.GetTarget().(*FeedItemTarget_Device); ok {
		return x.Device
	}
	return enums.FeedItemTargetDeviceEnum_UNSPECIFIED
}

func (m *FeedItemTarget) GetAdSchedule() *common.AdScheduleInfo {
	if x, ok := m.GetTarget().(*FeedItemTarget_AdSchedule); ok {
		return x.AdSchedule
	}
	return nil
}

// XXX_OneofFuncs is for the internal use of the proto package.
func (*FeedItemTarget) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _FeedItemTarget_OneofMarshaler, _FeedItemTarget_OneofUnmarshaler, _FeedItemTarget_OneofSizer, []interface{}{
		(*FeedItemTarget_Campaign)(nil),
		(*FeedItemTarget_AdGroup)(nil),
		(*FeedItemTarget_Keyword)(nil),
		(*FeedItemTarget_GeoTargetConstant)(nil),
		(*FeedItemTarget_Device)(nil),
		(*FeedItemTarget_AdSchedule)(nil),
	}
}

func _FeedItemTarget_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
	m := msg.(*FeedItemTarget)
	// target
	switch x := m.Target.(type) {
	case *FeedItemTarget_Campaign:
		b.EncodeVarint(4<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.Campaign); err != nil {
			return err
		}
	case *FeedItemTarget_AdGroup:
		b.EncodeVarint(5<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.AdGroup); err != nil {
			return err
		}
	case *FeedItemTarget_Keyword:
		b.EncodeVarint(7<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.Keyword); err != nil {
			return err
		}
	case *FeedItemTarget_GeoTargetConstant:
		b.EncodeVarint(8<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.GeoTargetConstant); err != nil {
			return err
		}
	case *FeedItemTarget_Device:
		b.EncodeVarint(9<<3 | proto.WireVarint)
		b.EncodeVarint(uint64(x.Device))
	case *FeedItemTarget_AdSchedule:
		b.EncodeVarint(10<<3 | proto.WireBytes)
		if err := b.EncodeMessage(x.AdSchedule); err != nil {
			return err
		}
	case nil:
	default:
		return fmt.Errorf("FeedItemTarget.Target has unexpected type %T", x)
	}
	return nil
}

func _FeedItemTarget_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
	m := msg.(*FeedItemTarget)
	switch tag {
	case 4: // target.campaign
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(wrappers.StringValue)
		err := b.DecodeMessage(msg)
		m.Target = &FeedItemTarget_Campaign{msg}
		return true, err
	case 5: // target.ad_group
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(wrappers.StringValue)
		err := b.DecodeMessage(msg)
		m.Target = &FeedItemTarget_AdGroup{msg}
		return true, err
	case 7: // target.keyword
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(common.KeywordInfo)
		err := b.DecodeMessage(msg)
		m.Target = &FeedItemTarget_Keyword{msg}
		return true, err
	case 8: // target.geo_target_constant
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(wrappers.StringValue)
		err := b.DecodeMessage(msg)
		m.Target = &FeedItemTarget_GeoTargetConstant{msg}
		return true, err
	case 9: // target.device
		if wire != proto.WireVarint {
			return true, proto.ErrInternalBadWireType
		}
		x, err := b.DecodeVarint()
		m.Target = &FeedItemTarget_Device{enums.FeedItemTargetDeviceEnum_FeedItemTargetDevice(x)}
		return true, err
	case 10: // target.ad_schedule
		if wire != proto.WireBytes {
			return true, proto.ErrInternalBadWireType
		}
		msg := new(common.AdScheduleInfo)
		err := b.DecodeMessage(msg)
		m.Target = &FeedItemTarget_AdSchedule{msg}
		return true, err
	default:
		return false, nil
	}
}

func _FeedItemTarget_OneofSizer(msg proto.Message) (n int) {
	m := msg.(*FeedItemTarget)
	// target
	switch x := m.Target.(type) {
	case *FeedItemTarget_Campaign:
		s := proto.Size(x.Campaign)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *FeedItemTarget_AdGroup:
		s := proto.Size(x.AdGroup)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *FeedItemTarget_Keyword:
		s := proto.Size(x.Keyword)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *FeedItemTarget_GeoTargetConstant:
		s := proto.Size(x.GeoTargetConstant)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case *FeedItemTarget_Device:
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(x.Device))
	case *FeedItemTarget_AdSchedule:
		s := proto.Size(x.AdSchedule)
		n += 1 // tag and wire
		n += proto.SizeVarint(uint64(s))
		n += s
	case nil:
	default:
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
	}
	return n
}

func init() {
	proto.RegisterType((*FeedItemTarget)(nil), "google.ads.googleads.v1.resources.FeedItemTarget")
}

func init() {
	proto.RegisterFile("google/ads/googleads/v1/resources/feed_item_target.proto", fileDescriptor_feed_item_target_197999b4e7a91668)
}

var fileDescriptor_feed_item_target_197999b4e7a91668 = []byte{
	// 581 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdd, 0x6a, 0x13, 0x41,
	0x14, 0x6e, 0x52, 0x4d, 0xd3, 0xa9, 0x16, 0x9d, 0x22, 0x2c, 0xb5, 0x48, 0xab, 0x14, 0x0a, 0xe2,
	0x2c, 0xa9, 0x22, 0x76, 0x7b, 0xb5, 0xf5, 0x27, 0x4d, 0x95, 0x52, 0xb7, 0x25, 0x17, 0x12, 0x58,
	0xa6, 0x3b, 0x67, 0xc7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