blob: 54d01ea5df6c8aec4791414c7ef5611c862fcb90 [file] [log] [blame]
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/policytroubleshooter/v1/checker.proto
package policytroubleshooter
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
// Request for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy].
type TroubleshootIamPolicyRequest struct {
// The information to use for checking whether a member has a permission for a
// resource.
AccessTuple *AccessTuple `protobuf:"bytes,1,opt,name=access_tuple,json=accessTuple,proto3" json:"access_tuple,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TroubleshootIamPolicyRequest) Reset() { *m = TroubleshootIamPolicyRequest{} }
func (m *TroubleshootIamPolicyRequest) String() string { return proto.CompactTextString(m) }
func (*TroubleshootIamPolicyRequest) ProtoMessage() {}
func (*TroubleshootIamPolicyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c898537025beb094, []int{0}
}
func (m *TroubleshootIamPolicyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TroubleshootIamPolicyRequest.Unmarshal(m, b)
}
func (m *TroubleshootIamPolicyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TroubleshootIamPolicyRequest.Marshal(b, m, deterministic)
}
func (m *TroubleshootIamPolicyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_TroubleshootIamPolicyRequest.Merge(m, src)
}
func (m *TroubleshootIamPolicyRequest) XXX_Size() int {
return xxx_messageInfo_TroubleshootIamPolicyRequest.Size(m)
}
func (m *TroubleshootIamPolicyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_TroubleshootIamPolicyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_TroubleshootIamPolicyRequest proto.InternalMessageInfo
func (m *TroubleshootIamPolicyRequest) GetAccessTuple() *AccessTuple {
if m != nil {
return m.AccessTuple
}
return nil
}
// Response for [TroubleshootIamPolicy][google.cloud.policytroubleshooter.v1.IamChecker.TroubleshootIamPolicy].
type TroubleshootIamPolicyResponse struct {
// Indicates whether the member has the specified permission for the specified
// resource, based on evaluating all of the applicable IAM policies.
Access AccessState `protobuf:"varint,1,opt,name=access,proto3,enum=google.cloud.policytroubleshooter.v1.AccessState" json:"access,omitempty"`
// List of IAM policies that were evaluated to check the member's permissions,
// with annotations to indicate how each policy contributed to the final
// result.
//
// The list of policies can include the policy for the resource itself. It can
// also include policies that are inherited from higher levels of the resource
// hierarchy, including the organization, the folder, and the project.
//
// To learn more about the resource hierarchy, see
// https://cloud.google.com/iam/help/resource-hierarchy.
ExplainedPolicies []*ExplainedPolicy `protobuf:"bytes,2,rep,name=explained_policies,json=explainedPolicies,proto3" json:"explained_policies,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TroubleshootIamPolicyResponse) Reset() { *m = TroubleshootIamPolicyResponse{} }
func (m *TroubleshootIamPolicyResponse) String() string { return proto.CompactTextString(m) }
func (*TroubleshootIamPolicyResponse) ProtoMessage() {}
func (*TroubleshootIamPolicyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c898537025beb094, []int{1}
}
func (m *TroubleshootIamPolicyResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TroubleshootIamPolicyResponse.Unmarshal(m, b)
}
func (m *TroubleshootIamPolicyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TroubleshootIamPolicyResponse.Marshal(b, m, deterministic)
}
func (m *TroubleshootIamPolicyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_TroubleshootIamPolicyResponse.Merge(m, src)
}
func (m *TroubleshootIamPolicyResponse) XXX_Size() int {
return xxx_messageInfo_TroubleshootIamPolicyResponse.Size(m)
}
func (m *TroubleshootIamPolicyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_TroubleshootIamPolicyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_TroubleshootIamPolicyResponse proto.InternalMessageInfo
func (m *TroubleshootIamPolicyResponse) GetAccess() AccessState {
if m != nil {
return m.Access
}
return AccessState_ACCESS_STATE_UNSPECIFIED
}
func (m *TroubleshootIamPolicyResponse) GetExplainedPolicies() []*ExplainedPolicy {
if m != nil {
return m.ExplainedPolicies
}
return nil
}
func init() {
proto.RegisterType((*TroubleshootIamPolicyRequest)(nil), "google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyRequest")
proto.RegisterType((*TroubleshootIamPolicyResponse)(nil), "google.cloud.policytroubleshooter.v1.TroubleshootIamPolicyResponse")
}
func init() {
proto.RegisterFile("google/cloud/policytroubleshooter/v1/checker.proto", fileDescriptor_c898537025beb094)
}
var fileDescriptor_c898537025beb094 = []byte{
// 422 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x41, 0x8b, 0x13, 0x31,
0x14, 0xc7, 0x4d, 0x85, 0x3d, 0xa4, 0xa2, 0x38, 0x28, 0xae, 0x65, 0xc5, 0xa5, 0x7a, 0x28, 0x82,
0x09, 0xad, 0x88, 0x50, 0x4f, 0xed, 0xe2, 0x61, 0x0e, 0xc2, 0x50, 0x0b, 0x8a, 0x97, 0x25, 0x9b,
0x3e, 0x67, 0x82, 0x99, 0xbc, 0x38, 0xc9, 0x6c, 0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6, 0xa5, 0x0c, 0xac, 0x8e, 0x03, 0xa8, 0xc0, 0xed, 0xf7, 0x0e, 0x2f, 0x8e, 0xfa, 0x93, 0x87,
0xdd, 0xb4, 0x4f, 0x7e, 0xf3, 0xcd, 0x5f, 0x5e, 0x85, 0x73, 0x07, 0x0a, 0xdc, 0xe4, 0x53, 0x8f,
0xd2, 0x54, 0x94, 0x47, 0xf1, 0xce, 0x93, 0xcf, 0x84, 0x5e, 0x6f, 0xed, 0x30, 0x99, 0x77, 0x8b,
0xdc, 0x75, 0x2b, 0x83, 0xa3, 0xff, 0x72, 0xc4, 0x11, 0x0f, 0x6f, 0xbf, 0xff, 0xfe, 0xe3, 0x43,
0xef, 0xe6, 0xf0, 0xda, 0x66, 0xa3, 0x94, 0x28, 0xa7, 0xdb, 0x82, 0x29, 0xb9, 0x37, 0x78, 0xfe,
0x65, 0x76, 0xa7, 0x55, 0x1d, 0xc3, 0x85, 0x55, 0x8e, 0x49, 0x2c, 0xbf, 0xcd, 0x58, 0xe1, 0xbd,
0x75, 0x53, 0xce, 0xd7, 0xeb, 0xf5, 0x1f, 0x45, 0x2e, 0x6a, 0x5f, 0xc4, 0x6d, 0xbe, 0x6f, 0xb5,
0xf0, 0xaf, 0xb0, 0x2a, 0xe7, 0x1f, 0x09, 0x1d, 0x49, 0x2c, 0x3b, 0x35, 0x31, 0xbf, 0x92, 0xce,
0x9e, 0x36, 0x53, 0xcd, 0x36, 0x2b, 0x9b, 0x91, 0x97, 0x2f, 0x1a, 0x30, 0x47, 0x2d, 0x4c, 0xce,
0xb0, 0xca, 0x79, 0x0e, 0x26, 0x2c, 0x34, 0x3f, 0x8b, 0xdf, 0xfd, 0x86, 0x1e, 0xb7, 0x9d, 0xff,
0x24, 0x24, 0xbb, 0x70, 0xb2, 0x17, 0x4c, 0x0f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x04,
0x20, 0x15, 0xe6, 0x03, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// IamCheckerClient is the client API for IamChecker service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type IamCheckerClient interface {
// Checks whether a member has a specific permission for a specific resource,
// and explains why the member does or does not have that permission.
TroubleshootIamPolicy(ctx context.Context, in *TroubleshootIamPolicyRequest, opts ...grpc.CallOption) (*TroubleshootIamPolicyResponse, error)
}
type iamCheckerClient struct {
cc grpc.ClientConnInterface
}
func NewIamCheckerClient(cc grpc.ClientConnInterface) IamCheckerClient {
return &iamCheckerClient{cc}
}
func (c *iamCheckerClient) TroubleshootIamPolicy(ctx context.Context, in *TroubleshootIamPolicyRequest, opts ...grpc.CallOption) (*TroubleshootIamPolicyResponse, error) {
out := new(TroubleshootIamPolicyResponse)
err := c.cc.Invoke(ctx, "/google.cloud.policytroubleshooter.v1.IamChecker/TroubleshootIamPolicy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// IamCheckerServer is the server API for IamChecker service.
type IamCheckerServer interface {
// Checks whether a member has a specific permission for a specific resource,
// and explains why the member does or does not have that permission.
TroubleshootIamPolicy(context.Context, *TroubleshootIamPolicyRequest) (*TroubleshootIamPolicyResponse, error)
}
// UnimplementedIamCheckerServer can be embedded to have forward compatible implementations.
type UnimplementedIamCheckerServer struct {
}
func (*UnimplementedIamCheckerServer) TroubleshootIamPolicy(ctx context.Context, req *TroubleshootIamPolicyRequest) (*TroubleshootIamPolicyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method TroubleshootIamPolicy not implemented")
}
func RegisterIamCheckerServer(s *grpc.Server, srv IamCheckerServer) {
s.RegisterService(&_IamChecker_serviceDesc, srv)
}
func _IamChecker_TroubleshootIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TroubleshootIamPolicyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IamCheckerServer).TroubleshootIamPolicy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.policytroubleshooter.v1.IamChecker/TroubleshootIamPolicy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IamCheckerServer).TroubleshootIamPolicy(ctx, req.(*TroubleshootIamPolicyRequest))
}
return interceptor(ctx, in, info, handler)
}
var _IamChecker_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.policytroubleshooter.v1.IamChecker",
HandlerType: (*IamCheckerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "TroubleshootIamPolicy",
Handler: _IamChecker_TroubleshootIamPolicy_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/policytroubleshooter/v1/checker.proto",
}