1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/ads/googleads/v1/services/asset_service.proto
3
4package services
5
6import (
7	context "context"
8	fmt "fmt"
9	math "math"
10
11	proto "github.com/golang/protobuf/proto"
12	resources "google.golang.org/genproto/googleapis/ads/googleads/v1/resources"
13	_ "google.golang.org/genproto/googleapis/api/annotations"
14	grpc "google.golang.org/grpc"
15)
16
17// Reference imports to suppress errors if they are not otherwise used.
18var _ = proto.Marshal
19var _ = fmt.Errorf
20var _ = math.Inf
21
22// This is a compile-time assertion to ensure that this generated file
23// is compatible with the proto package it is being compiled against.
24// A compilation error at this line likely means your copy of the
25// proto package needs to be updated.
26const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
27
28// Request message for
29// [AssetService.GetAsset][google.ads.googleads.v1.services.AssetService.GetAsset]
30type GetAssetRequest struct {
31	// The resource name of the asset to fetch.
32	ResourceName         string   `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
33	XXX_NoUnkeyedLiteral struct{} `json:"-"`
34	XXX_unrecognized     []byte   `json:"-"`
35	XXX_sizecache        int32    `json:"-"`
36}
37
38func (m *GetAssetRequest) Reset()         { *m = GetAssetRequest{} }
39func (m *GetAssetRequest) String() string { return proto.CompactTextString(m) }
40func (*GetAssetRequest) ProtoMessage()    {}
41func (*GetAssetRequest) Descriptor() ([]byte, []int) {
42	return fileDescriptor_4a6e6d3ab580fb9b, []int{0}
43}
44
45func (m *GetAssetRequest) XXX_Unmarshal(b []byte) error {
46	return xxx_messageInfo_GetAssetRequest.Unmarshal(m, b)
47}
48func (m *GetAssetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
49	return xxx_messageInfo_GetAssetRequest.Marshal(b, m, deterministic)
50}
51func (m *GetAssetRequest) XXX_Merge(src proto.Message) {
52	xxx_messageInfo_GetAssetRequest.Merge(m, src)
53}
54func (m *GetAssetRequest) XXX_Size() int {
55	return xxx_messageInfo_GetAssetRequest.Size(m)
56}
57func (m *GetAssetRequest) XXX_DiscardUnknown() {
58	xxx_messageInfo_GetAssetRequest.DiscardUnknown(m)
59}
60
61var xxx_messageInfo_GetAssetRequest proto.InternalMessageInfo
62
63func (m *GetAssetRequest) GetResourceName() string {
64	if m != nil {
65		return m.ResourceName
66	}
67	return ""
68}
69
70// Request message for
71// [AssetService.MutateAssets][google.ads.googleads.v1.services.AssetService.MutateAssets]
72type MutateAssetsRequest struct {
73	// The ID of the customer whose assets are being modified.
74	CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
75	// The list of operations to perform on individual assets.
76	Operations           []*AssetOperation `protobuf:"bytes,2,rep,name=operations,proto3" json:"operations,omitempty"`
77	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
78	XXX_unrecognized     []byte            `json:"-"`
79	XXX_sizecache        int32             `json:"-"`
80}
81
82func (m *MutateAssetsRequest) Reset()         { *m = MutateAssetsRequest{} }
83func (m *MutateAssetsRequest) String() string { return proto.CompactTextString(m) }
84func (*MutateAssetsRequest) ProtoMessage()    {}
85func (*MutateAssetsRequest) Descriptor() ([]byte, []int) {
86	return fileDescriptor_4a6e6d3ab580fb9b, []int{1}
87}
88
89func (m *MutateAssetsRequest) XXX_Unmarshal(b []byte) error {
90	return xxx_messageInfo_MutateAssetsRequest.Unmarshal(m, b)
91}
92func (m *MutateAssetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
93	return xxx_messageInfo_MutateAssetsRequest.Marshal(b, m, deterministic)
94}
95func (m *MutateAssetsRequest) XXX_Merge(src proto.Message) {
96	xxx_messageInfo_MutateAssetsRequest.Merge(m, src)
97}
98func (m *MutateAssetsRequest) XXX_Size() int {
99	return xxx_messageInfo_MutateAssetsRequest.Size(m)
100}
101func (m *MutateAssetsRequest) XXX_DiscardUnknown() {
102	xxx_messageInfo_MutateAssetsRequest.DiscardUnknown(m)
103}
104
105var xxx_messageInfo_MutateAssetsRequest proto.InternalMessageInfo
106
107func (m *MutateAssetsRequest) GetCustomerId() string {
108	if m != nil {
109		return m.CustomerId
110	}
111	return ""
112}
113
114func (m *MutateAssetsRequest) GetOperations() []*AssetOperation {
115	if m != nil {
116		return m.Operations
117	}
118	return nil
119}
120
121// A single operation to create an asset. Supported asset types are
122// YoutubeVideoAsset, MediaBundleAsset and ImageAsset. TextAsset should be
123// created with Ad inline.
124type AssetOperation struct {
125	// The mutate operation.
126	//
127	// Types that are valid to be assigned to Operation:
128	//	*AssetOperation_Create
129	Operation            isAssetOperation_Operation `protobuf_oneof:"operation"`
130	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
131	XXX_unrecognized     []byte                     `json:"-"`
132	XXX_sizecache        int32                      `json:"-"`
133}
134
135func (m *AssetOperation) Reset()         { *m = AssetOperation{} }
136func (m *AssetOperation) String() string { return proto.CompactTextString(m) }
137func (*AssetOperation) ProtoMessage()    {}
138func (*AssetOperation) Descriptor() ([]byte, []int) {
139	return fileDescriptor_4a6e6d3ab580fb9b, []int{2}
140}
141
142func (m *AssetOperation) XXX_Unmarshal(b []byte) error {
143	return xxx_messageInfo_AssetOperation.Unmarshal(m, b)
144}
145func (m *AssetOperation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
146	return xxx_messageInfo_AssetOperation.Marshal(b, m, deterministic)
147}
148func (m *AssetOperation) XXX_Merge(src proto.Message) {
149	xxx_messageInfo_AssetOperation.Merge(m, src)
150}
151func (m *AssetOperation) XXX_Size() int {
152	return xxx_messageInfo_AssetOperation.Size(m)
153}
154func (m *AssetOperation) XXX_DiscardUnknown() {
155	xxx_messageInfo_AssetOperation.DiscardUnknown(m)
156}
157
158var xxx_messageInfo_AssetOperation proto.InternalMessageInfo
159
160type isAssetOperation_Operation interface {
161	isAssetOperation_Operation()
162}
163
164type AssetOperation_Create struct {
165	Create *resources.Asset `protobuf:"bytes,1,opt,name=create,proto3,oneof"`
166}
167
168func (*AssetOperation_Create) isAssetOperation_Operation() {}
169
170func (m *AssetOperation) GetOperation() isAssetOperation_Operation {
171	if m != nil {
172		return m.Operation
173	}
174	return nil
175}
176
177func (m *AssetOperation) GetCreate() *resources.Asset {
178	if x, ok := m.GetOperation().(*AssetOperation_Create); ok {
179		return x.Create
180	}
181	return nil
182}
183
184// XXX_OneofWrappers is for the internal use of the proto package.
185func (*AssetOperation) XXX_OneofWrappers() []interface{} {
186	return []interface{}{
187		(*AssetOperation_Create)(nil),
188	}
189}
190
191// Response message for an asset mutate.
192type MutateAssetsResponse struct {
193	// All results for the mutate.
194	Results              []*MutateAssetResult `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
195	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
196	XXX_unrecognized     []byte               `json:"-"`
197	XXX_sizecache        int32                `json:"-"`
198}
199
200func (m *MutateAssetsResponse) Reset()         { *m = MutateAssetsResponse{} }
201func (m *MutateAssetsResponse) String() string { return proto.CompactTextString(m) }
202func (*MutateAssetsResponse) ProtoMessage()    {}
203func (*MutateAssetsResponse) Descriptor() ([]byte, []int) {
204	return fileDescriptor_4a6e6d3ab580fb9b, []int{3}
205}
206
207func (m *MutateAssetsResponse) XXX_Unmarshal(b []byte) error {
208	return xxx_messageInfo_MutateAssetsResponse.Unmarshal(m, b)
209}
210func (m *MutateAssetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
211	return xxx_messageInfo_MutateAssetsResponse.Marshal(b, m, deterministic)
212}
213func (m *MutateAssetsResponse) XXX_Merge(src proto.Message) {
214	xxx_messageInfo_MutateAssetsResponse.Merge(m, src)
215}
216func (m *MutateAssetsResponse) XXX_Size() int {
217	return xxx_messageInfo_MutateAssetsResponse.Size(m)
218}
219func (m *MutateAssetsResponse) XXX_DiscardUnknown() {
220	xxx_messageInfo_MutateAssetsResponse.DiscardUnknown(m)
221}
222
223var xxx_messageInfo_MutateAssetsResponse proto.InternalMessageInfo
224
225func (m *MutateAssetsResponse) GetResults() []*MutateAssetResult {
226	if m != nil {
227		return m.Results
228	}
229	return nil
230}
231
232// The result for the asset mutate.
233type MutateAssetResult struct {
234	// The resource name returned for successful operations.
235	ResourceName         string   `protobuf:"bytes,1,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
236	XXX_NoUnkeyedLiteral struct{} `json:"-"`
237	XXX_unrecognized     []byte   `json:"-"`
238	XXX_sizecache        int32    `json:"-"`
239}
240
241func (m *MutateAssetResult) Reset()         { *m = MutateAssetResult{} }
242func (m *MutateAssetResult) String() string { return proto.CompactTextString(m) }
243func (*MutateAssetResult) ProtoMessage()    {}
244func (*MutateAssetResult) Descriptor() ([]byte, []int) {
245	return fileDescriptor_4a6e6d3ab580fb9b, []int{4}
246}
247
248func (m *MutateAssetResult) XXX_Unmarshal(b []byte) error {
249	return xxx_messageInfo_MutateAssetResult.Unmarshal(m, b)
250}
251func (m *MutateAssetResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
252	return xxx_messageInfo_MutateAssetResult.Marshal(b, m, deterministic)
253}
254func (m *MutateAssetResult) XXX_Merge(src proto.Message) {
255	xxx_messageInfo_MutateAssetResult.Merge(m, src)
256}
257func (m *MutateAssetResult) XXX_Size() int {
258	return xxx_messageInfo_MutateAssetResult.Size(m)
259}
260func (m *MutateAssetResult) XXX_DiscardUnknown() {
261	xxx_messageInfo_MutateAssetResult.DiscardUnknown(m)
262}
263
264var xxx_messageInfo_MutateAssetResult proto.InternalMessageInfo
265
266func (m *MutateAssetResult) GetResourceName() string {
267	if m != nil {
268		return m.ResourceName
269	}
270	return ""
271}
272
273func init() {
274	proto.RegisterType((*GetAssetRequest)(nil), "google.ads.googleads.v1.services.GetAssetRequest")
275	proto.RegisterType((*MutateAssetsRequest)(nil), "google.ads.googleads.v1.services.MutateAssetsRequest")
276	proto.RegisterType((*AssetOperation)(nil), "google.ads.googleads.v1.services.AssetOperation")
277	proto.RegisterType((*MutateAssetsResponse)(nil), "google.ads.googleads.v1.services.MutateAssetsResponse")
278	proto.RegisterType((*MutateAssetResult)(nil), "google.ads.googleads.v1.services.MutateAssetResult")
279}
280
281func init() {
282	proto.RegisterFile("google/ads/googleads/v1/services/asset_service.proto", fileDescriptor_4a6e6d3ab580fb9b)
283}
284
285var fileDescriptor_4a6e6d3ab580fb9b = []byte{
286	// 520 bytes of a gzipped FileDescriptorProto
287	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xbf, 0x6f, 0xd3, 0x40,
288	0x14, 0xc6, 0xae, 0x54, 0xe8, 0x25, 0x80, 0x7a, 0x30, 0x54, 0x11, 0x12, 0x91, 0xe9, 0x10, 0x19,
289	0x71, 0x8e, 0x53, 0x88, 0xd0, 0xa1, 0x0e, 0xce, 0x92, 0x32, 0x14, 0x22, 0x23, 0x65, 0x40, 0x91,
290	0xa2, 0x23, 0x3e, 0x59, 0x96, 0x62, 0x9f, 0xf1, 0x3b, 0x67, 0xa9, 0xba, 0x30, 0xb1, 0x33, 0xb1,
291	0x32, 0xb2, 0xf3, 0x4f, 0xb0, 0xf2, 0x1f, 0x20, 0x26, 0xfe, 0x02, 0x46, 0x64, 0x9f, 0xcf, 0x38,
292	0x54, 0x51, 0x9a, 0xed, 0xf9, 0xee, 0xfb, 0xbe, 0xf7, 0xbd, 0x1f, 0x67, 0xf4, 0x34, 0x14, 0x22,
293	0x5c, 0x72, 0x87, 0x05, 0xe0, 0xa8, 0xb0, 0x88, 0x56, 0xae, 0x03, 0x3c, 0x5b, 0x45, 0x0b, 0x0e,
294	0x0e, 0x03, 0xe0, 0x72, 0x5e, 0x7d, 0x92, 0x34, 0x13, 0x52, 0xe0, 0xae, 0x82, 0x12, 0x16, 0x00,
295	0xa9, 0x59, 0x64, 0xe5, 0x12, 0xcd, 0xea, 0x3c, 0xd9, 0xa4, 0x9b, 0x71, 0x10, 0x79, 0x56, 0x0b,
296	0x2b, 0xc1, 0xce, 0x03, 0x0d, 0x4f, 0x23, 0x87, 0x25, 0x89, 0x90, 0x4c, 0x46, 0x22,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308	0x4b, 0xd0, 0xb9, 0x76, 0xcb, 0xac, 0xfe, 0x87, 0x1f, 0xbf, 0x3e, 0x99, 0x36, 0xee, 0x15, 0x2b,
309	0x78, 0xb1, 0x66, 0xf5, 0x54, 0xcf, 0x1d, 0x1c, 0x5b, 0xed, 0x24, 0x38, 0xf6, 0x25, 0xfe, 0x66,
310	0xa0, 0x76, 0xb3, 0x9d, 0xf8, 0xd9, 0x4e, 0x5d, 0xd3, 0xbb, 0xd6, 0x19, 0xee, 0x4a, 0x53, 0x53,
311	0xb3, 0x86, 0xa5, 0xe3, 0xbe, 0xf5, 0xb8, 0x70, 0xfc, 0xcf, 0xe2, 0x45, 0x63, 0x71, 0x4f, 0xed,
312	0xcb, 0xca, 0x30, 0x8d, 0x4b, 0x09, 0x6a, 0xd8, 0xa3, 0x3f, 0x06, 0x3a, 0x5e, 0x88, 0x78, 0x6b,
313	0xd6, 0xd1, 0x61, 0x73, 0x14, 0x93, 0xe2, 0x9d, 0x4d, 0x8c, 0xb7, 0x67, 0x15, 0x2d, 0x14, 0x4b,
314	0x96, 0x84, 0x44, 0x64, 0xa1, 0x13, 0xf2, 0xa4, 0x7c, 0x85, 0xfa, 0x19, 0xa7, 0x11, 0x6c, 0xfe,
315	0x5b, 0xbc, 0xd0, 0xc1, 0x17, 0x73, 0x6f, 0xec, 0x79, 0x5f, 0xcd, 0xee, 0x58, 0x09, 0x7a, 0x01,
316	0x10, 0x15, 0x16, 0xd1, 0xd4, 0x25, 0x55, 0x62, 0xf8, 0xae, 0x21, 0x33, 0x2f, 0x80, 0x59, 0x0d,
317	0x99, 0x4d, 0xdd, 0x99, 0x86, 0xfc, 0x36, 0x8f, 0xd5, 0x39, 0xa5, 0x5e, 0x00, 0x94, 0xd6, 0x20,
318	0x4a, 0xa7, 0x2e, 0xa5, 0x1a, 0xf6, 0x6e, 0xbf, 0xf4, 0x79, 0xf2, 0x37, 0x00, 0x00, 0xff, 0xff,
319	0xc0, 0xa5, 0x7e, 0xbf, 0xd4, 0x04, 0x00, 0x00,
320}
321
322// Reference imports to suppress errors if they are not otherwise used.
323var _ context.Context
324var _ grpc.ClientConn
325
326// This is a compile-time assertion to ensure that this generated file
327// is compatible with the grpc package it is being compiled against.
328const _ = grpc.SupportPackageIsVersion4
329
330// AssetServiceClient is the client API for AssetService service.
331//
332// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
333type AssetServiceClient interface {
334	// Returns the requested asset in full detail.
335	GetAsset(ctx context.Context, in *GetAssetRequest, opts ...grpc.CallOption) (*resources.Asset, error)
336	// Creates assets. Operation statuses are returned.
337	MutateAssets(ctx context.Context, in *MutateAssetsRequest, opts ...grpc.CallOption) (*MutateAssetsResponse, error)
338}
339
340type assetServiceClient struct {
341	cc *grpc.ClientConn
342}
343
344func NewAssetServiceClient(cc *grpc.ClientConn) AssetServiceClient {
345	return &assetServiceClient{cc}
346}
347
348func (c *assetServiceClient) GetAsset(ctx context.Context, in *GetAssetRequest, opts ...grpc.CallOption) (*resources.Asset, error) {
349	out := new(resources.Asset)
350	err := c.cc.Invoke(ctx, "/google.ads.googleads.v1.services.AssetService/GetAsset", in, out, opts...)
351	if err != nil {
352		return nil, err
353	}
354	return out, nil
355}
356
357func (c *assetServiceClient) MutateAssets(ctx context.Context, in *MutateAssetsRequest, opts ...grpc.CallOption) (*MutateAssetsResponse, error) {
358	out := new(MutateAssetsResponse)
359	err := c.cc.Invoke(ctx, "/google.ads.googleads.v1.services.AssetService/MutateAssets", in, out, opts...)
360	if err != nil {
361		return nil, err
362	}
363	return out, nil
364}
365
366// AssetServiceServer is the server API for AssetService service.
367type AssetServiceServer interface {
368	// Returns the requested asset in full detail.
369	GetAsset(context.Context, *GetAssetRequest) (*resources.Asset, error)
370	// Creates assets. Operation statuses are returned.
371	MutateAssets(context.Context, *MutateAssetsRequest) (*MutateAssetsResponse, error)
372}
373
374func RegisterAssetServiceServer(s *grpc.Server, srv AssetServiceServer) {
375	s.RegisterService(&_AssetService_serviceDesc, srv)
376}
377
378func _AssetService_GetAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
379	in := new(GetAssetRequest)
380	if err := dec(in); err != nil {
381		return nil, err
382	}
383	if interceptor == nil {
384		return srv.(AssetServiceServer).GetAsset(ctx, in)
385	}
386	info := &grpc.UnaryServerInfo{
387		Server:     srv,
388		FullMethod: "/google.ads.googleads.v1.services.AssetService/GetAsset",
389	}
390	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
391		return srv.(AssetServiceServer).GetAsset(ctx, req.(*GetAssetRequest))
392	}
393	return interceptor(ctx, in, info, handler)
394}
395
396func _AssetService_MutateAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
397	in := new(MutateAssetsRequest)
398	if err := dec(in); err != nil {
399		return nil, err
400	}
401	if interceptor == nil {
402		return srv.(AssetServiceServer).MutateAssets(ctx, in)
403	}
404	info := &grpc.UnaryServerInfo{
405		Server:     srv,
406		FullMethod: "/google.ads.googleads.v1.services.AssetService/MutateAssets",
407	}
408	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
409		return srv.(AssetServiceServer).MutateAssets(ctx, req.(*MutateAssetsRequest))
410	}
411	return interceptor(ctx, in, info, handler)
412}
413
414var _AssetService_serviceDesc = grpc.ServiceDesc{
415	ServiceName: "google.ads.googleads.v1.services.AssetService",
416	HandlerType: (*AssetServiceServer)(nil),
417	Methods: []grpc.MethodDesc{
418		{
419			MethodName: "GetAsset",
420			Handler:    _AssetService_GetAsset_Handler,
421		},
422		{
423			MethodName: "MutateAssets",
424			Handler:    _AssetService_MutateAssets_Handler,
425		},
426	},
427	Streams:  []grpc.StreamDesc{},
428	Metadata: "google/ads/googleads/v1/services/asset_service.proto",
429}
430