// Code generated by sdkgen-v2. DO NOT EDIT.
package iamsdk

import (
	"context"

	iam "github.com/yandex-cloud/go-genproto/yandex/cloud/iam/v1"
	"github.com/yandex-cloud/go-sdk/v2/pkg/transport"
	"google.golang.org/grpc"
	"google.golang.org/protobuf/reflect/protoreflect"
)

// AccessAnalyzerClient provides methods for managing AccessAnalyzer resources of Yandex.Cloud IAM.
type AccessAnalyzerClient interface {
	AccessAnalyzerClientIterator
	ListSubjectAccessBindings(context.Context, *iam.ListSubjectAccessBindingsRequest, ...grpc.CallOption) (*iam.ListSubjectAccessBindingsResponse, error)
}

var _ AccessAnalyzerClient = accessAnalyzerClient{}

type accessAnalyzerClient struct {
	connector transport.Connector
}

// NewAccessAnalyzerClient returns AccessAnalyzerClient implementation.
func NewAccessAnalyzerClient(connector transport.Connector) AccessAnalyzerClient {
	return accessAnalyzerClient{connector}
}

// ListSubjectAccessBindings is an operation of Yandex.Cloud IAM AccessAnalyzer service.
func (c accessAnalyzerClient) ListSubjectAccessBindings(ctx context.Context, in *iam.ListSubjectAccessBindingsRequest, opts ...grpc.CallOption) (*iam.ListSubjectAccessBindingsResponse, error) {
	connection, err := c.connector.GetConnection(ctx, AccessAnalyzerListSubjectAccessBindings, opts...)
	if err != nil {
		return nil, err
	}
	return iam.NewAccessAnalyzerServiceClient(connection).ListSubjectAccessBindings(ctx, in, opts...)
}

var (
	AccessAnalyzerListSubjectAccessBindings = protoreflect.FullName("yandex.cloud.iam.v1.AccessAnalyzerService.ListSubjectAccessBindings")
)
