// 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"
)

// AccessPolicyTemplateClient provides methods for managing AccessPolicyTemplate resources of Yandex.Cloud IAM.
type AccessPolicyTemplateClient interface {
	AccessPolicyTemplateClientIterator
	List(context.Context, *iam.ListAccessPolicyTemplatesRequest, ...grpc.CallOption) (*iam.ListAccessPolicyTemplatesResponse, error)
}

var _ AccessPolicyTemplateClient = accessPolicyTemplateClient{}

type accessPolicyTemplateClient struct {
	connector transport.Connector
}

// NewAccessPolicyTemplateClient returns AccessPolicyTemplateClient implementation.
func NewAccessPolicyTemplateClient(connector transport.Connector) AccessPolicyTemplateClient {
	return accessPolicyTemplateClient{connector}
}

// List is an operation of Yandex.Cloud IAM AccessPolicyTemplate service.
func (c accessPolicyTemplateClient) List(ctx context.Context, in *iam.ListAccessPolicyTemplatesRequest, opts ...grpc.CallOption) (*iam.ListAccessPolicyTemplatesResponse, error) {
	connection, err := c.connector.GetConnection(ctx, AccessPolicyTemplateList, opts...)
	if err != nil {
		return nil, err
	}
	return iam.NewAccessPolicyTemplateServiceClient(connection).List(ctx, in, opts...)
}

var (
	AccessPolicyTemplateList = protoreflect.FullName("yandex.cloud.iam.v1.AccessPolicyTemplateService.List")
)
