// Code generated by sdkgen. DO NOT EDIT.

// nolint
package cdn

import (
	"context"

	"google.golang.org/grpc"

	cdn "github.com/yandex-cloud/go-genproto/yandex/cloud/cdn/v1"
	"github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
)

//revive:disable

// RawLogsServiceClient is a cdn.RawLogsServiceClient with
// lazy GRPC connection initialization.
type RawLogsServiceClient struct {
	getConn func(ctx context.Context) (*grpc.ClientConn, error)
}

// Activate implements cdn.RawLogsServiceClient
func (c *RawLogsServiceClient) Activate(ctx context.Context, in *cdn.ActivateRawLogsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return cdn.NewRawLogsServiceClient(conn).Activate(ctx, in, opts...)
}

// Deactivate implements cdn.RawLogsServiceClient
func (c *RawLogsServiceClient) Deactivate(ctx context.Context, in *cdn.DeactivateRawLogsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return cdn.NewRawLogsServiceClient(conn).Deactivate(ctx, in, opts...)
}

// Get implements cdn.RawLogsServiceClient
func (c *RawLogsServiceClient) Get(ctx context.Context, in *cdn.GetRawLogsRequest, opts ...grpc.CallOption) (*cdn.GetRawLogsResponse, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return cdn.NewRawLogsServiceClient(conn).Get(ctx, in, opts...)
}

// Update implements cdn.RawLogsServiceClient
func (c *RawLogsServiceClient) Update(ctx context.Context, in *cdn.UpdateRawLogsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	conn, err := c.getConn(ctx)
	if err != nil {
		return nil, err
	}
	return cdn.NewRawLogsServiceClient(conn).Update(ctx, in, opts...)
}
