packer-cn/vendor/github.com/yandex-cloud/go-sdk/gen/resourcemanager/folder.go

106 lines
3.9 KiB
Go

// Code generated by sdkgen. DO NOT EDIT.
//nolint
package resourcemanager
import (
"context"
"google.golang.org/grpc"
"github.com/yandex-cloud/go-genproto/yandex/cloud/access"
"github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
"github.com/yandex-cloud/go-genproto/yandex/cloud/resourcemanager/v1"
)
//revive:disable
// FolderServiceClient is a resourcemanager.FolderServiceClient with
// lazy GRPC connection initialization.
type FolderServiceClient struct {
getConn func(ctx context.Context) (*grpc.ClientConn, error)
}
var _ resourcemanager.FolderServiceClient = &FolderServiceClient{}
// Create implements resourcemanager.FolderServiceClient
func (c *FolderServiceClient) Create(ctx context.Context, in *resourcemanager.CreateFolderRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return resourcemanager.NewFolderServiceClient(conn).Create(ctx, in, opts...)
}
// Delete implements resourcemanager.FolderServiceClient
func (c *FolderServiceClient) Delete(ctx context.Context, in *resourcemanager.DeleteFolderRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return resourcemanager.NewFolderServiceClient(conn).Delete(ctx, in, opts...)
}
// Get implements resourcemanager.FolderServiceClient
func (c *FolderServiceClient) Get(ctx context.Context, in *resourcemanager.GetFolderRequest, opts ...grpc.CallOption) (*resourcemanager.Folder, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return resourcemanager.NewFolderServiceClient(conn).Get(ctx, in, opts...)
}
// List implements resourcemanager.FolderServiceClient
func (c *FolderServiceClient) List(ctx context.Context, in *resourcemanager.ListFoldersRequest, opts ...grpc.CallOption) (*resourcemanager.ListFoldersResponse, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return resourcemanager.NewFolderServiceClient(conn).List(ctx, in, opts...)
}
// ListAccessBindings implements resourcemanager.FolderServiceClient
func (c *FolderServiceClient) ListAccessBindings(ctx context.Context, in *access.ListAccessBindingsRequest, opts ...grpc.CallOption) (*access.ListAccessBindingsResponse, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return resourcemanager.NewFolderServiceClient(conn).ListAccessBindings(ctx, in, opts...)
}
// ListOperations implements resourcemanager.FolderServiceClient
func (c *FolderServiceClient) ListOperations(ctx context.Context, in *resourcemanager.ListFolderOperationsRequest, opts ...grpc.CallOption) (*resourcemanager.ListFolderOperationsResponse, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return resourcemanager.NewFolderServiceClient(conn).ListOperations(ctx, in, opts...)
}
// SetAccessBindings implements resourcemanager.FolderServiceClient
func (c *FolderServiceClient) SetAccessBindings(ctx context.Context, in *access.SetAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return resourcemanager.NewFolderServiceClient(conn).SetAccessBindings(ctx, in, opts...)
}
// Update implements resourcemanager.FolderServiceClient
func (c *FolderServiceClient) Update(ctx context.Context, in *resourcemanager.UpdateFolderRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return resourcemanager.NewFolderServiceClient(conn).Update(ctx, in, opts...)
}
// UpdateAccessBindings implements resourcemanager.FolderServiceClient
func (c *FolderServiceClient) UpdateAccessBindings(ctx context.Context, in *access.UpdateAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return resourcemanager.NewFolderServiceClient(conn).UpdateAccessBindings(ctx, in, opts...)
}