packer-cn/vendor/github.com/yandex-cloud/go-sdk/gen/compute/instancegroup/instancegroup.go

114 lines
4.6 KiB
Go

// Code generated by sdkgen. DO NOT EDIT.
//nolint
package instancegroup
import (
"context"
"google.golang.org/grpc"
"github.com/yandex-cloud/go-genproto/yandex/cloud/compute/v1/instancegroup"
"github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
)
//revive:disable
// InstanceGroupServiceClient is a instancegroup.InstanceGroupServiceClient with
// lazy GRPC connection initialization.
type InstanceGroupServiceClient struct {
getConn func(ctx context.Context) (*grpc.ClientConn, error)
}
var _ instancegroup.InstanceGroupServiceClient = &InstanceGroupServiceClient{}
// Create implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) Create(ctx context.Context, in *instancegroup.CreateInstanceGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).Create(ctx, in, opts...)
}
// CreateFromYaml implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) CreateFromYaml(ctx context.Context, in *instancegroup.CreateInstanceGroupFromYamlRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).CreateFromYaml(ctx, in, opts...)
}
// Delete implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) Delete(ctx context.Context, in *instancegroup.DeleteInstanceGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).Delete(ctx, in, opts...)
}
// Get implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) Get(ctx context.Context, in *instancegroup.GetInstanceGroupRequest, opts ...grpc.CallOption) (*instancegroup.InstanceGroup, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).Get(ctx, in, opts...)
}
// List implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) List(ctx context.Context, in *instancegroup.ListInstanceGroupsRequest, opts ...grpc.CallOption) (*instancegroup.ListInstanceGroupsResponse, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).List(ctx, in, opts...)
}
// ListInstances implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) ListInstances(ctx context.Context, in *instancegroup.ListInstanceGroupInstancesRequest, opts ...grpc.CallOption) (*instancegroup.ListInstanceGroupInstancesResponse, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).ListInstances(ctx, in, opts...)
}
// ListLogRecords implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) ListLogRecords(ctx context.Context, in *instancegroup.ListInstanceGroupLogRecordsRequest, opts ...grpc.CallOption) (*instancegroup.ListInstanceGroupLogRecordsResponse, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).ListLogRecords(ctx, in, opts...)
}
// ListOperations implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) ListOperations(ctx context.Context, in *instancegroup.ListInstanceGroupOperationsRequest, opts ...grpc.CallOption) (*instancegroup.ListInstanceGroupOperationsResponse, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).ListOperations(ctx, in, opts...)
}
// Update implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) Update(ctx context.Context, in *instancegroup.UpdateInstanceGroupRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).Update(ctx, in, opts...)
}
// UpdateFromYaml implements instancegroup.InstanceGroupServiceClient
func (c *InstanceGroupServiceClient) UpdateFromYaml(ctx context.Context, in *instancegroup.UpdateInstanceGroupFromYamlRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
conn, err := c.getConn(ctx)
if err != nil {
return nil, err
}
return instancegroup.NewInstanceGroupServiceClient(conn).UpdateFromYaml(ctx, in, opts...)
}