| 1 |
// Copyright 2025 Google LLC |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
|
| 15 |
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| 16 |
// versions: |
| 17 |
// - protoc-gen-go-grpc v1.3.0 |
| 18 |
// - protoc v4.25.7 |
| 19 |
// source: google/shopping/merchant/issueresolution/v1beta/issueresolution.proto |
| 20 |
|
| 21 |
package issueresolutionpb |
| 22 |
|
| 23 |
import ( |
| 24 |
context "context" |
| 25 |
grpc "google.golang.org/grpc" |
| 26 |
codes "google.golang.org/grpc/codes" |
| 27 |
status "google.golang.org/grpc/status" |
| 28 |
) |
| 29 |
|
| 30 |
// This is a compile-time assertion to ensure that this generated file |
| 31 |
// is compatible with the grpc package it is being compiled against. |
| 32 |
// Requires gRPC-Go v1.32.0 or later. |
| 33 |
const _ = grpc.SupportPackageIsVersion7 |
| 34 |
|
| 35 |
const ( |
| 36 |
IssueResolutionService_RenderAccountIssues_FullMethodName = "/google.shopping.merchant.issueresolution.v1beta.IssueResolutionService/RenderAccountIssues" |
| 37 |
IssueResolutionService_RenderProductIssues_FullMethodName = "/google.shopping.merchant.issueresolution.v1beta.IssueResolutionService/RenderProductIssues" |
| 38 |
IssueResolutionService_TriggerAction_FullMethodName = "/google.shopping.merchant.issueresolution.v1beta.IssueResolutionService/TriggerAction" |
| 39 |
) |
| 40 |
|
| 41 |
// IssueResolutionServiceClient is the client API for IssueResolutionService service. |
| 42 |
// |
| 43 |
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. |
| 44 |
type IssueResolutionServiceClient interface { |
| 45 |
// Provide a list of business's account issues with an issue resolution |
| 46 |
// content and available actions. This content and actions are meant to be |
| 47 |
// rendered and shown in third-party applications. |
| 48 |
RenderAccountIssues(ctx context.Context, in *RenderAccountIssuesRequest, opts ...grpc.CallOption) (*RenderAccountIssuesResponse, error) |
| 49 |
// Provide a list of issues for business's product with an issue resolution |
| 50 |
// content and available actions. This content and actions are meant to be |
| 51 |
// rendered and shown in third-party applications. |
| 52 |
RenderProductIssues(ctx context.Context, in *RenderProductIssuesRequest, opts ...grpc.CallOption) (*RenderProductIssuesResponse, error) |
| 53 |
// Start an action. The action can be requested by a business in |
| 54 |
// third-party application. Before the business can request the action, the |
| 55 |
// third-party application needs to show them action specific content and |
| 56 |
// display a user input form. |
| 57 |
// |
| 58 |
// The action can be successfully started only once all `required` inputs are |
| 59 |
// provided. If any `required` input is missing, or invalid value was |
| 60 |
// provided, the service will return 400 error. Validation errors will contain |
| 61 |
// [Ids][google.shopping.merchant.issueresolution.v1beta.InputField.id] for |
| 62 |
// all problematic field together with translated, human readable error |
| 63 |
// messages that can be shown to the user. |
| 64 |
TriggerAction(ctx context.Context, in *TriggerActionRequest, opts ...grpc.CallOption) (*TriggerActionResponse, error) |
| 65 |
} |
| 66 |
|
| 67 |
type issueResolutionServiceClient struct { |
| 68 |
cc grpc.ClientConnInterface |
| 69 |
} |
| 70 |
|
| 71 |
func NewIssueResolutionServiceClient(cc grpc.ClientConnInterface) IssueResolutionServiceClient { |
| 72 |
return &issueResolutionServiceClient{cc} |
| 73 |
} |
| 74 |
|
| 75 |
func (c *issueResolutionServiceClient) RenderAccountIssues(ctx context.Context, in *RenderAccountIssuesRequest, opts ...grpc.CallOption) (*RenderAccountIssuesResponse, error) { |
| 76 |
out := new(RenderAccountIssuesResponse) |
| 77 |
err := c.cc.Invoke(ctx, IssueResolutionService_RenderAccountIssues_FullMethodName, in, out, opts...) |
| 78 |
if err != nil { |
| 79 |
return nil, err |
| 80 |
} |
| 81 |
return out, nil |
| 82 |
} |
| 83 |
|
| 84 |
func (c *issueResolutionServiceClient) RenderProductIssues(ctx context.Context, in *RenderProductIssuesRequest, opts ...grpc.CallOption) (*RenderProductIssuesResponse, error) { |
| 85 |
out := new(RenderProductIssuesResponse) |
| 86 |
err := c.cc.Invoke(ctx, IssueResolutionService_RenderProductIssues_FullMethodName, in, out, opts...) |
| 87 |
if err != nil { |
| 88 |
return nil, err |
| 89 |
} |
| 90 |
return out, nil |
| 91 |
} |
| 92 |
|
| 93 |
func (c *issueResolutionServiceClient) TriggerAction(ctx context.Context, in *TriggerActionRequest, opts ...grpc.CallOption) (*TriggerActionResponse, error) { |
| 94 |
out := new(TriggerActionResponse) |
| 95 |
err := c.cc.Invoke(ctx, IssueResolutionService_TriggerAction_FullMethodName, in, out, opts...) |
| 96 |
if err != nil { |
| 97 |
return nil, err |
| 98 |
} |
| 99 |
return out, nil |
| 100 |
} |
| 101 |
|
| 102 |
// IssueResolutionServiceServer is the server API for IssueResolutionService service. |
| 103 |
// All implementations should embed UnimplementedIssueResolutionServiceServer |
| 104 |
// for forward compatibility |
| 105 |
type IssueResolutionServiceServer interface { |
| 106 |
// Provide a list of business's account issues with an issue resolution |
| 107 |
// content and available actions. This content and actions are meant to be |
| 108 |
// rendered and shown in third-party applications. |
| 109 |
RenderAccountIssues(context.Context, *RenderAccountIssuesRequest) (*RenderAccountIssuesResponse, error) |
| 110 |
// Provide a list of issues for business's product with an issue resolution |
| 111 |
// content and available actions. This content and actions are meant to be |
| 112 |
// rendered and shown in third-party applications. |
| 113 |
RenderProductIssues(context.Context, *RenderProductIssuesRequest) (*RenderProductIssuesResponse, error) |
| 114 |
// Start an action. The action can be requested by a business in |
| 115 |
// third-party application. Before the business can request the action, the |
| 116 |
// third-party application needs to show them action specific content and |
| 117 |
// display a user input form. |
| 118 |
// |
| 119 |
// The action can be successfully started only once all `required` inputs are |
| 120 |
// provided. If any `required` input is missing, or invalid value was |
| 121 |
// provided, the service will return 400 error. Validation errors will contain |
| 122 |
// [Ids][google.shopping.merchant.issueresolution.v1beta.InputField.id] for |
| 123 |
// all problematic field together with translated, human readable error |
| 124 |
// messages that can be shown to the user. |
| 125 |
TriggerAction(context.Context, *TriggerActionRequest) (*TriggerActionResponse, error) |
| 126 |
} |
| 127 |
|
| 128 |
// UnimplementedIssueResolutionServiceServer should be embedded to have forward compatible implementations. |
| 129 |
type UnimplementedIssueResolutionServiceServer struct { |
| 130 |
} |
| 131 |
|
| 132 |
func (UnimplementedIssueResolutionServiceServer) RenderAccountIssues(context.Context, *RenderAccountIssuesRequest) (*RenderAccountIssuesResponse, error) { |
| 133 |
return nil, status.Errorf(codes.Unimplemented, "method RenderAccountIssues not implemented") |
| 134 |
} |
| 135 |
func (UnimplementedIssueResolutionServiceServer) RenderProductIssues(context.Context, *RenderProductIssuesRequest) (*RenderProductIssuesResponse, error) { |
| 136 |
return nil, status.Errorf(codes.Unimplemented, "method RenderProductIssues not implemented") |
| 137 |
} |
| 138 |
func (UnimplementedIssueResolutionServiceServer) TriggerAction(context.Context, *TriggerActionRequest) (*TriggerActionResponse, error) { |
| 139 |
return nil, status.Errorf(codes.Unimplemented, "method TriggerAction not implemented") |
| 140 |
} |
| 141 |
|
| 142 |
// UnsafeIssueResolutionServiceServer may be embedded to opt out of forward compatibility for this service. |
| 143 |
// Use of this interface is not recommended, as added methods to IssueResolutionServiceServer will |
| 144 |
// result in compilation errors. |
| 145 |
type UnsafeIssueResolutionServiceServer interface { |
| 146 |
mustEmbedUnimplementedIssueResolutionServiceServer() |
| 147 |
} |
| 148 |
|
| 149 |
func RegisterIssueResolutionServiceServer(s grpc.ServiceRegistrar, srv IssueResolutionServiceServer) { |
| 150 |
s.RegisterService(&IssueResolutionService_ServiceDesc, srv) |
| 151 |
} |
| 152 |
|
| 153 |
func _IssueResolutionService_RenderAccountIssues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 154 |
in := new(RenderAccountIssuesRequest) |
| 155 |
if err := dec(in); err != nil { |
| 156 |
return nil, err |
| 157 |
} |
| 158 |
if interceptor == nil { |
| 159 |
return srv.(IssueResolutionServiceServer).RenderAccountIssues(ctx, in) |
| 160 |
} |
| 161 |
info := &grpc.UnaryServerInfo{ |
| 162 |
Server: srv, |
| 163 |
FullMethod: IssueResolutionService_RenderAccountIssues_FullMethodName, |
| 164 |
} |
| 165 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 166 |
return srv.(IssueResolutionServiceServer).RenderAccountIssues(ctx, req.(*RenderAccountIssuesRequest)) |
| 167 |
} |
| 168 |
return interceptor(ctx, in, info, handler) |
| 169 |
} |
| 170 |
|
| 171 |
func _IssueResolutionService_RenderProductIssues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 172 |
in := new(RenderProductIssuesRequest) |
| 173 |
if err := dec(in); err != nil { |
| 174 |
return nil, err |
| 175 |
} |
| 176 |
if interceptor == nil { |
| 177 |
return srv.(IssueResolutionServiceServer).RenderProductIssues(ctx, in) |
| 178 |
} |
| 179 |
info := &grpc.UnaryServerInfo{ |
| 180 |
Server: srv, |
| 181 |
FullMethod: IssueResolutionService_RenderProductIssues_FullMethodName, |
| 182 |
} |
| 183 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 184 |
return srv.(IssueResolutionServiceServer).RenderProductIssues(ctx, req.(*RenderProductIssuesRequest)) |
| 185 |
} |
| 186 |
return interceptor(ctx, in, info, handler) |
| 187 |
} |
| 188 |
|
| 189 |
func _IssueResolutionService_TriggerAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| 190 |
in := new(TriggerActionRequest) |
| 191 |
if err := dec(in); err != nil { |
| 192 |
return nil, err |
| 193 |
} |
| 194 |
if interceptor == nil { |
| 195 |
return srv.(IssueResolutionServiceServer).TriggerAction(ctx, in) |
| 196 |
} |
| 197 |
info := &grpc.UnaryServerInfo{ |
| 198 |
Server: srv, |
| 199 |
FullMethod: IssueResolutionService_TriggerAction_FullMethodName, |
| 200 |
} |
| 201 |
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| 202 |
return srv.(IssueResolutionServiceServer).TriggerAction(ctx, req.(*TriggerActionRequest)) |
| 203 |
} |
| 204 |
return interceptor(ctx, in, info, handler) |
| 205 |
} |
| 206 |
|
| 207 |
// IssueResolutionService_ServiceDesc is the grpc.ServiceDesc for IssueResolutionService service. |
| 208 |
// It's only intended for direct use with grpc.RegisterService, |
| 209 |
// and not to be introspected or modified (even as a copy) |
| 210 |
var IssueResolutionService_ServiceDesc = grpc.ServiceDesc{ |
| 211 |
ServiceName: "google.shopping.merchant.issueresolution.v1beta.IssueResolutionService", |
| 212 |
HandlerType: (*IssueResolutionServiceServer)(nil), |
| 213 |
Methods: []grpc.MethodDesc{ |
| 214 |
{ |
| 215 |
MethodName: "RenderAccountIssues", |
| 216 |
Handler: _IssueResolutionService_RenderAccountIssues_Handler, |
| 217 |
}, |
| 218 |
{ |
| 219 |
MethodName: "RenderProductIssues", |
| 220 |
Handler: _IssueResolutionService_RenderProductIssues_Handler, |
| 221 |
}, |
| 222 |
{ |
| 223 |
MethodName: "TriggerAction", |
| 224 |
Handler: _IssueResolutionService_TriggerAction_Handler, |
| 225 |
}, |
| 226 |
}, |
| 227 |
Streams: []grpc.StreamDesc{}, |
| 228 |
Metadata: "google/shopping/merchant/issueresolution/v1beta/issueresolution.proto", |
| 229 |
} |